fune/toolkit/themes/shared/design-system/tokens-platform.css
Mark Striemer 68b2a33f07 Bug 1850611 - Create a JSON file source of truth for our design tokens. r=reusable-components-reviewers,desktop-theme-reviewers,hjones,dao
* Add light-dark transformer for generating web CSS
* Use value object in design-tokens.json
* Add HCM media queries to built CSS
* Add MPL license and how to edit file header
* Strip '-default' from token names and values
* Refactor generated media query placement within file.
* generate multiple CSS files from a single JSON file.
* add the :host(.anonymous-content-host) selector to the built CSS
* Output tokens in pre-defined order
* Generate CSS layer declarations and relevant selectors
* Sort tokens by t-shirt size and state semantically not alphabetically
* Add remaining tokens to design-tokens.json
* Add design tokens JSON docs

---------

Co-authored-by: Jules Simplicio <jsimplicio@mozilla.com>
Co-authored-by: Hanna Jones <hjones@mozilla.com>
Co-authored-by: Mark Striemer <mstriemer@mozilla.com>
Co-authored-by: Tim Giles <tgiles@mozilla.com>

Differential Revision: https://phabricator.services.mozilla.com/D204108
2024-03-26 16:56:06 +00:00

50 lines
1.7 KiB
CSS

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* DO NOT EDIT this file directly, instead modify design-tokens.json
* and run `npm run build` to see your changes. */
@import url("chrome://global/skin/design-system/tokens-shared.css");
@layer tokens-foundation {
:root,
:host(.anonymous-content-host) {
/** Attention Dot **/
--attention-dot-color: AccentColor;
/** Background Color **/
--background-color-canvas: Canvas;
/** Border **/
--border-color-interactive: color-mix(in srgb, currentColor 15%, var(--color-gray-60));
/** Button **/
--button-background-color: var(--button-bgcolor); /* TODO Bug 1821203 - Gray use needs to be consolidated */
--button-background-color-hover: var(--button-hover-bgcolor);
--button-background-color-active: var(--button-active-bgcolor);
--button-text-color: var(--button-color);
--button-text-color-primary: var(--button-primary-color);
/** Color **/
--color-accent-primary: var(--button-primary-bgcolor, AccentColor);
--color-accent-primary-hover: var(--button-primary-hover-bgcolor);
--color-accent-primary-active: var(--button-primary-active-bgcolor);
/** Font Size **/
--font-size-root: unset;
--font-size-small: unset;
--font-size-large: unset;
--font-size-xlarge: unset;
--font-size-xxlarge: unset;
/** Link **/
--link-color: LinkText;
--link-color-hover: LinkText;
--link-color-active: ActiveText;
--link-color-visited: var(--link-color);
/** Text **/
--text-color: currentColor;
}
}