🌐
Sass
sass-lang.com › guide
Sass: Sass Basics
To create a mixin you use the @mixin directive and give it a name. We’ve named our mixin theme. We’re also using the variable $theme inside the parentheses so we can pass in a theme of whatever we want.
Blog
Posted 23 October 2025 by Natalie Weizenbaum · LibSass and the packages built on top of it have been deprecated since October 2020. In the five years since we made that announcement, the Sass language has continued to evolve to support the latest CSS features like color spaces, and embedded ...
Install
There are a good many applications that will get you up and running with Sass in a few minutes for Mac, Windows, and Linux. You can download most of the applications for free but a few of them are paid apps (and totally worth it) · The Sass team maintains two Node.js packages for Sass, both ...
Playground
Sass © 2006–2026 the Sass team, and numerous contributors. It is available for use and modification under the MIT License
Documentation
It allows you to use variables, nested rules, mixins, functions, and more, all with a fully CSS-compatible syntax. Sass helps keep large stylesheets well-organized and makes it easy to share design within and across projects. If you’re looking for an introduction to Sass, check out the tutorial.
🌐
TutorialsTeacher
tutorialsteacher.com › sass › sass-mixins
Sass - Mixins
Sass makes it easy: just pass the ... ... @mixin a-button($base, $hover, $link) { a { background-color: $base; color: white; radius: 3px; margin: 2px; &:hover { color: $hover; } &:visited { color: $link; } } }...
🌐
Sass
sass-lang.com › documentation › at-rules › mixin
Sass: @mixin and @include
In addition to taking arguments, a mixin can take an entire block of styles, known as a content block. A mixin can declare that it takes a content block by including the @content at-rule in its body. The content block is passed in using curly braces like any other block in Sass, and it’s injected in place of the @content rule.
🌐
KoderHQ
koderhq.com › tutorial › sass › mixin
Sass/SCSS Mixins, Functions & @includes Tutorial | KoderHQ
Learn how to group sections of code and reuse them throughout our entire project with mixins and functions. We cover how to define mixins & functions, how to @include mixins and invoke functions and how to add parameters and default fallback parameters. Lastly we cover the differences between ...
🌐
MarkSheet
marksheet.io › sass-mixins.html
Sass mixins - Free tutorial to learn HTML and CSS
The div.highlighter-rouge will use the mixin’s default values: ... The .css and .scss versions, because their parameters are set, will use different labels and colors. If you don’t want to spend time writing your own Sass mixins, you can use any of the following mixin libraries:
🌐
W3Schools
w3schools.com › sass › sass_mixin_include.asp
Sass @mixin and @include
Sass String Sass Numeric Sass List Sass Map Sass Selector Sass Introspection Sass Color ... The @mixin directive lets you create CSS code that is to be reused throughout the website.
🌐
freeCodeCamp
freecodecamp.org › news › how-to-pass-arguments-to-mixins
How to Use Mixins in Sass and Pass Arguments – With Code Examples
September 8, 2025 - Mixins are my favorite thing about Sass. They made my life so much easier, so I wanted to show you how they can do the same for you. Mixins can be a bit tricky to understand at first, but don't worry. You'll get the hang of it by practicing and
🌐
TutorialsPoint
tutorialspoint.com › sass › defining_a_mixin.htm
Sass - Defining a Mixin
<html> <head> <title> Mixin example of sass</title> <link rel = "stylesheet" type = "text/css" href = "sample.css"/> </head> <body> <div class = "cont"> <h1>Example using include</h1> <h3>Directive is used to define the Mixins, it includes variables and argument optionally.</h3> </div> </body> </html>
Find elsewhere
🌐
EDUCBA
educba.com › home › software development › software development tutorials › css tutorial › sass mixins
SASS Mixins | How do Mixins in SASS Work in the HTML Page?
April 13, 2023 - Guide to SASS Mixins. Here we also discuss the definition and how do mixins work in sass along with different examples and its code.
Address   Unit no. 202, Jay Antariksh Bldg, Makwana Road, Marol, Andheri (East),, 400059, Mumbai
🌐
Telerik
telerik.com › blogs › mixins-sass
Mixins in Sass
August 11, 2021 - This has been a quick overview of mixins in Sass, why they are important, their syntax and how they can be used in your workflow moving forward. This also highlights efficiency advantages that comes with mixins. Happy hacking. ... Nwose Lotanna Victor is a web technology enthusiast who documents his learning process with technical articles and tutorials...
🌐
Medium
medium.com › @pixelwibes › streamline-your-css-code-with-scss-mixins-a-beginners-guide-c2e137d4c355
Streamline Your CSS Code with SCSS Mixins: A Beginner’s Guide | by Pixelwibes | Medium
May 31, 2023 - Streamline Your CSS Code with SCSS Mixins: A Beginner’s Guide SCSS (Sass) mixins are reusable blocks of code that can be used in your CSS to simplify your code and make it more modular. Mixins can …
🌐
GitHub
github.com › drublic › Sass-Mixins
GitHub - drublic/Sass-Mixins: Sass mixins for general use
In general you should include the file mixins.scss in build into your project and use the mixins as suggested in the docs for each mixin. You can install the package using Bower. Please run · $ bower install --save-dev sass-mixins · in your project's root directory to install the mixins repository.
Starred by 549 users
Forked by 66 users
Languages   CSS 91.9% | HTML 6.6% | JavaScript 1.5% | CSS 91.9% | HTML 6.6% | JavaScript 1.5%
🌐
DEV Community
dev.to › alemesa › 10-awesome-sass-scss-mixins-5ci2
10 Awesome SASS (SCSS) Mixins - DEV Community
April 29, 2020 - @mixin box($width, $height: $width) { width: $width; height: $height; } /* ===== Usage ===== */ div { // You can pass width && height @include box(200px, 300px); /* or just pass width and the height will default to the width value */ @include ...
🌐
SitePoint
sitepoint.com › blog › css › sass basics: the sass mixin directive
Sass Basics: The Sass Mixin Directive — SitePoint
November 7, 2024 - Reggie Dawson goes in depth and shows how to use the Sass mixin directive to write better organized and maintainable CSS code.
🌐
Sass
sass-lang.com › documentation › values › mixins
Sass: Mixin Values
@mixin apply-to-all($mixin, $list) { @each $element in $list { @include meta.apply($mixin, $element); } } @mixin font-class($size) { .font-#{$size} { font-size: $size; } } $sizes: [8px, 12px, 2rem]; @include apply-to-all(meta.get-mixin("font-class"), $sizes); ... @use "sass:meta" @use "sass:string" /// Passes each element of $list to a separate invocation of $mixin.
🌐
Quackit
quackit.com › sass › tutorial › sass_mixins.cfm
Sass Mixins
How to use Sass mixins to group CSS declarations, and generally reduce the amount of code you need to write.
🌐
Medium
medium.com › free-code-camp › sass-mixins-and-loops-171122499a2
How to use Sass Mixins and Loops
September 11, 2017 - In the simplest terms, you can think of a Mixin like a JavaScript function for CSS. You define a Mixin somewhere in your Sass code and pass it parameters that you reference inside of the Mixin.
🌐
Javatpoint
javatpoint.com › sass-mixins
SASS mixins - javatpoint
SASS mixins with examples on commands, script, rules, directives, expression, nesting, inheritance, mixin, import, extending, scss, variables, operators, preprocessing etc.
🌐
Studytonight
studytonight.com › sass › sass-mixins-and-include
SASS: @mixins and @include - Studytonight
Note that in the above example we are passing the parameters in the mixins, just like we do in functions in other programming languages. So in this tutorial, we learned all about SASS mixins and how to call them in our CSS wherever we want.