<?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: Elaine Sajets</title>
    <description>The latest articles on DEV Community by Elaine Sajets (@elainesajets).</description>
    <link>https://dev.to/elainesajets</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%2F2758134%2Fdad9b901-7045-4a97-ba38-9ca92022a753.png</url>
      <title>DEV Community: Elaine Sajets</title>
      <link>https://dev.to/elainesajets</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/elainesajets"/>
    <language>en</language>
    <item>
      <title>Styling Text with Gradients Using Only CSS</title>
      <dc:creator>Elaine Sajets</dc:creator>
      <pubDate>Thu, 17 Apr 2025 03:49:27 +0000</pubDate>
      <link>https://dev.to/elainesajets/styling-text-with-gradients-using-only-css-7pd</link>
      <guid>https://dev.to/elainesajets/styling-text-with-gradients-using-only-css-7pd</guid>
      <description>&lt;p&gt;While I was learning about background properties in CSS, I came across something fun I hadn’t seen before. Apparently you can use background-clip to create gradient text.&lt;/p&gt;

&lt;p&gt;Here’s an example to try it out:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;h2&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"gradient-text"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Cupcake ipsum dolor sit amet wafer lemon drops fruitcake.&lt;span class="nt"&gt;&amp;lt;/h2&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.gradient-text&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;linear-gradient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="nb"&gt;right&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;#ff80ab&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;#b388eb&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;  
  &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;transparent&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;background-clip&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;text&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And here’s what it looks like in action:&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%2Fu8zpazke04px0y408h11.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%2Fu8zpazke04px0y408h11.png" alt="Demo of the provided CSS showing the text gradient." width="800" height="83"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Previously this would only work in some browsers if you added the -webkit- prefix, but now modern browsers support it out of the box. No prefix needed!&lt;/p&gt;

&lt;p&gt;One thing I was initially curious about though.. why not just do this?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;color&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;linear-gradient&lt;/span&gt;&lt;span class="o"&gt;(...);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Turns out CSS doesn’t let you apply gradients directly to the color property, but if you set the gradient as a background and then clip it to the text, you can still get that effect.&lt;/p&gt;

&lt;p&gt;Let me know if you’ve used this before or if you have any other CSS tricks you'd like to share! 😊&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>css</category>
      <category>learning</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Did you know Google Fonts might not be GDPR-compliant?</title>
      <dc:creator>Elaine Sajets</dc:creator>
      <pubDate>Mon, 14 Apr 2025 08:37:52 +0000</pubDate>
      <link>https://dev.to/elainesajets/did-you-know-google-fonts-might-not-be-gdpr-compliant-2kd</link>
      <guid>https://dev.to/elainesajets/did-you-know-google-fonts-might-not-be-gdpr-compliant-2kd</guid>
      <description>&lt;p&gt;Loading fonts straight from Google’s servers (via CDN) sends the user’s IP address to Google — which counts as personal data under GDPR. That means that if your website targets users in the EU/EEA, you might actually need a cookie banner just for fonts 😆&lt;/p&gt;

&lt;p&gt;The nice thing is, even if you are concerned about GDPR, you can still use Google Fonts without the cookie banner, as long as you self-host the fonts. Instead of linking them in your HTML, you can download the fonts and include them with @font-face in your CSS.&lt;/p&gt;

&lt;p&gt;I only learned about this recently while reading about fonts, so just tossing it out there in case it helps other beginners like me.&lt;/p&gt;

&lt;p&gt;Anyone have other tips or thoughts for beginners — either around web dev and regional privacy laws, or just general best practices? Always curious to hear what more experienced devs wish they’d known early on 👀&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>css</category>
      <category>beginners</category>
      <category>learning</category>
    </item>
  </channel>
</rss>
