Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@biom3/design-tokens
Advanced tools
![BIOM3-textured-logos-10](https://user-images.githubusercontent.com/1452237/205792502-2b1e7d79-6f0e-42dc-a455-dbcb5506cef1.png)
This package publishes via CICD to the public npm component: @biom3/design-tokens
. To read more, see the theming & tokenisation proposal document.
To see an overview of the entire design-tokens taxonomy, see this document.
Through this component we expose our complete library of BIOME design tokens. They are made available for use as both:
To use the typescript design-tokens, simply import them from the root of the pacakge. For example:
import { base } from '@biom3/design-tokens';
BIOME's default colour scheme is onLight. Therefore, when you import the base
, or onLightBase
design-tokens, you will get ONLY the onLight colors and gradients.
To use these design-token variables inside bespoke react typescript components:
import {
onDarkBase,
onLightBase,
smartPickTokenValue,
} from '@biom3/design-tokens';
const DemoComponent = () => (
<div
style={{
fontSize: onLightBase.text.body.medium.regular.fontSize,
color: smartPickTokenValue(onDarkBase, 'base.color.brand.1'),
}}
>
test component text
</div>
);
All the BIOME design-tokens can be imported and used as simple css-variables, by importing css files from your App code. For example:
import '@biom3/design-tokens/css/base-onLight.global.css'; // contains all "onLight" BASE design-tokens
// import "@biom3/design-tokens/css/base-onDark.global.css"; // contains all "onDark" BASE design-tokens
import '@biom3/design-tokens/css/text.global.css'; // contains all fonts (@font-face) imports
*@NOTE All css-variable declarations are global styles scoped to the body selector, thus the base design-token files will overwrite each other, so you should only use 1 base design-token css file at a time. Choose the theme css file based on whether you are planning to display UI in "onDark" or "onLight" (or add your own!).
To see a complete listing of all available design-token css-variables, you can inspect the body element inside your browser's dev tools. For example:
Then, to use these css-variable design-tokens:
/* some custom styles.css file: */
@import '@biom3/design-tokens/css/base-onDark.global.css';
@import '@biom3/design-tokens/css/text.global.css';
/* your bespoke item class styles */
.headingText {
color: var(--base-color-brand-1);
}
FAQs
![BIOM3-textured-logos-10](https://user-images.githubusercontent.com/1452237/205792502-2b1e7d79-6f0e-42dc-a455-dbcb5506cef1.png)
We found that @biom3/design-tokens 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.