Design tokens for Protocol, Mozilla’s design system.
Перейти к файлу
dependabot[bot] 8ce4fbb415
Bump remarkable from 1.7.1 to 1.7.4 (#110)
Bumps [remarkable](https://github.com/jonschlinkert/remarkable) from 1.7.1 to 1.7.4.
- [Release notes](https://github.com/jonschlinkert/remarkable/releases)
- [Changelog](https://github.com/jonschlinkert/remarkable/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jonschlinkert/remarkable/compare/1.7.1...v1.7.4)

---
updated-dependencies:
- dependency-name: remarkable
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-21 09:21:32 -07:00
.github Migrate CI to GitHub actions, remove Travis (#99) 2021-10-19 08:20:38 -07:00
gulpfile.js Update the colours to the latest spec. (#37) 2019-07-18 08:25:05 -07:00
tokens Increase value of layout-2xl unit (#82) (#83) 2020-05-08 18:16:38 -07:00
.editorconfig Lint JS and run in CI (Fixes #2) (#8) 2018-05-16 13:39:29 -07:00
.eslintignore Lint JS and run in CI (Fixes #2) (#8) 2018-05-16 13:39:29 -07:00
.eslintrc.js Update ESLint to consume @mozilla-protocol/eslint-config (#33) 2019-02-20 00:49:26 -08:00
.gitignore Removes the /dist folder (#48) 2019-04-04 14:07:54 -07:00
CHANGELOG.md Migrate CI to GitHub actions, remove Travis (#99) 2021-10-19 08:20:38 -07:00
CODE_OF_CONDUCT.md Add Mozilla Code of Conduct file 2019-03-30 15:38:44 +00:00
CONTRIBUTING.md Generate files from tokens (#1) 2018-05-10 15:24:43 -07:00
LICENSE Initial commit 2018-05-10 10:44:34 -07:00
README.md Bump version to 5.0.5 (#84) 2020-05-11 10:33:37 -07:00
package-lock.json Bump remarkable from 1.7.1 to 1.7.4 (#110) 2023-03-21 09:21:32 -07:00
package.json Bump version to 5.0.5 (#84) 2020-05-11 10:33:37 -07:00
stylelint.config.js Update dependencies (#31) 2019-02-15 09:05:09 -08:00

README.md

Protocol Tokens

Design tokens for Protocol, Mozillas design system.

JavaScript · JSON · CSS · SCSS


Information

Package@mozilla-protocol/tokens
Description Design tokens for Protocol, Mozillas design system
Version 5.0.5

Installation

Protocol design tokens are available as an npm package (@mozilla-protocol/tokens) on npm.

The recommended way to use and install design tokens may vary depending on your project; the most common are documented below.

JavaScript package installation

Using npm:

npm install @mozilla-protocol/tokens --save

Using yarn:

yarn add @mozilla-protocol/tokens

JavaScript

In JavaScript, design token names are formatted in lower camelCase.

const tokens = require('@mozilla-protocol/tokens/dist/index');
console.log(tokens.colorBlueLighter); // rgb(0, 0, 0)

In JSON, design token names are formatted in kebab-case.

const tokens = require('@mozilla-protocol/tokens/dist/index.json');
console.log(tokens['color-black']); // rgb(0, 0, 0)

Sass

Sass variables and map keys are formatted in kebab-case.

// Using variables
@import '~@mozilla-protocol/tokens/dist/index';

a {
  color: $color-black;
}

Sass, with CSS Custom Properties

Custom properties are formatted in kebab-case.

// Omit .css at the end of the file
@import '~@mozilla-protocol/tokens/dist/colors/colors.custom-properties';

a {
  color: var(--color-black);
}

Publishing

To publish to the npmjs registry you'll need access to the mozilla-protocol org on npmjs.com. First run gulp to compile the package locally. You can check your local dist folder to verify it has the up-to-date tokens. Then run npm publish.

Contributing

Code of conduct

We have a code of conduct, please follow it in all your interactions with the project.

Contributing guide

Read the contributing guide to learn how to propose changes and understand our development process.

License

The protocol-tokens project is available under the MPL-2.0.