Security News
Highlights from the 2024 Rails Community Survey
A record 2,709 developers participated in the 2024 Ruby on Rails Community Survey, revealing key tools, practices, and trends shaping the Rails ecosystem.
sass-variable-loader
Advanced tools
Parses your Sass variables and returns an object containing each variable camelCased and the end value as it would be in CSS.
That means full support for Sass' lighten, darken, mix etc.
Input:
$gray-base: #000 !default;
$gray-darker: lighten($gray-base, 13.5%) !default; // #222
$gray-dark: lighten($gray-base, 20%) !default; // #333
$gray: lighten($gray-base, 33.5%) !default; // #555
$gray-light: lighten($gray-base, 46.7%) !default; // #777
$gray-lighter: lighten($gray-base, 93.5%) !default; // #eee
Result:
{
grayBase: '#000',
grayDarker: '#222222',
grayDark: '#333333',
gray: '#555555',
grayLight: '#777777',
grayLighter: '#eeeeee'
}
npm install --save-dev sass-variable-loader
import variables from 'sass-variable-loader!./_variables.scss';
// => returns all the variables in _variables.scss as an object with each variable name camelCased
Note: If you've already defined loaders for Sass files in the configuration, you can override the loader order by writing !!sass-variable-loader!./_variables.scss
to disable all loaders specified in the configuration for that module request.
You can pass options to the loader via query parameters.
import variables from 'sass-variable-loader?preserveVariableNames!./_variables.scss';
// => returns all the variables in _variables.scss as an object with each variable name left intact
v 0.1.2
FAQs
Sass variable loader module for webpack
The npm package sass-variable-loader receives a total of 653 weekly downloads. As such, sass-variable-loader popularity was classified as not popular.
We found that sass-variable-loader demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 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
A record 2,709 developers participated in the 2024 Ruby on Rails Community Survey, revealing key tools, practices, and trends shaping the Rails ecosystem.
Security News
In 2023, data breaches surged 78% from zero-day and supply chain attacks, but developers are still buried under alerts that are unable to prevent these threats.
Security News
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.