<?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: Karsten Biedermann</title>
    <description>The latest articles on DEV Community by Karsten Biedermann (@karsten_biedermann).</description>
    <link>https://dev.to/karsten_biedermann</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%2F1268379%2F6be5996b-5e66-4341-badb-dcc89bf7cb54.jpg</url>
      <title>DEV Community: Karsten Biedermann</title>
      <link>https://dev.to/karsten_biedermann</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/karsten_biedermann"/>
    <language>en</language>
    <item>
      <title>Get **** done. I hate what Trello has become</title>
      <dc:creator>Karsten Biedermann</dc:creator>
      <pubDate>Wed, 11 Feb 2026 15:32:12 +0000</pubDate>
      <link>https://dev.to/karsten_biedermann/get-done-i-hate-what-trello-has-become-5a05</link>
      <guid>https://dev.to/karsten_biedermann/get-done-i-hate-what-trello-has-become-5a05</guid>
      <description>&lt;p&gt;I hate productivity tools. Not in a cute, ironic way. I mean I genuinely hate how they look, how they feel, and what they've turned into.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;They're bloated.&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;They're ugly.&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;And they're built for reporting, not for work.&lt;/strong&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%2Fuploads%2Farticles%2Fklraaobaxtw147etscif.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%2Fklraaobaxtw147etscif.png" alt=" " width="800" height="387"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Before Atlassian bought Trello, it wasn't pretty - but it was reduced. It did one thing. And it didn't pretend to be enterprise-ready. Since then, everything seems optimized for big organizations that confuse visibility with progress. More workflows. More dashboards. More pricing tiers. Less clarity.&lt;/p&gt;

&lt;p&gt;At some point, I wasn't moving projects forward anymore.&lt;br&gt;
I was managing software.  That's when I stopped looking for a better tool -  and started building one.&lt;/p&gt;

&lt;p&gt;Productivity doesn't need frameworks. It needs space.&lt;br&gt;
It needs restraint. Most tools fail at that because they're afraid to say no. I didn't build this for enterprises. I didn't build it for managers. And I definitely didn't build it to scale pricing per seat.&lt;/p&gt;

&lt;p&gt;I built it for people who actually do the work - &lt;br&gt;
designers, developers, small teams - who want a calm place to think and move things forward. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What you won't find here&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No onboarding tours&lt;/li&gt;
&lt;li&gt;No feature checklists.&lt;/li&gt;
&lt;li&gt;No "power user" fantasies.&lt;/li&gt;
&lt;li&gt;No upsells hiding behind simplicity&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Just a board.&lt;/strong&gt; ✅ &lt;a href="//f-rello.com"&gt;f-rello.com&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%2Fuploads%2Farticles%2F2iaf5n5xj09zropuzbj4.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%2F2iaf5n5xj09zropuzbj4.png" alt=" " width="800" height="444"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Reduced to what matters. Why it's free? Because focus isn't a luxury.&lt;br&gt;
Because simplicity doesn't need monetization gymnastics.&lt;/p&gt;

&lt;p&gt;And because collaboration shouldn't get more expensive the moment it starts working. If you're happy managing tools, this isn't for you.&lt;br&gt;
If you miss software that gets out of the way - welcome.&lt;/p&gt;

&lt;p&gt;Get **** done&lt;/p&gt;

</description>
      <category>programming</category>
      <category>productivity</category>
      <category>discuss</category>
      <category>startup</category>
    </item>
    <item>
      <title>The Best CSS One-Liner to Improve Performance in 2025</title>
      <dc:creator>Karsten Biedermann</dc:creator>
      <pubDate>Wed, 16 Apr 2025 11:54:49 +0000</pubDate>
      <link>https://dev.to/karsten_biedermann/the-best-css-one-liner-to-improve-performance-in-2025-2o0g</link>
      <guid>https://dev.to/karsten_biedermann/the-best-css-one-liner-to-improve-performance-in-2025-2o0g</guid>
      <description>&lt;p&gt;As CSS continues to evolve in 2025, there’s a powerful one-liner that can dramatically improve layout performance: &lt;strong&gt;contain-intrinsic-size&lt;/strong&gt;. This property, when paired with contain, offers a simple but effective way to optimize rendering performance, particularly for dynamic content and complex layouts. In this article, we'll explore how contain-intrinsic-size works, its practical applications, and how it can be a game-changer for experienced developers.&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%2F0txxe1ujj5szwwgw27my.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%2F0txxe1ujj5szwwgw27my.png" width="800" height="481"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Want to see more and explore in-depth examples?&lt;/strong&gt; Check out my project, CSSToday: &lt;a href="https://csstoday.dev/" rel="noopener noreferrer"&gt;csstoday.dev&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What is contain-intrinsic-size?
&lt;/h3&gt;

&lt;p&gt;The contain-intrinsic-size property in CSS is used in conjunction with the contain property to define the intrinsic size of an element before it is fully rendered. This is particularly useful when you need to control the size of an element that will later be dynamically sized based on its content. It helps prevent unnecessary layout recalculations (reflows) and repaints, making it a crucial tool for performance optimization.&lt;/p&gt;

&lt;h3&gt;
  
  
  Basic syntax
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;element&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="py"&gt;contain&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;layout&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;contain-intrinsic-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;200px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c"&gt;/* Set a temporary size */&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example, the element is initially given a size of 200px while it waits for its final content to be rendered. Once the content is available, the size will be adjusted accordingly.&lt;/p&gt;

&lt;h3&gt;
  
  
  How contain-intrinsic-size works
&lt;/h3&gt;

&lt;h4&gt;
  
  
  1. Temporary placeholder size
&lt;/h4&gt;

&lt;p&gt;The primary use case of contain-intrinsic-size is to provide a temporary placeholder size for elements that will later be resized based on their content or dynamic calculations. This placeholder helps the browser handle layout changes efficiently without triggering unnecessary reflows.&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%2Fnwlqrnozc3nz5mdew7b8.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%2Fnwlqrnozc3nz5mdew7b8.png" width="800" height="1000"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;© Karsten Biedermann&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Example:&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="nc"&gt;.container&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="py"&gt;contain&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;layout&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;contain-intrinsic-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;300px&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;In this example, .container will initially be displayed with a size of 300px, even if its content eventually has a different size. This is particularly helpful when the size of the container needs to be calculated dynamically, and a predefined size helps stabilize the layout.&lt;/p&gt;

&lt;h4&gt;
  
  
  2. Preventing layout shifts
&lt;/h4&gt;

&lt;p&gt;One common issue in web design is &lt;strong&gt;layout shifting&lt;/strong&gt; , where the size and position of elements change during the page load. By using contain-intrinsic-size, you can prevent the browser from recalculating the layout unnecessarily, leading to a more stable layout, especially when loading content asynchronously, images, or dynamically generated components.&lt;/p&gt;

&lt;p&gt;Example:&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="nc"&gt;.card&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="py"&gt;contain&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;layout&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;contain-intrinsic-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;250px&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;This ensures that the .card component initially appears with a predefined size and only adjusts once the actual content is available. This technique is particularly valuable for &lt;strong&gt;lazy loading&lt;/strong&gt; or &lt;strong&gt;asynchronous content loading&lt;/strong&gt; , as it maintains a stable layout before the final data is fully rendered.&lt;/p&gt;

&lt;h4&gt;
  
  
  3. Responsive design flexibility
&lt;/h4&gt;

&lt;p&gt;In modern responsive designs, it’s essential to have containers that adjust to different screen sizes. contain-intrinsic-size can be effectively used to define the size of a container relative to the layout of the parent element or the viewport.&lt;/p&gt;

&lt;p&gt;Example:&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="nc"&gt;.responsive-container&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="py"&gt;contain&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;layout&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;contain-intrinsic-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;50vw&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;In this case, the .responsive-container takes up 50% of the viewport width. This technique can be used to create &lt;strong&gt;fluid layouts&lt;/strong&gt; that work well with dynamic content or images that need to adjust to the container's size.&lt;/p&gt;

&lt;h3&gt;
  
  
  Performance benefits of contain-intrinsic-size
&lt;/h3&gt;

&lt;p&gt;The main benefits of using contain-intrinsic-size lie in &lt;strong&gt;performance optimization&lt;/strong&gt; and the &lt;strong&gt;prevention of layout recalculations&lt;/strong&gt;. In large, complex layouts or on resource-constrained devices, this technique can significantly reduce rendering costs and page load times.&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%2Fira3pt6aztcpo889wfht.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%2Fira3pt6aztcpo889wfht.png" width="800" height="1000"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;© Karsten Biedermann&lt;/em&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Avoiding reflow and repaint
&lt;/h3&gt;

&lt;p&gt;By using contain, an element is treated in its own &lt;strong&gt;isolated layout environment&lt;/strong&gt; , meaning that changes to this element won’t affect adjacent layouts. This is crucial for performance because the browser only needs to recalculate the layout when changes are made to the contents inside the element.&lt;/p&gt;
&lt;h3&gt;
  
  
  Real-world use cases
&lt;/h3&gt;
&lt;h4&gt;
  
  
  Example 1: Optimizing a gallery component
&lt;/h4&gt;

&lt;p&gt;Suppose you have a gallery component that contains images, and the size of the images is not known upfront. Using contain-intrinsic-size ensures that the container always has a predefined size even before the images are fully loaded:&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="nc"&gt;.gallery-item&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="py"&gt;contain&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;layout&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;contain-intrinsic-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;300px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="c"&gt;/* Additional styling for the image */&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Example 2: Lazy loading images
&lt;/h4&gt;

&lt;p&gt;In a lazy-loaded application, you can use contain-intrinsic-size to define the size of the container before the image is fully loaded:&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="nc"&gt;.lazy-image-container&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="py"&gt;contain&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;layout&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;contain-intrinsic-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;400px&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;h4&gt;
  
  
  Example 3: Grid layout usage
&lt;/h4&gt;

&lt;p&gt;In a grid layout where the size of cells depends on their content, contain-intrinsic-size ensures a consistent layout even before the content is available:&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="nc"&gt;.grid-item&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="py"&gt;contain&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;layout&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;contain-intrinsic-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="c"&gt;/* Further layout options */&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;contain-intrinsic-size is a powerful and simple tool for developers who want to optimize the performance of their web applications. By providing a temporary size for elements before their final content is rendered, this property helps avoid unnecessary reflows and repaints, leading to a more stable and efficient layout. It’s particularly valuable for dynamic content, lazy loading, and responsive design, making it an essential part of modern CSS development.&lt;/p&gt;

&lt;p&gt;This one-liner can drastically improve the user experience on your site, ensuring fast and smooth page loads without sacrificing performance or layout stability. Embrace this property in 2025, and take your CSS to the next level!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Want to see more and explore in-depth examples?&lt;/strong&gt; Check out my project, CSSToday: &lt;a href="https://csstoday.dev/" rel="noopener noreferrer"&gt;csstoday.dev&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%2Fuploads%2Farticles%2Fk7k88uu61p3joinj6wg6.gif" 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%2Fk7k88uu61p3joinj6wg6.gif" width="480" height="202"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>css</category>
      <category>programming</category>
      <category>sass</category>
      <category>frontend</category>
    </item>
    <item>
      <title>The Best CSS One-Liner 90% of Developers Aren’t Using in 2025</title>
      <dc:creator>Karsten Biedermann</dc:creator>
      <pubDate>Wed, 02 Apr 2025 11:33:09 +0000</pubDate>
      <link>https://dev.to/karsten_biedermann/the-best-css-one-liner-90-of-developers-arent-using-in-2025-p43</link>
      <guid>https://dev.to/karsten_biedermann/the-best-css-one-liner-90-of-developers-arent-using-in-2025-p43</guid>
      <description>&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%2F0harrd8xjbrzf6v9duou.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%2F0harrd8xjbrzf6v9duou.png" alt=" " width="800" height="481"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do you want more?&lt;/strong&gt; Let’s check out my project, CSSToday: &lt;a href="https://csstoday.dev/" rel="noopener noreferrer"&gt;csstoday.dev/&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  A fix for a problem most developers gave up on
&lt;/h2&gt;

&lt;p&gt;If you’ve been building websites for a while, you’ve run into this:&lt;/p&gt;

&lt;p&gt;A headline wraps onto two lines — and the second line just looks… wrong.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;Build better products with&lt;br&gt;&lt;br&gt;
CSS&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The break feels random. The layout is technically “fine,” but visually unbalanced.&lt;br&gt;&lt;br&gt;
You see it on marketing pages, in CMS-driven layouts, in blog teasers, everywhere.&lt;/p&gt;

&lt;p&gt;And for years, we’ve worked around it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Inserting  tags manually&lt;/li&gt;
&lt;li&gt;Tweaking max-width endlessly&lt;/li&gt;
&lt;li&gt;Writing JavaScript to measure and reflow text&lt;/li&gt;
&lt;li&gt;Or just accepting it and moving on&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Then came:&lt;/strong&gt;  &lt;strong&gt;text-wrap: balance&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  A single line of CSS that quietly fixes a layout problem you’ve probably dealt with for years.
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;h1&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;text-wrap&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;balance&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;That’s it. One line.&lt;/p&gt;

&lt;p&gt;And suddenly, the browser tries to balance the line breaks — distributing the words in a way that &lt;strong&gt;feels more even&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Instead of:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;Design that works&lt;br&gt;&lt;br&gt;
everywhere&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You get:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;Design that&lt;br&gt;&lt;br&gt;
works everywhere&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Same content.&lt;br&gt;&lt;br&gt;
Same layout.&lt;br&gt;&lt;br&gt;
But better rhythm, better readability — and zero effort.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why it’s impressive
&lt;/h2&gt;

&lt;p&gt;Because it solves a real, long-standing problem — without hacks, scripts, or extra markup.&lt;br&gt;&lt;br&gt;
Because it makes line breaking &lt;strong&gt;declarative&lt;/strong&gt;.&lt;br&gt;&lt;br&gt;
Because we finally don’t need to fight it.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No trial-and-error&lt;/li&gt;
&lt;li&gt;No JavaScript&lt;/li&gt;
&lt;li&gt;No “Can we rewrite the headline?” conversations&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Browser support
&lt;/h2&gt;

&lt;p&gt;As of 2025 (&lt;a href="https://caniuse.com/?search=text-wrap%3A%20balance" rel="noopener noreferrer"&gt;caniuse&lt;/a&gt;):&lt;/p&gt;

&lt;p&gt;✅ Chrome&lt;br&gt;
✅ Safari&lt;br&gt;
✅ Firefox&lt;br&gt;
✅ Edge&lt;br&gt;
✅ All major Chromium-based browsers&lt;/p&gt;

&lt;p&gt;No fallbacks required.&lt;br&gt;&lt;br&gt;
If the browser supports it, it improves your layout.&lt;br&gt;&lt;br&gt;
If not, it does nothing — and that’s fine.&lt;/p&gt;

&lt;p&gt;You can ship it today.&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%2Fkbgzqhgej9iwxmfhurs0.gif" 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%2Fkbgzqhgej9iwxmfhurs0.gif" width="452" height="254"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do you want more?&lt;/strong&gt; Let’s check out my project, CSSToday: &lt;a href="https://csstoday.dev/" rel="noopener noreferrer"&gt;csstoday.dev/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>css</category>
      <category>html</category>
      <category>beginners</category>
    </item>
    <item>
      <title>A practical migration handbook from Sass/SCSS to modern native CSS</title>
      <dc:creator>Karsten Biedermann</dc:creator>
      <pubDate>Mon, 31 Mar 2025 11:59:32 +0000</pubDate>
      <link>https://dev.to/karsten_biedermann/a-practical-migration-handbook-from-sassscss-to-modern-native-css-1l88</link>
      <guid>https://dev.to/karsten_biedermann/a-practical-migration-handbook-from-sassscss-to-modern-native-css-1l88</guid>
      <description>&lt;p&gt;Modern CSS has rapidly evolved, integrating many features that were once exclusive to Sass/SCSS. Features like CSS variables, native nesting, color functions, and cascade layers are now built into the language — eliminating the need for a preprocessor in most cases.&lt;/p&gt;

&lt;p&gt;This article provides a practical guide for developers looking to migrate their codebases from SCSS/Sass to modern native CSS. We’ll walk through the essential steps, offer side-by-side comparisons, and suggest strategies to take full advantage of today’s CSS capabilities.&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%2Fm1yeuv7ecvki2xn5ektc.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%2Fm1yeuv7ecvki2xn5ektc.png" alt=" " width="800" height="481"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Migration checklist
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Audit Sass usage:&lt;/strong&gt; Identify all Sass-specific features used (variables, nesting, mixins, functions, &lt;code&gt;@extend&lt;/code&gt;, loops).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check browser support:&lt;/strong&gt; Most modern CSS features have &amp;gt;90% support (Nesting, Custom Properties, Container Queries, etc.).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Start with variables:&lt;/strong&gt; Replace &lt;code&gt;$variable&lt;/code&gt; with &lt;code&gt;--custom-property&lt;/code&gt; and use &lt;code&gt;var(--name)&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Convert mixins/functions:&lt;/strong&gt; Use utility classes, CSS functions (&lt;code&gt;calc&lt;/code&gt;, &lt;code&gt;clamp&lt;/code&gt;, etc.), or restructure.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Eliminate&lt;/strong&gt;  &lt;strong&gt;&lt;code&gt;@extend&lt;/code&gt;/loops:&lt;/strong&gt; Refactor where needed — custom properties and utility patterns help.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reorganize imports:&lt;/strong&gt; Use native CSS imports or combine with build tools.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Test thoroughly:&lt;/strong&gt; Ensure styles render correctly post-migration.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  1. Variables
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Sass Variables&lt;/span&gt;
&lt;span class="nv"&gt;$primary-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mh"&gt;#3498db&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nv"&gt;$secondary-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mh"&gt;#2ecc71&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nv"&gt;$border-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;4px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nc"&gt;.button&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;$primary-color&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;border-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;$border-radius&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="k"&gt;&amp;amp;&lt;/span&gt;&lt;span class="nd"&gt;:hover&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;darken&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$primary-color&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="m"&gt;10%&lt;/span&gt;&lt;span class="p"&gt;);&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;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="c"&gt;/* CSS Custom Properties */&lt;/span&gt;
&lt;span class="nd"&gt;:root&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="py"&gt;--primary-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#3498db&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;--secondary-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#2ecc71&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;--border-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;4px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.button&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--primary-color&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nl"&gt;border-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--border-radius&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.button&lt;/span&gt;&lt;span class="nd"&gt;:hover&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;hsl&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;from&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--primary-color&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;h&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt; &lt;span class="n"&gt;calc&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;l&lt;/span&gt; &lt;span class="n"&gt;-&lt;/span&gt; &lt;span class="m"&gt;10%&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;h3&gt;
  
  
  2. Nesting
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sass"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Sass Nesting&lt;/span&gt;
&lt;span class="nc"&gt;.card&lt;/span&gt; &lt;span class="err"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1rem&lt;/span&gt;&lt;span class="err"&gt;;&lt;/span&gt;

  &lt;span class="nc"&gt;.card-header&lt;/span&gt; &lt;span class="err"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;font-weight&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;bold&lt;/span&gt;&lt;span class="err"&gt;;&lt;/span&gt;

    &lt;span class="nt"&gt;h2&lt;/span&gt; &lt;span class="err"&gt;{&lt;/span&gt;
      &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="err"&gt;;&lt;/span&gt;
    &lt;span class="err"&gt;}&lt;/span&gt;
  &lt;span class="err"&gt;}&lt;/span&gt;

  &lt;span class="nc"&gt;.card-body&lt;/span&gt; &lt;span class="err"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;margin-top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1rem&lt;/span&gt;&lt;span class="err"&gt;;&lt;/span&gt;
  &lt;span class="err"&gt;}&lt;/span&gt;
&lt;span class="err"&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="c"&gt;/* CSS Nesting */&lt;/span&gt;
&lt;span class="nc"&gt;.card&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; &lt;span class="err"&gt;.card-header&lt;/span&gt; &lt;span class="err"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;font-weight&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;bold&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; &lt;span class="err"&gt;h2&lt;/span&gt; &lt;span class="err"&gt;{&lt;/span&gt;
      &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="err"&gt;}&lt;/span&gt;

  &lt;span class="o"&gt;&amp;amp;&lt;/span&gt; &lt;span class="nc"&gt;.card-body&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;margin-top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="err"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3. Color functions
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Sass Color Functions&lt;/span&gt;
&lt;span class="nv"&gt;$base-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mh"&gt;#3498db&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nc"&gt;.primary&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="nv"&gt;$base-color&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.primary-light&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="nf"&gt;lighten&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$base-color&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="m"&gt;15%&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.primary-dark&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="nf"&gt;darken&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$base-color&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="m"&gt;15%&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;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="c"&gt;/* CSS Color Functions */&lt;/span&gt;
&lt;span class="nd"&gt;:root&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="py"&gt;--base-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#3498db&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;--base-color-hsl&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;204&lt;/span&gt; &lt;span class="m"&gt;70%&lt;/span&gt; &lt;span class="m"&gt;53%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.primary&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="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--base-color&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.primary-light&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="n"&gt;hsl&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;from&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--base-color-hsl&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;h&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt; &lt;span class="n"&gt;calc&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;l&lt;/span&gt; &lt;span class="err"&gt;+&lt;/span&gt; &lt;span class="m"&gt;15%&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.primary-dark&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="n"&gt;hsl&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;from&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--base-color-hsl&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;h&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt; &lt;span class="n"&gt;calc&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;l&lt;/span&gt; &lt;span class="n"&gt;-&lt;/span&gt; &lt;span class="m"&gt;15%&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;/* Alternative using color-mix() */&lt;/span&gt;
&lt;span class="nc"&gt;.primary-light-alt&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="n"&gt;color-mix&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;in&lt;/span&gt; &lt;span class="n"&gt;srgb&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--base-color&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="m"&gt;85%&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;white&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.primary-dark-alt&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="n"&gt;color-mix&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;in&lt;/span&gt; &lt;span class="n"&gt;srgb&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--base-color&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="m"&gt;85%&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;black&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;h3&gt;
  
  
  4. Functions
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Sass Functions&lt;/span&gt;
&lt;span class="k"&gt;@function&lt;/span&gt; &lt;span class="nf"&gt;calculate-width&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$columns&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$total&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="m"&gt;12&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;@return&lt;/span&gt; &lt;span class="nf"&gt;percentage&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$columns&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="nv"&gt;$total&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.column-4&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;calculate-width&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;4&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// 33.33333%&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.column-6&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;calculate-width&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// 50%&lt;/span&gt;
&lt;span class="p"&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="c"&gt;/* CSS Calc + Custom Properties */&lt;/span&gt;
&lt;span class="nd"&gt;:root&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="py"&gt;--grid-columns&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;12&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.column-4&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;calc&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;4&lt;/span&gt; &lt;span class="p"&gt;/&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--grid-columns&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="err"&gt;*&lt;/span&gt; &lt;span class="m"&gt;100%&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c"&gt;/* 33.33333% */&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.column-6&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;calc&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;6&lt;/span&gt; &lt;span class="p"&gt;/&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--grid-columns&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="err"&gt;*&lt;/span&gt; &lt;span class="m"&gt;100%&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c"&gt;/* 50% */&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  5. Mixins
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Sass Mixin&lt;/span&gt;
&lt;span class="k"&gt;@mixin&lt;/span&gt; &lt;span class="nf"&gt;button-style&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$color&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;$color&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="no"&gt;white&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="mi"&gt;.5em&lt;/span&gt; &lt;span class="m"&gt;1em&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;border-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;4px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="k"&gt;&amp;amp;&lt;/span&gt;&lt;span class="nd"&gt;:hover&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;darken&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$color&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="m"&gt;10%&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.primary-button&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;@include&lt;/span&gt; &lt;span class="nd"&gt;button-style&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;blue&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.secondary-button&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;@include&lt;/span&gt; &lt;span class="nd"&gt;button-style&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;green&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;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="c"&gt;/* CSS Custom Properties + Classes */&lt;/span&gt;
&lt;span class="nc"&gt;.button&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="no"&gt;white&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0.5em&lt;/span&gt; &lt;span class="m"&gt;1em&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;border-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;4px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--button-color&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.button&lt;/span&gt;&lt;span class="nd"&gt;:hover&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--button-hover-color&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.primary-button&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="py"&gt;--button-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;blue&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;--button-hover-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;darkblue&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.secondary-button&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="py"&gt;--button-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;green&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;--button-hover-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;darkgreen&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;h3&gt;
  
  
  6. Media queries
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Sass Nested Media Queries&lt;/span&gt;
&lt;span class="nc"&gt;.sidebar&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;300px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="k"&gt;@media&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;max-width&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="m"&gt;768px&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="nc"&gt;.sidebar-item&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="k"&gt;@media&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;max-width&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="m"&gt;768px&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="mi"&gt;.5rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&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;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="c"&gt;/* CSS Container Queries */&lt;/span&gt;
&lt;span class="nc"&gt;.sidebar&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;300px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;container-type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;inline-size&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="err"&gt;@media&lt;/span&gt; &lt;span class="err"&gt;(&lt;/span&gt;&lt;span class="nl"&gt;max-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;768px&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="err"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="err"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.sidebar&lt;/span&gt; &lt;span class="nc"&gt;.sidebar-item&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;@container&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;max-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;768px&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nc"&gt;.sidebar-item&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0.5rem&lt;/span&gt;&lt;span class="p"&gt;;&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;&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%2F4j8hf7470yjolr8pcdhy.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%2F4j8hf7470yjolr8pcdhy.png" width="800" height="481"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;If you’re looking for practical tools to support your migration journey, check out &lt;a href="https://csstoday.dev/" rel="noopener noreferrer"&gt;csstoday.dev/&lt;/a&gt; — it features an interactive SCSS-to-CSS converter (including color functions), deeper insights into native CSS features, and a small course with hands-on challenges.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Sass was a game-changer — but CSS has caught up. With the power of native features like variables, nesting, color manipulation, and responsive logic, there’s never been a better time to migrate. This guide helps you modernize your codebase and simplify your tooling. Happy migrating!&lt;/p&gt;

&lt;p&gt;Ready to go all-in on modern CSS? Start with one component and build momentum. You’ll be surprised how much Sass you don’t actually need anymore.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do you want more?&lt;/strong&gt; Let’s check out my project, CSSToday: &lt;a href="https://csstoday.dev/" rel="noopener noreferrer"&gt;csstoday.dev/&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%2Fuploads%2Farticles%2Fdyanplb56ytnhtubnzfk.gif" 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%2Fdyanplb56ytnhtubnzfk.gif" alt=" " width="480" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>css</category>
      <category>html</category>
      <category>beginners</category>
    </item>
    <item>
      <title>From ferris wheels to web animations: trigonometry made simple 😏</title>
      <dc:creator>Karsten Biedermann</dc:creator>
      <pubDate>Fri, 28 Mar 2025 07:53:40 +0000</pubDate>
      <link>https://dev.to/karsten_biedermann/from-ferris-wheels-to-web-animations-trigonometry-made-simple-4289</link>
      <guid>https://dev.to/karsten_biedermann/from-ferris-wheels-to-web-animations-trigonometry-made-simple-4289</guid>
      <description>&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%2Fpqf4wavoqiout05ve0a5.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%2Fpqf4wavoqiout05ve0a5.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Remember those sine, cosine, and tangent functions from math class? The ones associated with right triangles and scary formulas? If they made your head spin (pun intended), you’re not alone. But despite their intimidating reputation, these functions are surprisingly &lt;strong&gt;everywhere&lt;/strong&gt;  — in the music you listen to, the way things move in games and animations, even in how your browser can style a bouncing ball. In this Medium-style tour, we’ll demystify sine, cosine, and tangent (and even their inverses) in plain English. No deep math background needed — just your curiosity. By the end, you’ll see how these “trig” functions form the language of circles and waves that powers much of our digital world.&lt;/p&gt;

&lt;h3&gt;
  
  
  Sine, cosine, and tangent — In plain english
&lt;/h3&gt;

&lt;p&gt;Let’s start with the basics: &lt;strong&gt;sine&lt;/strong&gt; , &lt;strong&gt;cosine&lt;/strong&gt; , and &lt;strong&gt;tangent&lt;/strong&gt; are three functions that relate angles to ratios. That sounds abstract, so imagine a simple scenario: take a right triangle (one angle 90°). Pick one of the other angles and call it θ (theta). Now, sine and cosine are basically telling you &lt;strong&gt;how “tilted” that angle is&lt;/strong&gt; in terms of vertical and horizontal components. In fact, &lt;code&gt;sin(θ)&lt;/code&gt; is defined as the ratio of the triangle’s height to its slanted side (opposite/hypotenuse), and &lt;code&gt;cos(θ)&lt;/code&gt; is the ratio of the base to the slanted side (adjacent/hypotenuse). If those definitions don’t stick, it’s okay – just picture a circle:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Sine&lt;/strong&gt; of an angle gives the vertical component (how far up or down you are on a circle).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cosine&lt;/strong&gt; of an angle gives the horizontal component (how far right or left you are on a circle).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tangent&lt;/strong&gt; of an angle is a bit different — it’s essentially &lt;strong&gt;sine divided by cosine&lt;/strong&gt; (vertical divided by horizontal). It tells you the &lt;em&gt;slope&lt;/em&gt; or steepness corresponding to that angle.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What’s cool is that no matter the size of the triangle or circle, these ratios come out the same for the same angle. Spin around a circle and watch the sine and cosine values: they will always oscillate between -1 and 1. At 0° (facing right on the circle), cos is 1 and sin is 0. At 90° (facing up), sin is 1 and cos is 0. At 180° (left), cos = -1, sin = 0. At 270° (down), sin = -1, cos = 0. By 360° you’re back where you started, and the cycle repeats.&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%2Fbn91ubqo4nje1p981rwm.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%2Fbn91ubqo4nje1p981rwm.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Figure:&lt;/strong&gt; A comparison of the sine function (purple curve) and cosine function (orange dashed curve) over one full cycle (0° to 360°). Notice how cosine is just a shifted version of sine — at 0° cosine is 1 while sine is 0, and by 90° they’ve swapped. Both functions smoothly oscillate between -1 (minimum) and 1 (maximum). Sine starts at 0 and rises to 1 by 90°, whereas cosine starts at 1 and dips to 0 by 90°.&lt;/p&gt;

&lt;p&gt;You can see from the figure that &lt;strong&gt;sine and cosine are like twin waves&lt;/strong&gt;  — cosine is essentially the same wave as sine, just shifted 90° in phase. Both are nice smooth curves. In contrast, &lt;strong&gt;tangent&lt;/strong&gt; is a bit of a wild one: since it’s &lt;code&gt;sin(θ)/cos(θ)&lt;/code&gt;, whenever &lt;code&gt;cos(θ)&lt;/code&gt; gets close to 0 (like near 90° or 270°), the tangent shoots off to very large values (or negative large) – in math speak, it has asymptotes (it blows up to infinity). Tangent is 0 at 0° (because sin(0)/cos(0) = 0/1 = 0), and by 45° tan = 1 (sin and cos are equal there). If you graph tangent it looks different – it doesn’t oscillate up and down like sine/cos; instead it goes up, down, up, down, repeating every 180° with those infinite spikes in between. But don’t worry: in everyday applications we rarely need the crazy parts of tangent, mostly we use it (or its inverse) to &lt;strong&gt;get angles or slopes&lt;/strong&gt; , as we’ll see.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key takeaway:&lt;/strong&gt; Sine and cosine handle the smooth wave-like motion (bounded between -1 and 1), and tangent relates to slope (and can grow unbounded). Next, we’ll explore why these are super useful outside of geometry class.&lt;/p&gt;

&lt;h3&gt;
  
  
  What about the inverses (arcsin, arccos, arctan)?
&lt;/h3&gt;

&lt;p&gt;Sometimes you have the result of a trig function and want to find the angle that produced it. That’s where &lt;strong&gt;inverse trig functions&lt;/strong&gt; come in. The inverse of sine is &lt;strong&gt;arcsine&lt;/strong&gt; (often written &lt;code&gt;asin&lt;/code&gt; or sin⁻¹), the inverse of cosine is &lt;strong&gt;arccosine&lt;/strong&gt; (&lt;code&gt;acos&lt;/code&gt;), and the inverse of tangent is &lt;strong&gt;arctangent&lt;/strong&gt; (&lt;code&gt;atan&lt;/code&gt;). Inverse here means they “undo” the original function. For example, if &lt;code&gt;sin(30°) = 0.5&lt;/code&gt;, then &lt;code&gt;arcsin(0.5) = 30°&lt;/code&gt; (in general, arcsin 0.5 could also give 150°, but by convention arcsin returns the angle in the range –90° to +90°). These inverse functions output an &lt;em&gt;angle&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Arctan (also called &lt;strong&gt;atan2&lt;/strong&gt; when taking two coordinates) is particularly handy in computing and graphics: if you know the horizontal and vertical components of a direction (say a joystick’s x and y or a point’s coordinates), arctan tells you the angle of that direction. In other words, if &lt;code&gt;tan(θ) = opposite/adjacent, then θ = arctan(opposite/adjacent&lt;/code&gt;). This is how, for instance, your phone might compute the tilt angle from accelerometer readings, or how a game figures out that your character should turn 75° to face the target at (x,y). We won’t focus too much on the inverses, but it’s good to know they’re there whenever you need to go from a ratio back to an angle.&lt;/p&gt;

&lt;h3&gt;
  
  
  Waves everywhere: Sine in sound and nature
&lt;/h3&gt;

&lt;p&gt;One of the most fascinating things about the sine function is that it appears everywhere in nature and technology as a fundamental wave shape. A sine wave is the purest form of a repeating oscillation. If you pluck a guitar string or play a single note on a keyboard, the sound you hear can be approximated by a sine wave of a certain frequency. The air molecules vibrate back and forth smoothly — if you graphed the air pressure changes over time, it’d trace out that familiar wavy sine curve. In fact, sine waves occur often in physics — from ocean waves to sound waves and even light waves. A pure tone (like a tuning fork’s note) is essentially a sine wave of air pressure.&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%2Fhucpjqc9fn8j0vp7zvte.jpeg" 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%2Fhucpjqc9fn8j0vp7zvte.jpeg" alt="_Photo by Gabriel Gurrola on Unsplash_"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Your speakers work by moving in and out in a sinusoidal pattern for each pure tone frequency. Why sine? Because it’s a naturally smooth oscillation. Sine is the epitome of a smooth, natural sway. Springs bouncing, pendulums swinging, and atoms vibrating — they all follow (approximately) sinusoidal motion. If you’ve ever seen a graph of a calm heartbeat or a smooth periodic signal, chances are it’s a sine-like shape. Nature loves sine waves because they’re stable and clean; any complicated vibration can actually be broken down into a bunch of sine waves added together (this is called Fourier analysis, which is beyond our scope, but it’s amazing!). So next time you hear a pure musical note or see gentle waves on a pond, you’re experiencing sine (and cosine) in action.&lt;/p&gt;

&lt;h3&gt;
  
  
  Smooth animations: Using sine in web design
&lt;/h3&gt;

&lt;p&gt;So far, we’ve talked about how trig functions describe movements and waves in the real world. Now let’s look at how they’re used in the digital world — specifically in web development and animations. If you’re a web developer or just a visually inclined tech user, you’ve likely seen or created animations that move things around on the screen. Ever notice how good animations don’t move at a constant, robotic speed? Instead, objects often ease in and out of motion — starting slowly, speeding up, then slowing down smoothly to a stop. Guess what underlies many of those smooth motions? Yep, sine (and cosine) curves! A sine wave’s shape — slow at the top, fast through the middle, slow at the bottom — is perfect for creating natural-feeling movement. In fact, an “ease-in-out” timing in CSS or JavaScript animations often mimics a half-sine wave for the speed curve. The object moves fastest at mid-cycle and pauses momentarily at the turn-around points, much like a pendulum. This is far more realistic than a linear start-stop. Many animation libraries use sinusoidal easing functions under the hood to achieve this fluid effect. One author describes it well: linear motion feels constant and abrupt, whereas sine motion eases naturally, like a dance — speeding up, then slowing down gracefully, consider making a ball bob up and down on a webpage. We can use CSS animations to achieve this with a sine-like smoothness. Here’s a quick snippet:&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="nc"&gt;.ball&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;50px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;50px&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="no"&gt;tomato&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;border-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;50%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="c"&gt;/* Animate the ball with a bobbing motion */&lt;/span&gt;
  &lt;span class="nl"&gt;animation&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;bob&lt;/span&gt; &lt;span class="m"&gt;2s&lt;/span&gt; &lt;span class="n"&gt;infinite&lt;/span&gt; &lt;span class="n"&gt;ease-in-out&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;@keyframes&lt;/span&gt; &lt;span class="n"&gt;bob&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="err"&gt;0&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;transform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;translateY&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="c"&gt;/* start at original position */&lt;/span&gt;
  &lt;span class="err"&gt;50&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;transform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;translateY&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;-50px&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="c"&gt;/* move up by 50px at halfway */&lt;/span&gt;
  &lt;span class="err"&gt;100&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;transform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;translateY&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="c"&gt;/* back to start */&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This CSS animation named &lt;code&gt;bob&lt;/code&gt; moves an element (like a div with class "ball") up and then back down. The &lt;code&gt;ease-in-out&lt;/code&gt; timing makes the movement slow down at the top and bottom, approximating that smooth sine-wave vibe. The result is a gentle up-and-down bobbing, as if the ball is attached to an invisible spring. If it were linear (&lt;code&gt;animation-timing-function: linear&lt;/code&gt;), the ball would abruptly switch direction at the top, looking mechanical. With the easing (which is essentially using part of a sine curve), it pauses for a split second at the peak before descending.&lt;/p&gt;

&lt;p&gt;Modern web tech even takes this a step further: &lt;strong&gt;CSS has gained built-in trigonometric functions&lt;/strong&gt;! You can now directly use &lt;code&gt;sin()&lt;/code&gt;, &lt;code&gt;cos()&lt;/code&gt;, &lt;code&gt;tan()&lt;/code&gt; and their inverses in CSS calculations​. This means you could, for instance, position elements in a circle or create oscillating motions without any JavaScript, purely with CSS math. For example, you might see something like:&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="nc"&gt;.element&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="py"&gt;--angle&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;45deg&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;left&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;calc&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;50%&lt;/span&gt; &lt;span class="err"&gt;+&lt;/span&gt; &lt;span class="m"&gt;100px&lt;/span&gt; &lt;span class="err"&gt;*&lt;/span&gt; &lt;span class="n"&gt;cos&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--angle&lt;/span&gt;&lt;span class="p"&gt;)));&lt;/span&gt;
  &lt;span class="nl"&gt;top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;calc&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;50%&lt;/span&gt; &lt;span class="n"&gt;-&lt;/span&gt; &lt;span class="m"&gt;100px&lt;/span&gt; &lt;span class="err"&gt;*&lt;/span&gt; &lt;span class="n"&gt;sin&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--angle&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;In this snippet, &lt;code&gt;--angle&lt;/code&gt; is a CSS variable (here 45°). The element’s left and top positions are calculated using cosine and sine of that angle, effectively placing the element on a circle of radius 100px around the center (50%,50% of the parent). If you then animate &lt;code&gt;--angle&lt;/code&gt; from 0° to 360° (CSS can do this via custom property animation), the element would move in a perfect circle. How cool is that? 🎉 In the past, you’d have needed JavaScript to update the position each frame; now the browser can do it natively with CSS. This kind of capability is cutting-edge (part of the CSS Values and Units Level 4 spec), but it’s already available in modern browsers​ and showcases how important trig functions are even in styling web pages.&lt;/p&gt;




&lt;h2&gt;
  
  
  You can find another example on my project &lt;a href="https://csstoday.dev" rel="noopener noreferrer"&gt;&lt;strong&gt;csstoday.dev&lt;/strong&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/QLE3sMwWjW8"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;




&lt;p&gt;Even without writing CSS from scratch, if you use any no-code or low-code animation tools, when you choose a “circular motion” or a “pendulum swing” preset, you’re indirectly using sine and cosine. If you use a library like GSAP or anime.js and pick a sine easing, you’re literally saying “use a sine function to interpolate this motion.”&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Trigonometric functions might have started as the study of triangles and circles, but they’ve grown into fundamental tools for describing the world — both physical and digital. &lt;strong&gt;Sine, cosine, and tangent are the math behind the music we hear, the waves we see, and the smooth animations we enjoy on our screens.&lt;/strong&gt; They allow us to move from angles to coordinates and back again, making them indispensable for game developers, animators, engineers, and even hobbyist tinkerers.&lt;/p&gt;

&lt;p&gt;Hopefully, this friendly overview shed some light on these functions without giving you a math headache. The next time you see a bouncing icon, a rotating graphic, or hear a clear musical tone, you’ll know that trig functions are quietly at work behind the scenes. Trigonometry is truly the hidden pattern in so many things around us. So here’s to sine, cosine, and tangent — the unsung heroes that make our digital (and natural) worlds go round (and round)! Happy observing, and happy coding if you’re inspired to put these functions to use in your own creative projects.&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%2Fo7twx7unun2gft00nvrk.gif" 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%2Fo7twx7unun2gft00nvrk.gif" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>css</category>
      <category>frontend</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
    <item>
      <title>CSS 2025: More power for modern styling – beyond Sass</title>
      <dc:creator>Karsten Biedermann</dc:creator>
      <pubDate>Wed, 26 Mar 2025 08:51:13 +0000</pubDate>
      <link>https://dev.to/karsten_biedermann/css-2025-more-power-for-modern-styling-beyond-sass-1o50</link>
      <guid>https://dev.to/karsten_biedermann/css-2025-more-power-for-modern-styling-beyond-sass-1o50</guid>
      <description>&lt;p&gt;In my previous article (“&lt;a href="https://dev.to/karsten_biedermann/goodbye-sass-welcome-back-native-css-cf"&gt;Goodbye Sass, Welcome Back Native CSS&lt;/a&gt;”), I demonstrated how the CSS landscape has evolved so quickly that many features formerly exclusive to Sass are now natively available. While that article covered container queries and selectors like :is() and :has(), there’s much more to discover in 2025. Below, we’ll explore several fresh CSS features—from scroll-driven animations to customizable form elements and trigonometric functions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Scroll-driven animations: Dynamic effects while scrolling
&lt;/h2&gt;

&lt;p&gt;Scroll-driven animations let you smoothly bring content into view, highlight specific sections, or gradually transform layouts as the user scrolls. Modern browsers are experimenting with APIs that combine CSS and JavaScript functionality, allowing elements to animate automatically based on scroll position.&lt;/p&gt;

&lt;p&gt;A simple example might be a heading that starts out transparent and fades in as you scroll. Previously, this required complex JavaScript or dedicated scroll libraries. Nowadays, native CSS techniques (in combination with the Intersection Observer or experimental scroll-linked animations) handle the job with fewer performance bottlenecks. Browser vendors continue to push toward an even simpler, more declarative approach.&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="k"&gt;@scroll-timeline&lt;/span&gt; &lt;span class="n"&gt;slide-timeline&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="py"&gt;scroll-source&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;auto&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;orientation&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;block&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;scroll-offsets&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0%&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;100%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.box&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="py"&gt;scroll-timeline&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;slide-timeline&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;animation&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;slide-in&lt;/span&gt; &lt;span class="m"&gt;1s&lt;/span&gt; &lt;span class="n"&gt;linear&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt; &lt;span class="n"&gt;forwards&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;@keyframes&lt;/span&gt; &lt;span class="n"&gt;slide-in&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="err"&gt;0&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;transform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;translateY&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;20px&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nl"&gt;opacity&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="err"&gt;100&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;transform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;translateY&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nl"&gt;opacity&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&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;h2&gt;
  
  
  accent-color: Unified Appearance of Native Form Controls
&lt;/h2&gt;

&lt;p&gt;Another standout feature is accent-color. It lets you adapt native checkboxes, radio buttons, or progress bars to match your color scheme without completely rebuilding custom controls:&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;input&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;"checkbox"&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="py"&gt;accent-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#ff7a00&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;In supported browsers, this property applies a unified accent color to elements like checkboxes. Instead of using hacks or extensive resets, you can retain the inherent accessibility of native widgets while aligning them with your brand design. Chrome, Edge, Safari, and newer Firefox releases already offer solid support for accent-color.&lt;/p&gt;

&lt;h2&gt;
  
  
  Trigonometric functions in css: sin(), cos(), tan()
&lt;/h2&gt;

&lt;p&gt;For advanced layout and animation scenarios, the trigonometric functions sin(), cos(), and tan() open up exciting possibilities. These functions let you calculate values dynamically—particularly useful for spacing, rotations, or wave-like transitions:&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="nc"&gt;.element&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;transform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;translateX&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;calc&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;50px&lt;/span&gt; &lt;span class="err"&gt;*&lt;/span&gt; &lt;span class="n"&gt;sin&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;45deg&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;This approach delivers a flexible movement—no extra JavaScript required. More complex layout effects are also possible. Currently, trig functions are part of CSS Values and Units Level 4, with implementation progressing in all modern browsers.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;a class="mentioned-user" href="https://dev.to/scope"&gt;@scope&lt;/a&gt;: local style scoping
&lt;/h2&gt;

&lt;p&gt;While the above features provide new styling and animation options, &lt;a class="mentioned-user" href="https://dev.to/scope"&gt;@scope&lt;/a&gt; addresses style encapsulation. This rule applies CSS only to specific areas of the DOM:&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="k"&gt;@scope&lt;/span&gt; &lt;span class="p"&gt;(.&lt;/span&gt;&lt;span class="n"&gt;widget&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nt"&gt;h2&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1.2rem&lt;/span&gt;&lt;span class="p"&gt;;&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;Such selective targeting avoids unintended side effects in other parts of the page. Though some browsers have yet to finalize their implementations, &lt;a class="mentioned-user" href="https://dev.to/scope"&gt;@scope&lt;/a&gt; hints at how beneficial it could be for larger codebases needing more modular styles.&lt;/p&gt;

&lt;h2&gt;
  
  
  New color formats: OKLCH for precise colors
&lt;/h2&gt;

&lt;p&gt;Anyone looking for vibrant hues and wide-gamut design should pay attention to OKLCH. Unlike HSL or RGB, OKLCH is a perceptually uniform color model:&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="nc"&gt;.element&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="n"&gt;oklch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;65%&lt;/span&gt; &lt;span class="m"&gt;0.25&lt;/span&gt; &lt;span class="m"&gt;120&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;This yields smoother transitions and consistent contrast. Modern browsers now support Lab, LCH, and OKLCH quite broadly. For older versions, consider adding a fallback color value in hex or RGB.&lt;/p&gt;

&lt;h2&gt;
  
  
  View Transitions API: fluid transitions with minimal JS
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nd"&gt;::view-transition-old&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;opacity&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nd"&gt;::view-transition-new&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;opacity&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;transition&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;opacity&lt;/span&gt; &lt;span class="m"&gt;0.3s&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;It’s already functional in Chrome and Edge, while Safari and Firefox are still catching up. With a suitable fallback, you can begin experimenting in production environments.&lt;/p&gt;

&lt;p&gt;Check out &lt;a href="https://csstoday.dev" rel="noopener noreferrer"&gt;csstoday.dev&lt;/a&gt; for regular posts about modern CSS tips and advanced features. Staying informed will help you adopt new techniques as soon as they become widely available.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&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%2F3xfnvjv53vz2vfbiq48n.gif" 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%2F3xfnvjv53vz2vfbiq48n.gif" alt=" " width="245" height="256"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;By 2025, CSS provides a powerful toolkit: scroll-driven animations, customizable form controls, trigonometric calculations, local scoping, and new color models all streamline modern front-end projects. With widespread browser support, many of these features can already be used today. The future belongs to native CSS—so keep an eye on emerging standards and best practices to stay ahead of the curve.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>css</category>
      <category>html</category>
      <category>beginners</category>
    </item>
    <item>
      <title>AI is changing everything in software development: Top 3 🔥 AI coding assistants</title>
      <dc:creator>Karsten Biedermann</dc:creator>
      <pubDate>Mon, 14 Oct 2024 06:43:04 +0000</pubDate>
      <link>https://dev.to/karsten_biedermann/ai-is-changing-everything-in-software-development-top-3-ai-coding-assistants-2h2d</link>
      <guid>https://dev.to/karsten_biedermann/ai-is-changing-everything-in-software-development-top-3-ai-coding-assistants-2h2d</guid>
      <description>&lt;p&gt;Artificial Intelligence (AI) will change everything in software development. I came to this conclusion at the end of 2023, after over 17 years of traditional programming. It was not easy for me to accept that the times are over when you had to check code line by line during bug fixing, and the nth attempt to deploy a project failed because of a simple error that you had overlooked countless times. Because it was also fun! Or in conversations, only those who understand why one might argue about whether semicolons or single quotes are better could follow along.&lt;/p&gt;

&lt;p&gt;A generational shift is taking place, and in ten years, no one will talk about the great projects we implemented without AI. The next generation of developers will rather wonder why projects were executed so inefficiently. The field of prompt engineering will play a central role in the future and may possibly replace the classic title of "Developer."&lt;/p&gt;

&lt;p&gt;In recent months, I have used several tools that feel like a glimpse into the future when using them. In all of them, I wrote prompts in natural language and focused on code generation using AI. I know that there are many other tools out there; however, some of them simply did not convince me in comparison, which is why I won't even bother recommending them to you. It is important to note that when you use one of these tools, the output may initially be more quantitative than qualitative. This is because the LLMs need to be trained first before they output exactly what you personally want.&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%2Fgidgoh0cjnxa78xto0nn.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%2Fgidgoh0cjnxa78xto0nn.png" alt="chatgpt" width="800" height="404"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  ChatGPT (GPT-4.0, GPT-4.1 Preview)
&lt;/h2&gt;

&lt;p&gt;For me, code generation using ChatGPT is currently indispensable and the best way to exploit the full potential of AI-assisted programming. The suggested code is now so good, except for a few exceptions, that I even delegate simple tasks directly to ChatGPT. It was also interesting for me that it is now possible to generate initial code for a project and output it as a ZIP file. ChatGPT now also remembers your preferences when you use a specific platform or technology and can adjust the output in the context of these specifications. At OpenAI, this is called "Memory." You can imagine that the biggest disadvantage when working with ChatGPT is the endless copy-paste processes, which in my opinion are acceptable because the quality is simply excellent.&lt;/p&gt;

&lt;p&gt;Try it out: &lt;a href="http://chatgpt.com" rel="noopener noreferrer"&gt;http://chatgpt.com&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%2Fuploads%2Farticles%2Fis1xajfwwb6368lb5y0d.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%2Fis1xajfwwb6368lb5y0d.png" alt="cursor ai" width="800" height="404"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Cursor
&lt;/h2&gt;

&lt;p&gt;Cursor is what I envision for the future when I implement software projects using AI. It allows you to ask questions and solve problems directly in your editor, with context from your entire codebase. The editor strongly resembles Visual Studio Code, which is because Cursor is an AI-powered VSCode fork. With Cursor, you can directly highlight existing code components and have the AI make changes via a prompt panel, which you can accept or reject section by section. Cursor can view your entire code in the context of your prompts, which is a huge advantage compared to the direct use of ChatGPT. In contrast to ChatGPT and Copilot, Cursor is context-sensitive. In addition to GPT models, other models such as Claude can also be used.&lt;/p&gt;

&lt;p&gt;Try it out: &lt;a href="https://www.cursor.com/" rel="noopener noreferrer"&gt;https://www.cursor.com/&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%2Fuploads%2Farticles%2F275gh9ncgk9jxth52mai.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%2F275gh9ncgk9jxth52mai.png" alt="github copilot" width="800" height="404"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  GitHub Copilot
&lt;/h2&gt;

&lt;p&gt;GitHub Copilot was one of the first tools to enable the use of GitHub Copilot was one of the first tools to enable the use of prompts within an editor. In contrast to Cursor, however, the use of the AI assistant seems more cumbersome and less intuitive. Questions concerning your entire code file structure are answered by GitHub Copilot with the note that it cannot search data in your project or recommends the search function. Here, the lack of context sensitivity compared to Cursor is clearly noticeable. While you can reference the workspace using [&lt;a class="mentioned-user" href="https://dev.to/workspace"&gt;@workspace&lt;/a&gt;/], this seems less intuitive in my eyes. More on this in the GitHub documentation: &lt;a href="https://docs.github.com/en/copilot/using-github-copilot/asking-github-copilot-questions-in-your-ide#chat-participants" rel="noopener noreferrer"&gt;Chat participants&lt;/a&gt;.&lt;br&gt;
However, within an open file and in the chat panel, Copilot works really well and suggests sensible and valid changes in the code based on your prompts. Interesting are also the slash commands like [&lt;a class="mentioned-user" href="https://dev.to/tests"&gt;@tests&lt;/a&gt;/], which can be entered in the chat panel and can, for example, automatically create unit tests.&lt;/p&gt;

&lt;p&gt;Try it out: &lt;a href="https://github.com/features/copilot" rel="noopener noreferrer"&gt;https://github.com/features/copilot&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Switching between Tools)
&lt;/h2&gt;

&lt;p&gt;In my opinion, switching between different tools is problematic. For example, if an LLM within your ChatGPT account is already well-trained, it seems very tedious to switch to another service or editor, as you basically start from scratch there and have to work with the new tool for a while before achieving a similar quality in code output. Have you had similar experiences in this regard?&lt;/p&gt;

&lt;h2&gt;
  
  
  Challenges
&lt;/h2&gt;

&lt;p&gt;I believe there will be a transition phase where it will be difficult for non-programmers to find prompt engineers who have extensive programming experience and can apply this experience in AI-assisted programming. Traditional CVs will also lose more importance in the future because AI can offer efficient automations that effectively assess a developer’s hard and soft skills. For this reason, I founded devpilot. With devpilot, we want to provide both developers and companies with an optimal process to facilitate collaboration. On devpilot.dev, you will also find exclusively developers who generate code with AI. You can find more information here:&lt;br&gt;
&lt;strong&gt;&lt;a href="https://devpilot.dev/" rel="noopener noreferrer"&gt;https://devpilot.dev/&lt;/a&gt;&lt;/strong&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%2Fdevpilot.dev%2F_next%2Fimage%3Furl%3D%252Ffuture-of-programming%252Fgiphy1.gif%26w%3D1080%26q%3D75" 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%2Fdevpilot.dev%2F_next%2Fimage%3Furl%3D%252Ffuture-of-programming%252Fgiphy1.gif%26w%3D1080%26q%3D75" alt="giphy" width="480" height="292"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The Future
&lt;/h2&gt;

&lt;p&gt;If you have already written code line by line without AI for many years, ask yourself what will really change with AI. In the future, AI will write almost all the code you need for your projects. But of course, there will still be a need for architects. A better comparison is this: similar to pilots whom we trust because strict processes ensure that only those with the necessary knowledge and experience are allowed into the cockpit. This principle also applies to AI in software development: only those with the right skills and understanding can truly use these powerful tools to achieve the best results.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>ai</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Goodbye SASS 👋, welcome back native CSS</title>
      <dc:creator>Karsten Biedermann</dc:creator>
      <pubDate>Wed, 20 Mar 2024 10:39:53 +0000</pubDate>
      <link>https://dev.to/karsten_biedermann/goodbye-sass-welcome-back-native-css-cf</link>
      <guid>https://dev.to/karsten_biedermann/goodbye-sass-welcome-back-native-css-cf</guid>
      <description>&lt;p&gt;Sass has established itself as a powerful preprocessor installed locally, forming the backbone of my projects for over a decade. It enabled me to efficiently organize scalable and stable CSS packages. Even today, I still consider Sass to be an extraordinarily powerful tool. Yet, as we step into the year 2024, it's undeniable that CSS has undergone rapid development. Features that were once unique to Sass are now natively integrated into CSS, including variables and the latest highlight: CSS Nesting.&lt;/p&gt;

&lt;h2&gt;
  
  
  Variables
&lt;/h2&gt;

&lt;p&gt;Defining variables was long seen as a unique strength of SCSS, allowing for the centralized management of many properties, a feature sorely missed in CSS for a long time. Today, however, variables can also be defined in CSS in a manner similar to Sass. A significant difference, however, is that Sass variables exist exclusively within the preprocessor context, while CSS variables can be used in the browser and even dynamically overwritten via JavaScript.&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="nd"&gt;:root&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="py"&gt;--button-padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;10px&lt;/span&gt; &lt;span class="m"&gt;20px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;--button-bg-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#007bff&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;--button-text-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#ffffff&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;--button-border-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;8px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.button&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--button-padding&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--button-bg-color&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="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--button-text-color&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nl"&gt;border-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--button-border-radius&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nl"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;none&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;cursor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;pointer&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;transition&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;background-color&lt;/span&gt; &lt;span class="m"&gt;0.3s&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;h2&gt;
  
  
  CSS Nesting
&lt;/h2&gt;

&lt;p&gt;The ability to define the style rules of one element within another significantly simplifies writing CSS. Instead of repeatedly using the same selector for subordinate elements or pseudo-selectors, nesting allows grouping these within a parent selector. This technique leads to a clear, hierarchically structured, and thus more efficient codebase.&lt;/p&gt;

&lt;p&gt;With &lt;a href="https://caniuse.com/?search=css%20nesting" rel="noopener noreferrer"&gt;browser support&lt;/a&gt; of over 84% for CSS Nesting and 86% for the Nesting Selector, this technique is becoming increasingly accessible.&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="nc"&gt;.blog&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;relative&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1rem&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;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--neutral-100&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="err"&gt;.blog-item&lt;/span&gt; &lt;span class="err"&gt;{&lt;/span&gt;
      &lt;span class="nl"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1px&lt;/span&gt; &lt;span class="nb"&gt;solid&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--neutral-200&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

      &lt;span class="err"&gt;&amp;amp;&lt;/span&gt; &lt;span class="err"&gt;span&lt;/span&gt; &lt;span class="err"&gt;{&lt;/span&gt;
        &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="err"&gt;}&lt;/span&gt;
&lt;span class="err"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  The :is Pseudo-Class
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;:is&lt;/code&gt; pseudo-class revolutionizes the selector concept by accepting a list of selectors and styling all elements that match any of these selectors. This greatly facilitates the selection and styling of elements in the DOM.&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="nd"&gt;:is&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;selector1&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nt"&gt;selector2&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nt"&gt;selector3&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c"&gt;/* styles */&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Instead of long selector lists, you can use :is() to improve readability while avoiding a long selector.&lt;/p&gt;

&lt;h2&gt;
  
  
  The : has() pseudo-class
&lt;/h2&gt;

&lt;p&gt;The CSS pseudo-class &lt;code&gt;:has()&lt;/code&gt; provides a powerful way to select an element based on its descendants, similar to the application of conditional styles.&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="nc"&gt;.hero&lt;/span&gt;&lt;span class="nd"&gt;:has&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;.hero-button&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--accent-50&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;h2&gt;
  
  
  Container queries
&lt;/h2&gt;

&lt;p&gt;Container Queries are considered the most significant innovation in web design since CSS3. They expand the concept of Responsive Design by allowing elements to adjust based on the size of their containers. This technology enables the design of an element to dynamically change depending on the context, leading to a more flexible and adaptive design.&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="nc"&gt;.component&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="py"&gt;--theme&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;dark&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;container-name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;fancy&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;@container&lt;/span&gt; &lt;span class="n"&gt;fancy&lt;/span&gt; &lt;span class="n"&gt;style&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--theme&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;dark&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nc"&gt;.fancy&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c"&gt;/* dark styles. */&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;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.parent-container&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="py"&gt;container-type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;inline-size&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="err"&gt;.headline&lt;/span&gt; &lt;span class="err"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;2rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="k"&gt;@container&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;width&lt;/span&gt; &lt;span class="err"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="m"&gt;720px&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nc"&gt;.headline&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;2.5rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="err"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the container fancy have the variable --theme: dark, add the following CSS.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cascade layers
&lt;/h2&gt;

&lt;p&gt;With cascade layers, we can avoid the nesting of classes, IDs, etc. for higher specificity by assigning our own layer (layer). Using the &lt;code&gt;@layer&lt;/code&gt; at-rule and layered &lt;code&gt;@imports&lt;/code&gt;, we can build our own layers of the cascade - from low-priority styles like resets and defaults, through themes, frameworks, and design systems, to the highest priority styles like components, utilities, and overrides. Cascade layers provide more control.&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="k"&gt;@layer&lt;/span&gt; &lt;span class="n"&gt;utilities&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nc"&gt;.button&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0.5rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="nc"&gt;.button--lg&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0.8rem&lt;/span&gt;&lt;span class="p"&gt;;&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;h2&gt;
  
  
  Future of SASS
&lt;/h2&gt;

&lt;p&gt;Does this mean Sass has become obsolete? Not at all. Mixins and functions, such as the conversion of pixels to rem, remain irreplaceable advantages of Sass. Nevertheless, I have decided to forego Sass for most of my projects. Instead, I use predefined code blocks and packages in my Sublime Editor, which has significantly improved my workflow.&lt;/p&gt;

&lt;h2&gt;
  
  
  Goodbye SASS?
&lt;/h2&gt;

&lt;p&gt;I truly believe that in 2024, the benefits of Sass, including installation, usage, and compilation issues, no longer justify its use. The scalability and user-friendliness of modern CSS make it possible to do without additional tools. &lt;/p&gt;

&lt;p&gt;Do you want more? Let’s check out my project, CSSToday: &lt;a href="//csstoday.dev/"&gt;csstoday.dev/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With the advancement of CSS, I look forward to implementing small and large projects directly and straightforwardly. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Goodbye Sass, and thank you!&lt;/strong&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%2Fuploads%2Farticles%2Fb2v4zu1gxgmiul99ypn9.gif" 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%2Fb2v4zu1gxgmiul99ypn9.gif" alt=" " width="500" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>css</category>
      <category>html</category>
      <category>beginners</category>
    </item>
    <item>
      <title>The power of CSS Variables 💪: A flexible solution for spacing utilities</title>
      <dc:creator>Karsten Biedermann</dc:creator>
      <pubDate>Fri, 15 Mar 2024 07:57:45 +0000</pubDate>
      <link>https://dev.to/karsten_biedermann/the-power-of-css-variables-a-flexible-solution-for-spacing-utilities-4bch</link>
      <guid>https://dev.to/karsten_biedermann/the-power-of-css-variables-a-flexible-solution-for-spacing-utilities-4bch</guid>
      <description>&lt;p&gt;In modern web development, flexibility and adaptability are key aspects that determine the effectiveness and aesthetics of a webpage. CSS variables offer just this flexibility, allowing developers to define values centrally and then reuse and adjust them across the project as needed. A particularly practical application for CSS variables is the control of spacing. This article highlights how CSS variables provide a higher degree of flexibility compared to traditional methods such as modified classes.&lt;/p&gt;

&lt;p&gt;For my Themex project, I've employed spacing utilities in the form of CSS variables. If you want to learn more about the Themex project, please visit here: &lt;strong&gt;&lt;a href="https://app.themexproject.com" rel="noopener noreferrer"&gt;https://app.themexproject.com&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Spacing with CSS Variables
&lt;/h2&gt;

&lt;p&gt;Using spacing variables in web projects allows for flexible adjustment of spacings at different places on a webpage, such as the top or bottom margin of an element. This can significantly speed up and simplify development, as changes to spacing sizes can be easily made globally.&lt;/p&gt;

&lt;h2&gt;
  
  
  A key advantage: Fewer CSS classes
&lt;/h2&gt;

&lt;p&gt;A significant advantage of using CSS variables for spacing is the reduction in the need to write numerous specific CSS classes. Traditionally, developers had to create separate classes for different spacings, leading to a bloated stylesheet and increased complexity. With CSS variables, you can instead define uniform variables for spacings and apply them, simplifying the codebase and easing maintenance.&lt;/p&gt;

&lt;h2&gt;
  
  
  Adding vertical spacing
&lt;/h2&gt;

&lt;p&gt;To add spacing variables to an element, use the element's style attribute and define the desired variables as follows:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML&lt;/strong&gt;&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;div&lt;/span&gt; &lt;span class="na"&gt;style=&lt;/span&gt;&lt;span class="s"&gt;"--space-top: 30px; --space-bottom: 100px;"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;CSS&lt;/strong&gt;&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="k"&gt;@media&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;min-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;992px&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;style&lt;/span&gt;&lt;span class="o"&gt;*=&lt;/span&gt;&lt;span class="s2"&gt;'--space-bottom'&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;margin-bottom&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--space-bottom&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;style&lt;/span&gt;&lt;span class="o"&gt;*=&lt;/span&gt;&lt;span class="s2"&gt;'--space-top'&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;margin-top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--space-top&lt;/span&gt;&lt;span class="p"&gt;);&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;In this example, the element is given a top spacing (space-top) of 30px and a bottom spacing (space-bottom) of 100px.&lt;/p&gt;

&lt;h2&gt;
  
  
  Default behavior for mobile devices
&lt;/h2&gt;

&lt;p&gt;By default, the spacing variables are configured so that the defined spacings are automatically halved for screen widths below 992px. This ensures optimized display on mobile devices without the need for additional adjustments.&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="o"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;style&lt;/span&gt;&lt;span class="o"&gt;*=&lt;/span&gt;&lt;span class="s2"&gt;'--space-top'&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;margin-top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;calc&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--space-top&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;/&lt;/span&gt; &lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;style&lt;/span&gt;&lt;span class="o"&gt;*=&lt;/span&gt;&lt;span class="s2"&gt;'--space-bottom'&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;margin-bottom&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;calc&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--space-bottom&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;/&lt;/span&gt; &lt;span class="m"&gt;2&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;h2&gt;
  
  
  Overriding values for mobile devices
&lt;/h2&gt;

&lt;p&gt;If specific spacings for mobile devices are desired that do not follow the automatic halving, they can be explicitly overridden. This is done by using variables with the suffix -[device]:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML&lt;/strong&gt;&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;div&lt;/span&gt; &lt;span class="na"&gt;style=&lt;/span&gt;&lt;span class="s"&gt;"--space-top-sm: 80px; --space-bottom-sm: 80px;"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;CSS&lt;/strong&gt;&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="c"&gt;/* small devices */&lt;/span&gt;
&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;style&lt;/span&gt;&lt;span class="o"&gt;*=&lt;/span&gt;&lt;span class="s2"&gt;'--space-top-sm'&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;margin-top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--space-top-sm&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;style&lt;/span&gt;&lt;span class="o"&gt;*=&lt;/span&gt;&lt;span class="s2"&gt;'--space-bottom-sm'&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;margin-bottom&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--space-bottom-sm&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;/* medium devices */&lt;/span&gt;
&lt;span class="k"&gt;@media&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;min-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;768px&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;style&lt;/span&gt;&lt;span class="o"&gt;*=&lt;/span&gt;&lt;span class="s2"&gt;'--space-top-md'&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;margin-top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--space-top-md&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;style&lt;/span&gt;&lt;span class="o"&gt;*=&lt;/span&gt;&lt;span class="s2"&gt;'--space-bottom-md'&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;margin-bottom&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--space-bottom-md&lt;/span&gt;&lt;span class="p"&gt;);&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;h2&gt;
  
  
  Why inside a style element and not directly in CSS?
&lt;/h2&gt;

&lt;p&gt;For example, to allow components to be reusable, it is important not to hard-code spacing specifications within the component itself. Of course, it's possible to define default behaviours, but experience shows that this doesn't add value. In 80% of cases, spacing properties are overridden.&lt;/p&gt;

&lt;p&gt;Here is an example of how it can work in practice (build with Themex): &lt;a href="https://example.themexproject.com/" rel="noopener noreferrer"&gt;https://example.themexproject.com/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>css</category>
      <category>html</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Themex's next update includes free and ready-to-use components.</title>
      <dc:creator>Karsten Biedermann</dc:creator>
      <pubDate>Wed, 21 Feb 2024 17:41:01 +0000</pubDate>
      <link>https://dev.to/karsten_biedermann/themexs-next-update-includes-free-and-ready-to-use-components-509h</link>
      <guid>https://dev.to/karsten_biedermann/themexs-next-update-includes-free-and-ready-to-use-components-509h</guid>
      <description>&lt;p&gt;Today, I'm excited to share a quick update on the recent advancements in Themex. Over the past few days, I've dedicated considerable effort to implementing a default design ready for immediate deployment, catering to the high expectations for a quality website UI. I've come to appreciate the critical role of an appealing initial presentation, a pragmatic approach that resonates with me. By now, we've developed a nearly complete starter kit for a website, with the exception of the footer. &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%2Furpodcyf4nry86b3kfeb.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%2Furpodcyf4nry86b3kfeb.png" alt="screen2" width="800" height="479"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  New components added 🚀:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Feature&lt;/li&gt;
&lt;li&gt;Team section&lt;/li&gt;
&lt;li&gt;Content section&lt;/li&gt;
&lt;li&gt;Testimonial&lt;/li&gt;
&lt;li&gt;Pricing section&lt;/li&gt;
&lt;li&gt;Navbar&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here are some visuals of our progress:&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%2F6plvl2e7bpaz51m1bfmd.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%2F6plvl2e7bpaz51m1bfmd.png" alt=" " width="800" height="479"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Explore the updates here: &lt;a href="https://app.themexproject.com" rel="noopener noreferrer"&gt;https://app.themexproject.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What do you think about the new components? As always, I'm looking forward to your feedback 😊!&lt;/p&gt;

</description>
      <category>css</category>
      <category>html</category>
      <category>javascript</category>
      <category>website</category>
    </item>
    <item>
      <title>A new way to build websites! Introducing the next version of Themex</title>
      <dc:creator>Karsten Biedermann</dc:creator>
      <pubDate>Thu, 08 Feb 2024 16:40:28 +0000</pubDate>
      <link>https://dev.to/karsten_biedermann/a-new-way-to-build-websites-introducing-the-next-version-of-themex-41an</link>
      <guid>https://dev.to/karsten_biedermann/a-new-way-to-build-websites-introducing-the-next-version-of-themex-41an</guid>
      <description>&lt;p&gt;Hello everyone! 👋&lt;/p&gt;

&lt;p&gt;First, I want to extend my deepest gratitude to all of you. Here on dev.to and other platforms, I've had the privilege of connecting with some incredible individuals. Every comment on my last article, piece of advice, or even a simple “like” has fuelled my drive to utilize the past days and nights to elevate Themex to the next level. Rather than developing something in isolation, my goal from the start was to collaborate with you to create a razor-sharp tool that could lay a stable foundation for web projects of all kinds. Thanks to your invaluable feedback, the new version of Themex has been significantly shaped by your suggestions. With your support, we've transitioned to an official pilot stage.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://app.themexproject.com" rel="noopener noreferrer"&gt;Visit the pilot of Themex&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the past few days, I've focused on improving the application's stability and refining the UI to enhance clarity and usability. I've also added more documentation. While it's still a work in progress and by no means final, I hope it's a step in the right direction. There are no new components in this release. However, I have enhanced the existing ones with additional attributes you want and divided the Button and Form categories to make customizing the appearance much easier. Also the export of the CSS variables has been made clearer.&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%2Ftyct5mf0q0vwqbgt7p41.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%2Ftyct5mf0q0vwqbgt7p41.png" alt="Screen1" width="800" height="479"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The most significant change and most requested feature was usable snippets for React and Vue.js. The entire markup area now changes dynamically in real time depending on the changed property. This allows variables to be copied directly without having to generate the theme. In addition to React and Vue.js, I am considering developing or integrating snippets for Svelte and Angular. I am also exploring ways to refine the theme generation process. This would include the ability to export theme-specific components in your preferred format, whether it be as raw HTML or as components for React or Vue.js&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%2Fdnnen9429wtv6pd8p4wj.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%2Fdnnen9429wtv6pd8p4wj.png" alt="Screen2" width="800" height="479"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The next steps on the roadmap 🚀
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Designing the theme for both Light and Dark modes (a feature many of you have frequently requested)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Introducing new components and new variants of components soon. At this point, it might be interesting to share how I prefer which components to implement next: I try to focus on those that create the broadest intersection. This is also the reason why there are currently no specific Header or Footer components, as they can be highly individualized. However, this does not mean that Header and Footer components are excluded from future development.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Demonstrating practical use cases&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Expanding the options for theme generation, including the ability to pre-select the output format—be it plain HTML, React, Vue.js, etc.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That's it from me for now. Now I'm looking forward to your feedback.  😊&lt;/p&gt;

&lt;p&gt;Please feel invited to share your thoughts with me also on Discord: &lt;a href="https://discord.gg/whVtcJrz" rel="noopener noreferrer"&gt;https://discord.gg/whVtcJrz&lt;/a&gt;&lt;/p&gt;

</description>
      <category>css</category>
      <category>javascript</category>
      <category>html</category>
      <category>website</category>
    </item>
    <item>
      <title>A new way to build websites? Feedback is needed for my application themex.</title>
      <dc:creator>Karsten Biedermann</dc:creator>
      <pubDate>Mon, 29 Jan 2024 09:02:46 +0000</pubDate>
      <link>https://dev.to/karsten_biedermann/a-new-way-to-build-websites-ask-for-feedback-for-themex-1oj6</link>
      <guid>https://dev.to/karsten_biedermann/a-new-way-to-build-websites-ask-for-feedback-for-themex-1oj6</guid>
      <description>&lt;p&gt;Hello everyone! 👋&lt;/p&gt;

&lt;p&gt;I'm excited to invite you all to explore my newest project: Themex. As a frontend developer, I have often worked with various CSS frameworks such as Bootstrap and Tailwind. However, I noticed a challenge: revisiting a project after a long time and deciphering the work done can be quite daunting.&lt;/p&gt;

&lt;p&gt;This observation led me to develop Themex. My main goal with Themex is to provide a solution that not only prioritizes reproducibility but also ensures clarity and intuitiveness across various website projects. Built with vanilla JavaScript, CSS, and HTML, Themex includes the core web technologies we all care about. The aim is to provide a foundation that can be built in minutes and relevant CSS properties have been included. This is compiled in the browser and then continued later in the IDE.&lt;/p&gt;

&lt;p&gt;I believe Themex could be a practical solution. To get an idea of what Themex offers and how it can transform your workflow, visit &lt;a href="http://themexproject.com/" rel="noopener noreferrer"&gt;http://themexproject.com/&lt;/a&gt; 🚀. I'm excited to hear your feedback and look forward to seeing how I can develop further with your insights!&lt;/p&gt;

</description>
      <category>css</category>
      <category>html</category>
      <category>javascript</category>
      <category>website</category>
    </item>
  </channel>
</rss>
