
Security News
Next.js Patches Critical Middleware Vulnerability (CVE-2025-29927)
Next.js has patched a critical vulnerability (CVE-2025-29927) that allowed attackers to bypass middleware-based authorization checks in self-hosted apps.
@roots/bud-sass
Advanced tools
Sass support for @roots/bud projects.
Install @roots/bud-sass to your project.
Yarn:
yarn add @roots/bud-sass --dev
npm:
npm install @roots/bud-sass --save-dev
After installation, sass will automatically preprocess any .scss
or .sass
modules in your project with sass.
Additionally, if @roots/bud-postcss is available, postcss will be applied to your .scss
and .sass
source files.
If you are using @roots/bud-preset-recommend, @roots/bud-preset-wordpress, or @roots/sage then postcss is automatically applied.
Use the bud.sass.importGlobal
function to ensure a module is made available throughout your sass stylesheets, regardless of scope.
bud.sass.importGlobal("@src/styles/variables");
If you have more than one stylesheet to import, you may use an array:
bud.sass.importGlobal([
"@src/styles/variables",
"@src/styles/mixins",
"@src/styles/functions",
]);
Use the bud.sass.registerGlobal
function to ensure global styles are made available throughout your sass stylesheets, regardless of scope.
This function differs from bud.sass.importGlobal
in that it can be passed arbitrary values.
bud.sass.registerGlobal("$foo: rgba(0, 0, 0, 1);");
If you want to divide these values up using an array, you may do so.
bud.sass.registerGlobal([
"$foo: rgba(0, 0, 0, 1);",
"$bar: rgba(255, 255, 255, 1);",
]);
When using @roots/bud-sass
, you will find that the url()
function is not working as expected. This is because the url()
function is relative to the target file, not the source file and Sass does not support url rewriting.
A few options are available to work around this.
~
The ~
prefix is a convention used to indicate that the path should be resolved by webpack. It works with aliases.
Let's say you have an alias set up for @fonts
:
url(~@fonts/muh-font.woff)
bud.js will resolve absolute paths to whatever you have set as the @src
directory.
url(/fonts/muh-font.woff)
This is the simplest option to understand and the most annoying to maintain. It is on you to ensure that the relative path is correct.
url(../fonts/muh-font.woff)
Contributions are welcome from everyone.
We have contribution guidelines to help you get started.
@roots/bud-sass is licensed under MIT.
Keep track of development and community news.
bud.js is an open source project and completely free to use.
However, the amount of effort needed to maintain and develop new features and projects within the Roots ecosystem is not sustainable without proper financial backing. If you have the capability, please consider sponsoring Roots.
FAQs
Sass support for @roots/bud projects.
We found that @roots/bud-sass demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Next.js has patched a critical vulnerability (CVE-2025-29927) that allowed attackers to bypass middleware-based authorization checks in self-hosted apps.
Security News
A survey of 500 cybersecurity pros reveals high pay isn't enough—lack of growth and flexibility is driving attrition and risking organizational security.
Product
Socket, the leader in open source security, is now available on Google Cloud Marketplace for simplified procurement and enhanced protection against supply chain attacks.