<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Tejashwa Rajvardhan</title>
    <description>The latest articles on DEV Community by Tejashwa Rajvardhan (@tejash023).</description>
    <link>https://dev.to/tejash023</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F467188%2F1c6ee1d1-0a93-44f1-bcb2-2f60d02bfc69.jpeg</url>
      <title>DEV Community: Tejashwa Rajvardhan</title>
      <link>https://dev.to/tejash023</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tejash023"/>
    <language>en</language>
    <item>
      <title>map, filter and reduce in javascript - the easy way</title>
      <dc:creator>Tejashwa Rajvardhan</dc:creator>
      <pubDate>Fri, 19 Aug 2022 18:41:00 +0000</pubDate>
      <link>https://dev.to/tejash023/map-filter-and-reduce-in-javascript-the-easy-way-3cja</link>
      <guid>https://dev.to/tejash023/map-filter-and-reduce-in-javascript-the-easy-way-3cja</guid>
      <description>&lt;p&gt;There are three array methods in JavaScript: map, reduce, and filter. All these functions will iterate over the array and perform the function. Each will create a new array in response to the function's output. You will discover the rationale for each one's use in this article.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;map()&lt;/strong&gt;&lt;br&gt;
The map method creates a new array with the results of calling a function for every array element.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;const output = arr.map(function) &lt;br&gt;
this function tells about the transformation I want on each element of the array.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Let's take an example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const arr = [6, 3, 5, 9, 2];
//if we want to double each element in the arr, we can use map
const doubleArr = arr.map(double);
//creating the function double
function double(x){
  return 2 * x;
}

//the map will run double function for each element in the arr, and create a new array and returns it.
console.log(doubleArr); //[12, 6, 10, 18, 4];
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So, basically map function is mapping each and every value and transforming based on the given condition.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;filter()&lt;/strong&gt;&lt;br&gt;
Filter function is used to filter the value inside the array. This method also creates a new array from the given array consisting of only those elements from the given array which satisfy a condition set by the argument method.&lt;/p&gt;

&lt;p&gt;Let's take an example:&lt;br&gt;
Suppose we have given an array and we want a new array with all the elements greater than 4 for the values present in arr.&lt;br&gt;
So, the ans will look like [5, 6, 9, 8]&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const arr = [5, 6, 1, 4, 9, 8];
//filter values &amp;gt; 4
function isGreaterThan4(x){
  return x &amp;gt; 4;
}
const arr2 = arr.filter(isGreaterThan4);

//we can also use arrow function to rewrite the same code as :
const arr2 = arr.filter((x) =&amp;gt; x &amp;gt; 4);

console.log(arr2); //[5, 6, 9, 8]

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;reduce()&lt;/strong&gt;&lt;br&gt;
It is function which take all the values of array and gives a single output of it. It reduces the array to give a single output.&lt;br&gt;
Let's take an example:&lt;/p&gt;

&lt;p&gt;First we will find the sum of a given array using loops and then will move on to use reduce to better understand it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const array = [5, 1, 3, 2, 6];
// Let's calculate sum of elements of array - Non functional programming way
function findSum(arr) {
    let sum = 0;
    for (let i = 0; i &amp;lt; arr.length; i++) {
        sum = sum + arr[i];
    }
return sum; }
console.log(findSum(array)); // 17

// reduce function way
const sumOfElem = arr.reduce(function (accumulator, current) {
    // current represent the value of array
    // accumulator is used the result from element of array.
    // In comparison to previous code snippet, *sum* variable is
*accumulator* and *arr[i]* is *current*
    accumulator = accumulator + current;
    return accumulator;
}, 0); //In above example sum was initialized with 0, so over here
accumulator also needs to be initialized, so the second argument to reduce
function represent the initialization value.
console.log(sumOfElem); // 17
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This tweets sums the entire article:&lt;br&gt;
&lt;iframe class="tweet-embed" id="tweet-741089564329054208-354" src="https://platform.twitter.com/embed/Tweet.html?id=741089564329054208"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-741089564329054208-354');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=741089564329054208&amp;amp;theme=dark"
  }



 &lt;/p&gt;

&lt;p&gt;Also, if you want a detailed explanation, do check out &lt;a href="https://www.youtube.com/watch?v=zdp0zrpKzIE" rel="noopener noreferrer"&gt;Namaste Javascript&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>How to create animating gradients in CSS easy way.</title>
      <dc:creator>Tejashwa Rajvardhan</dc:creator>
      <pubDate>Mon, 08 Aug 2022 18:01:00 +0000</pubDate>
      <link>https://dev.to/tejash023/how-to-create-animating-gradients-in-css-easy-way-ng6</link>
      <guid>https://dev.to/tejash023/how-to-create-animating-gradients-in-css-easy-way-ng6</guid>
      <description>&lt;p&gt;A gradient is a continuation of colors with a starting and stopping point and a linear-gradient gradually moves in a straight line to another color.&lt;/p&gt;

&lt;p&gt;Animation in Gradients are the latest trends these days and most of the websites are designed using gradients. With the background-clip property, and animations of CSS, it's very easy to implement animating text gradients.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Syntax: How to create Animating Text gradients&lt;/strong&gt;&lt;br&gt;
First, we have to set up a font using h1 or any tag of our choice and place it at the desired location. I have placed my font in the center using a flexbox.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fazebopd0e3g9w8zvk200.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fazebopd0e3g9w8zvk200.PNG" alt="Image description" width="800" height="309"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The result can be achieved with the help of&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;linear-gradient()&lt;/li&gt;
&lt;li&gt;background-clip&lt;/li&gt;
&lt;li&gt;text-fill-color&lt;/li&gt;
&lt;li&gt;animation&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;1.Linear-gradient() property:&lt;br&gt;
As explained above, this property creates a background linear gradient on the text block.&lt;br&gt;
In CSS, linear-gradient is implemented using:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;background-image: linear-gradient(43deg, #4158D0 0%, #C850C0 46%, #FFCC70 100%);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And the result will be:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkwxrpr7go72pd7xpegr7.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkwxrpr7go72pd7xpegr7.PNG" alt="Image description" width="800" height="157"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;2.background-clip() property:&lt;br&gt;
This CSS property sets whether an element's background extends underneath its border-box, padding-box, or content-box.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;background-clip: text;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And after applying this property, our text will look like:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6v1s2pnhz13dj4ppy7az.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6v1s2pnhz13dj4ppy7az.PNG" alt="Image description" width="800" height="198"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The background is painted within (clipped to) the foreground text.&lt;br&gt;
Due to the text-color, we cannot see our linear gradient color, and then comes the use of our third property.&lt;/p&gt;

&lt;p&gt;3.text-fill-color property:&lt;br&gt;
Since we want to see the linear-gradient which is clipped to the foreground text, we have to make the color of the text transparent and the outcome will be:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx54e1ly649aphazyfa9k.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx54e1ly649aphazyfa9k.PNG" alt="Image description" width="800" height="229"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, let us put some animations to achieve our desired result.&lt;br&gt;
For this we will increase the background size of the gradient so that when we make the animation we can see the effect clearly.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;background-size:300%;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, let's add the css animation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;animation: bg-animations 2s infinite alternate;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, bg-animation is the name of the keyframe which we will use to animate. You can name it anything you like.&lt;/p&gt;

&lt;p&gt;Now we will create out keyframe animation as below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@keyframes bg-animations{
  0%{
    background-postion:left;
  }
  100%{
    background-position:right;
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And voila, we are done. You can see you your gradients animating:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl8vo5xf6g1rbj9wv91bu.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl8vo5xf6g1rbj9wv91bu.PNG" alt="Image description" width="800" height="288"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://codepen.io/tejash023/pen/ExQJvZE" rel="noopener noreferrer"&gt;View Full Code in Codepen:&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>css</category>
      <category>gradients</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Six free websites to generate Gradients</title>
      <dc:creator>Tejashwa Rajvardhan</dc:creator>
      <pubDate>Fri, 11 Sep 2020 16:33:53 +0000</pubDate>
      <link>https://dev.to/tejash023/six-free-websites-to-generate-gradients-5e3h</link>
      <guid>https://dev.to/tejash023/six-free-websites-to-generate-gradients-5e3h</guid>
      <description>&lt;p&gt;These free websites let you generate myriad options of gradients available and even you can create your own custom gradients. &lt;br&gt;
These websites have the option to copy the CSS Code of that particular gradient swatch with just a click.&lt;br&gt;
Let's take a look.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;1.Grabient&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F8dcv9s30mz3to5om58nk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F8dcv9s30mz3to5om58nk.png" alt="Alt Text" width="800" height="459"&gt;&lt;/a&gt;&lt;br&gt;
  &lt;a href="https://www.grabient.com/" rel="noopener noreferrer"&gt;Visit&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;2. CSS Matic&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F3slge9nwn2sikm6zqxq7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F3slge9nwn2sikm6zqxq7.png" alt="Alt Text" width="800" height="511"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.cssmatic.com/" rel="noopener noreferrer"&gt;Visit&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;3.UI Gradients&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fpypaahfr1p2qio0sa890.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fpypaahfr1p2qio0sa890.png" alt="Alt Text" width="800" height="390"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://uigradients.com/" rel="noopener noreferrer"&gt;Visit&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;4.Color Space&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F3ncdd9t2dfiq5pgm2irk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F3ncdd9t2dfiq5pgm2irk.png" alt="Alt Text" width="800" height="397"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://mycolor.space/" rel="noopener noreferrer"&gt;Visit&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;5.Color and Fonts&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F4iai388p9sixjr6wlxd9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F4iai388p9sixjr6wlxd9.png" alt="Alt Text" width="800" height="414"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.colorsandfonts.com/css-gradients" rel="noopener noreferrer"&gt;Visit&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>css</category>
      <category>html</category>
      <category>design</category>
    </item>
    <item>
      <title>How to create text gradients using CSS easily.</title>
      <dc:creator>Tejashwa Rajvardhan</dc:creator>
      <pubDate>Fri, 11 Sep 2020 07:46:51 +0000</pubDate>
      <link>https://dev.to/tejash023/how-to-create-text-gradients-using-css-easily-1kac</link>
      <guid>https://dev.to/tejash023/how-to-create-text-gradients-using-css-easily-1kac</guid>
      <description>&lt;p&gt;A gradient is a continuation of colors with a starting and stopping point and a linear-gradient gradually moves in a straight line to another color.&lt;/p&gt;

&lt;p&gt;Gradients are the latest trends these days and most of the websites are designed using gradients. With the background-clip property of CSS, it's very easy to implement gradients in text.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Syntax: How to create Text gradients&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;First, we have to set up a font using h1 or any tag of our choice and place it at the desired location. I have placed my font in the center using a flexbox.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fscbf9k331xjb6nzd74f9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fscbf9k331xjb6nzd74f9.png" alt="Alt Text" width="800" height="481"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The result can be achieved with the help of &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;linear-gradient()&lt;/li&gt;
&lt;li&gt;background-clip&lt;/li&gt;
&lt;li&gt;text-fill-color&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  &lt;em&gt;1.Linear-gradient() property:&lt;/em&gt;
&lt;/h4&gt;

&lt;p&gt;As explained above, this property creates a background linear gradient on the text block.&lt;br&gt;
In CSS, linear-gradient is implemented using:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;background-image: linear-gradient(43deg, #4158D0 0%, #C850C0 46%, #FFCC70 100%);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And the result will be:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F2z4z6s9wpgu6jvet2j5r.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F2z4z6s9wpgu6jvet2j5r.png" alt="Alt Text" width="800" height="254"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;em&gt;2.background-clip() property:&lt;/em&gt;
&lt;/h4&gt;

&lt;p&gt;This CSS property sets whether an element's background extends underneath its border-box, padding-box, or content-box.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;background-clip: text;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And after applying this property, our text will look like:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fghr433mh00h9u17oxhph.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fghr433mh00h9u17oxhph.png" alt="Alt Text" width="800" height="193"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now you are wondering what happened to the linear-gradient we applied earlier, but after looking closely in the image you can see colors surrounding the text. &lt;/p&gt;

&lt;h6&gt;
  
  
  &lt;em&gt;The background is painted within (clipped to) the foreground text.&lt;/em&gt;
&lt;/h6&gt;

&lt;p&gt;Due to the text-color, we cannot see our linear gradient color, and then comes the use of our third and last property.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;em&gt;3.text-fill-color property:&lt;/em&gt;
&lt;/h4&gt;

&lt;p&gt;Since we want to see the linear-gradient which is clipped to the foreground text, we have to make the color of the text transparent and we can achieve our result.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;text-fill-color: transparent
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And the result will be something like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F2ftfp7p3jwo3npubkiro.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F2ftfp7p3jwo3npubkiro.png" alt="Alt Text" width="800" height="253"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://codepen.io/tejash023/pen/NWNMKMr" rel="noopener noreferrer"&gt;View full code in Codepen&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fxfmqj8ul6jb6w8j1gkbv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fxfmqj8ul6jb6w8j1gkbv.png" alt="Alt Text" width="800" height="404"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>css</category>
      <category>webdev</category>
      <category>design</category>
      <category>html</category>
    </item>
  </channel>
</rss>
