diff --git a/.changeset/pre.json b/.changeset/pre.json index 9f320481e7b..ad9e8cd8b79 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -88,7 +88,6 @@ "@spectrum-css/typography": "8.0.1", "@spectrum-css/underlay": "6.0.1", "@spectrum-css/well": "7.0.1", - "@spectrum-tools/postcss-rgb-mapping": "1.0.0", "@spectrum-tools/stylelint-no-missing-var": "2.0.1", "@spectrum-tools/stylelint-no-unknown-custom-properties": "2.0.2", "@spectrum-tools/stylelint-no-unused-custom-properties": "2.0.3", diff --git a/.eslintrc b/.eslintrc index f422aa9e96a..f637c2c6d15 100644 --- a/.eslintrc +++ b/.eslintrc @@ -19,6 +19,7 @@ "semi": ["warn", "always"], "space-before-blocks": ["warn", "always"] }, + "ignorePatterns": ["!.storybook"], "overrides": [ { "files": ["*.json"], diff --git a/.github/QUICK-START.md b/.github/QUICK-START.md index 4b97fcab7e8..68350b21b25 100644 --- a/.github/QUICK-START.md +++ b/.github/QUICK-START.md @@ -10,27 +10,54 @@ Install the components you want along with their dependencies. Here's an example yarn add -DW @spectrum-css/tokens @spectrum-css/typography @spectrum-css/page @spectrum-css/icon @spectrum-css/button ``` -Spectrum CSS components utilize custom properties in order to change themes and scales. For these to apply, a couple of classes need to be added to the document’s `` tag based on the [visual language](https://github.com/adobe/spectrum-css?tab=readme-ov-file#visual-language), [scale](https://github.com/adobe/spectrum-css?tab=readme-ov-file#scales), and [theme](https://github.com/adobe/spectrum-css?tab=readme-ov-file#themes-colorstops) you wish to use. For example, the following code snippet will display styling for the default Spectrum visual language using medium scale and light color theme: +Spectrum CSS components utilize custom properties in order to express our design language through a set of core tokens. We leverage the `@adobe/spectrum-tokens` data as a source of this design data and convert it into a set of CSS custom properties. This allows us to use the tokens in our components and to create a consistent design language across all of our components. + +Some of these tokens have different values depending on the visual language or scale being used. The default values for all tokens are set to the default values for the light theme and medium scale. + +To force the dark theme, you can add `color-scheme: dark` to your container element. Doing this will force the dark value to be used for all tokens that have one. This can be done at any level of the DOM and by leveraging the cascade, the color schemes can be nested or changed at any level. For example, if you want to force the dark theme for a specific component, you can add `color-scheme: dark` to that component's container element. ```html - + +
A dark themed container
+A light themed container
+