
Product
Socket Now Supports pylock.toml Files
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
docusaurus-plugin-sass
Advanced tools
Provides support for SASS/SCSS to Docusaurus v2.
yarn add docusaurus-plugin-sass sass
sass-loader
requires you to install either Dart Sass or Node Sass on your own (more documentation can be found at sass-loader
).
docusaurus.config.js
file.// docusaurus.config.js
module.exports = {
...
+ plugins: ['docusaurus-plugin-sass'],
...
}
global styles
and CSS modules
.Assuming you are using @docusaurus/preset-classic
(or @docusaurus/theme-classic
), you can set
the customCss
property to point to yous Sass/SCSS file:
// docusaurus.config.js
module.exports = {
presets: [
[
'@docusaurus/preset-classic',
{
...
theme: {
customCss: require.resolve('./src/css/custom.scss'),
},
...
},
],
],
};
To style your components using modules, name your stylesheet files with the .module.scss suffix (e.g. welcome.module.scss). Webpack will load such files as CSS modules and you have to reference the class names from the imported CSS module (as opposed to using plain strings). This is similar to the convention used in Create React App.
/* styles.module.scss */
.main {
padding: 12px;
article {
color: #ccc;
}
}
import styles from './styles.module.scss';
function MyComponent() {
return (
<main className={styles.main}>
<article>Lorem Ipsum</article>
</main>
);
}
FAQs
Docusaurus plugin to provide support for SASS/SCSS
The npm package docusaurus-plugin-sass receives a total of 40,387 weekly downloads. As such, docusaurus-plugin-sass popularity was classified as popular.
We found that docusaurus-plugin-sass demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
Security News
Research
Socket uncovered two npm packages that register hidden HTTP endpoints to delete all files on command.
Research
Security News
Malicious Ruby gems typosquat Fastlane plugins to steal Telegram bot tokens, messages, and files, exploiting demand after Vietnam’s Telegram ban.