Skip to main content
CSS-Tricks
  • Articles
  • Notes
  • Links
  • Guides
  • Almanac
  • Picks
  • Shuffle
Search

Articles Tagged
Sass

47 Articles
{
,

}
Scattered tangram puzzle.
Direct link to the article Breaking Boundaries: Building a Tangram Puzzle With (S)CSS
CSS games Sass

Breaking Boundaries: Building a Tangram Puzzle With (S)CSS

We put it to the test and it turns out Sass can replace JavaScript, at least when it comes to low-level logic and puzzle behavior. With nothing but maps, mixins, functions, and a whole lot of math, we managed to bring our Tangram puzzle to life, no JavaScript required.
Sladjana Stojanovic on Jun 12, 2025
Direct link to the article Compiling CSS With Vite and Lightning CSS
deployment DevTools Sass

Compiling CSS With Vite and Lightning CSS

Are partials the only thing keeping you writing CSS in Sass? With a little configuration, it's possible to compile partial CSS files without a Sass dependency. Ryan Trimble has the details.
Ryan Trimble on Feb 3, 2025
Direct link to the article How I Made an Icon System Out of CSS Custom Properties
custom properties Sass SVG svg icons

How I Made an Icon System Out of CSS Custom Properties

SVG is the best format for icons on a website, there is no doubt about that. It allows you to have sharp icons no matter the screen pixel density, you can change the styles of the SVG on hover …

Louis Hoebregts on Sep 28, 2022
Direct link to the article A Practical Tip For Using Sass Default Parameters
mixins Sass

A Practical Tip For Using Sass Default Parameters

Sass offers functions and mixins that accept parameters. You can use Sass default parameters, that is, parameters that have a value even if you don’t provide them when the function or mixin is called.

Let’s focus on mixins here. …

Chris Coyier on Jan 13, 2022
Direct link to the article How I Made a Generator for SVG Loaders With Sass and SMIL Options
generator loader Sass SMIL SVG

How I Made a Generator for SVG Loaders With Sass and SMIL Options

While learning Vue.js, I started building free web tools that involved the exploration of SVG, with the goal of learning something about both! Let’s take a look at one of those tools: a generator that makes SVG loaders and …

Mariana Beldi on Aug 26, 2021
Direct link to the article Efficient Infinite Utility Helpers Using Inline CSS Custom Properties and calc()
custom properties mixins Sass sass maps

Efficient Infinite Utility Helpers Using Inline CSS Custom Properties and calc()

I recently wrote a very basic Sass loop that outputs several padding and margin utility classes. Nothing fancy, really, just a Sass map with 11 spacing values, looped over to create classes for both padding and margin on each side. …

Andy Ford on Aug 9, 2021
Direct link to the article Creating Stylesheet Feature Flags With Sass !default
Sass

Creating Stylesheet Feature Flags With Sass !default

!default is a Sass flag that indicates conditional assignment to a variable — it assigns a value only if the variable was previously undefined or null. Consider this code snippet:

$variable: 'test' !default;

To the Sass compiler, this line …

Nathan Babcock on May 14, 2021
Direct link to the article Comparing Styling Methods in 2020
css modules css-in-js less postcss Sass stylus

Comparing Styling Methods in 2020

Over on Smashing, Adebiyi Adedotun Lukman covers all these styling methods. It’s in the context of Next.js, which is somewhat important as Next.js has some specific ways you work with these tools, is React and, thus, is a components-based …

Chris Coyier on Oct 20, 2020
Direct link to the article When Sass and New CSS Features Collide
calc css variables custom properties filter gradients max min Sass

When Sass and New CSS Features Collide

Recently, CSS has added a lot of new cool features such as custom properties and new functions. While these things can make our lives a lot easier, they can also end up interacting with preprocessors, like Sass, in funny …

Ana Tudor on Jun 29, 2020
  • 1
  • 2
  • 3
  • ...
  • 6
  • Older

CSS-Tricks is powered by DigitalOcean.

Keep up to date on web dev

with our hand-crafted newsletter

DigitalOcean
  • About DO
  • Cloudways
  • Legal stuff
  • Get free credit!
CSS-Tricks
  • Contact
  • Write for CSS-Tricks!
  • Advertise with us
Social
  • RSS Feeds
  • CodePen
  • Mastodon
  • Bluesky
Back to Top