
Security News
Critical Security Vulnerability in React Server Components
React disclosed a CVSS 10.0 RCE in React Server Components and is advising users to upgrade affected packages and frameworks to patched versions now.
@odopod/odo-sassplate
Advanced tools
Delete-key friendly SCSS boilerplate.
npm install @odopod/odo-sassplate --save
styles.scss to your scss directory in your project (probably somewhere like src/css/).@imports to reference the files in node_modules, similar to how normalize.css is used.npm install node-sass-json-importer --save-dev
At this point, you should be able to compile your SCSS without any issues.
extensions/variables.json, extensions/type-definitions.json, and extensions/component-definitions.json into your source CSS._imports.scss file from Sassplate into your source CSS._imports.scss to make sure the @import paths are correct._imports.scss in your new styles.scss to reference the new file..json files and recompile your CSS. You should see the change.To make changes to styles from the Sassplate, you can add styles which override the existing ones, or replace the .scss file with your own copy.
All variables in extensions/_variables.scss are declared with !default, meaning it will assign the variable if it is not already assigned. This allows you to overwrite the variables without duplicating the file.
Sassplate adds mixins as well. For details and method signatures, check out _mixins.scss. Here's a list of them:
The basic structure for each json file looks like this:
{
"scss-variable-name": {
"Group Name in Style Guide": {
"selector": {
"property": "value"
}
}
}
}
The above JSON would generate the following CSS:
.selector {
property: value;
}
Some properties are treated differently than others.
Properties which expect a length (like width, padding-top, etc.) will append px if the unit is left off.
Properties which expect a color (like color, border-color, etc.) will use the get-color function to find the color you have defined in variables.json colors property.
For focus, hover, and active states, supply a new object with those styles:
"btn": {
"focus": {
"outline-color": "blue"
},
"hover": {
"color": "white",
"background-color": "blue"
},
"active": {
"background-color": "mediumseagreen"
}
}
.btn:focus {
outline-color: #1b9ec6;
}
.btn:hover {
color: white;
background-color: #1b9ec6;
}
.btn:active {
background-color: mediumseagreen;
}
docs-demoTo display a demo of your component in Odo Style Guide, use the docs-demo property.
"btn": {
"docs-demo": {
"demo-markup": "'<button class=\"btn\">Sign In</button>'",
"dark-background": true
}
}
Other boolean options you may add to docs-demo are text-center, dark-background, or light-background.
breakpointsTo style the selector at breakpoints, add the breakpoints property.
"type-title-1": {
"font-size": 30,
"breakpoints": {
"sm": {
"font-size": 40
},
"md": {
"font-size": 50
}
}
}
.type-title-1 {
font-size: 30px;
}
@media (min-width: 768px) {
.type-title-1 {
font-size: 40px;
}
}
@media (min-width: 1024px) {
.type-title-1 {
font-size: 50px;
}
}
childrenTarget children of the current selector with children. Notice the selector is wrapped in single quotes so that it remains a valid string when converted to SCSS.
"btn": {
"children": {
"'.btn__text'": {
"display": "inline-block",
"vertical-align": "middle"
}
}
}
.btn .btn__text {
display: inline-block;
vertical-align: middle;
}
qualifiersQualifiers are for overriding properties based on a class on the element.
"btn": {
"qualifiers": {
"en": {
"line-height": 1.5,
},
"zh": {
"color": "mediumseagreen"
}
}
}
.en .btn {
line-height: 1.5;
}
.zh .btn {
color: mediumseagreen;
}
modifiersModifiers are variants of a class, with only a few attributes that are different. For example, a .btn with an icon in it might need styles applied to the icon within it.
"btn": {
"color": "blue",
"modifiers": {
"icon": {
"padding-right": 12,
"children": {
"'.icon'": {
"margin-right": 8
}
}
}
}
}
.btn {
color: #1b9ec6;
}
.btn--icon {
padding-right: 12px;
}
.btn--icon .icon {
margin-right: 8px;
}
rawAllow any selector to be appended to the main selector.
"btn": {
"raw": {
"'::after'": {
"content": "'Sassplate'"
}
}
}
.btn::after {
content: "Sassplate";
}
Visit the Odo component directory for demos, code examples, and documentation.
FAQs
Delete-key friendly SCSS boilerplate.
We found that @odopod/odo-sassplate demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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
React disclosed a CVSS 10.0 RCE in React Server Components and is advising users to upgrade affected packages and frameworks to patched versions now.

Research
/Security News
We spotted a wave of auto-generated “elf-*” npm packages published every two minutes from new accounts, with simple malware variants and early takedowns underway.

Security News
TypeScript 6.0 will be the last JavaScript-based major release, as the project shifts to the TypeScript 7 native toolchain with major build speedups.