npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@wikimedia/codex-design-tokens

v2.4.0

Published

Design tokens for Codex in different formats

Readme

@wikimedia/codex-design-tokens

Codex is the design system for Wikimedia.

This package contains design tokens that express the visual style of the Codex design system. Tokens are exported as style variables, and are available in CSS, Less and SASS.

Refer to the design tokens overview documentation for links to a complete list of tokens with demos and guidelines.

Usage

Refer to the installation and using design tokens documentation for information about how to use Codex design tokens in your application.

Available Files

The following files are included in the dist/ directory when you install this package or run the build commands locally:

Main Token Files

  • theme-wikimedia-ui.less: This is the main tokens file used in MediaWiki. All tokens are defined as Less variables. Tokens for color-modes or font-modes reference CSS custom properties so that their values can be dynamically updated at runtime.
  • theme-wikimedia-ui.css: Defines all design tokens as CSS custom properties. Experimental.
  • theme-wikimedia-ui.scss: Defines all design tokens as Sass variables. Experimental.
  • theme-wikimedia-ui.js: Exports all tokens in JavaScript format (ESM). Experimental.
  • theme-wikimedia-ui.json: JSON data for all tokens from the style-dictionary source.

CSS Custom Properties

  • theme-wikimedia-ui-root.css: This is a CSS file which contains a :root {} declaration that sets all mode-specific custom properties to their default values. If you want to support the various "modes" that Codex provides (alternate token values that can be changed at runtime), load this file as a starting point. This file is intended to be used alongside the theme-wikimedia-ui.less file listed above.

Mode Files

These CSS files re-define specific custom properties on the :root {} declaration with alternate values particular to a specific "mode" (a dark color scheme, a larger base font size, etc.). They can be loaded as needed and are intended to override the default values defined in theme-wikimedia-ui-root.css or theme-wikimedia-ui.css.

  • theme-wikimedia-ui-mode-dark.css: Dark mode color CSS custom properties
  • theme-wikimedia-ui-mode-small.css: Small font mode CSS custom properties
  • theme-wikimedia-ui-mode-large.css: Large font mode CSS custom properties
  • theme-wikimedia-ui-mode-x-large.css: Extra large font mode CSS custom properties

Less Mixins

Each of these files defines a specific Less mixin (i.e. cdx-mode-dark()) that loads an alternate set of token values but limits the scope to whatever selector it is called in. Use these mixins if you need more granular control over how modes are used in your application (for example, if only some sections of the page should change based on user font-mode preference, these mixins could be used).

  • theme-wikimedia-ui-mixin-dark.less: Dark mode as a Less mixin
  • theme-wikimedia-ui-mixin-light.less: Light mode as a Less mixin (aka color mode reset)
  • theme-wikimedia-ui-mixin-small.less: Small font mode as a Less mixin
  • theme-wikimedia-ui-mixin-medium.less: Medium font mode as a Less mixin (aka font mode reset)
  • theme-wikimedia-ui-mixin-large.less: Large font mode as a Less mixin
  • theme-wikimedia-ui-mixin-x-large.less: Extra large font mode as a Less mixin
  • theme-wikimedia-ui-mixin-mode-reset.less: Reset all modes (both color and font modes) using the .cdx-mode-reset() mixin.

Building from source

For information about building design tokens from the source code, refer to BUILDING.md.