Socket
Book a DemoInstallSign in
Socket

@wikimedia/codex-design-tokens

Package Overview
Dependencies
Maintainers
22
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wikimedia/codex-design-tokens

Design tokens for Codex in different formats

npmnpm
Version
0.4.0
Version published
Weekly downloads
4.2K
-10.01%
Maintainers
22
Weekly downloads
 
Created
Source

Codex design tokens

This package contains the Codex design tokens and tools needed to build them. These tokens express the visual style of the Codex design system.

Using tokens

The tokens are exported as style variables, and are available in CSS, Less and SASS.

CSS

@import '@wikimedia/codex-design-tokens/theme-wikimedia-ui.css';

.some-class {
	color: var( --color-subtle );
}

Less

@import ( reference ) '@wikimedia/codex-design-tokens/theme-wikimedia-ui.less';

.some-class {
	color: @color-subtle;
}

SASS

@import '@wikimedia/codex-design-tokens/theme-wikimedia-ui.scss';

.some-class {
	color: $color-subtle;
}

Token documentation

For more information about the tokens, including previews of the tokens' values and information about how this package is structured, see the section about tokens on the documentation website.

Building the tokens

You will need to build the tokens in this package to be able to build the codex and codex-docs packages, and to run their development modes. To build the tokens, run npm run build in the packages/codex-design-tokens directory (or run npm run -w @wikimedia/codex-design-tokens build in the root directory).

Build products

The build process outputs the following files in the dist/ directory:

  • theme-wikimedia-ui.css: The tokens as CSS variables (e.g. --color-placeholder: #72777d;)
  • theme-wikimedia-ui.less: The tokens as Less variables (e.g. @color-placeholder: #72777d;)
  • theme-wikimedia-ui.scss: The tokens as SASS variables (e.g. $color-placeholder: #72777d;)
  • theme-wikimedia-ui.json: A JSON structure with detailed data about each token

FAQs

Package last updated on 06 Dec 2022

Did you know?

Socket

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.

Install

Related posts