![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
@spectrum-css/tokens
Advanced tools
Core tokens builder for Spectrum CSS
This package uses StyleDictionary to build Spectrum core tokens for CSS.
package.json
file.--system
) that are used to map the component-level class styles to the core tokens from the desired context. These are generated by the postcss-add-theming-layer
plugin as part of the build and should not be relied upon for naming consistency across releases. Do not attempt to overwrite or extend these variables in your application.Though the token data in this package focus on only the current context (Spectrum 2), our team is committed to offering backwards compatibility for Spectrum 1 and Express through at least December of 2024.
To this end, we have included the component-level mappings for:
dist/css/components/spectrum
dist/css/components/express
dist/css/components/spectrum-two
Consumers should load only the mappings for the components they are using in their application. This will ensure that the component-level mappings are aligned with the base CSS for each component. Spectrum 1 and Express component mappings should be loaded with the global-vars.css
and appropriate color and scale assets from the last version of the tokens package: v14.x. Loading the Spectrum 1 or Express component-level mappings with the Spectrum 2 global variables will result in incorrect values being applied to the components and will break the desired design for the component.
The output is concatenated into a single dist/index.css
for use in a vanilla HTML application. This entire file should be imported, and the relevant classes should be toggled to swap out core tokens.
On the <body>
element, start with .spectrum
, add in .spectrum--light
, then .spectrum--medium
. To switch to another context, add .spectrum--legacy
or .spectrum--express
.
For additional guidance on which assets to load, see the architecture section below.
All compiled assets are shipped from the dist
folder. Most of the assets are available in the dist/css
folder. The dist/css/components
folder contains the component-level mappings for Spectrum 1, Express, and Spectrum 2. These assets should be loaded with the appropriate global variables and color and scale assets from the last version of the tokens package: v14.x.
global-vars.css
: Shared global, unchanging tokens.light-vars.css
: Tokens specific to the light color.dark-vars.css
: Tokens specific to the dark color.medium-vars.css
: Tokens specific to the medium (desktop) scale.large-vars.css
: Tokens specific to the large (mobile) scale.index.css
: The above files rolled up into 1 css file for convenience; best for use in a vanilla HTML application.Assets in this folder must be loaded together in order for the randomly generated system variables to line up.
bridge
index.css
: everything in the folder rolled up into 1 file.<component>.css
: mappings from local component classes (i.e. .spectrum-ActionBar.spectrum-ActionBar--quiet
) to system variables.These assets must be loaded with one of the matching <component>.css
files for the desired context, i.e., dist/css/components/express/<component>.css
or dist/css/components/spectrum/<component>.css
spectrum-two
index.css
: Everything in the folder rolled up into 1 file<component>.css
:
.spectrum
.transparent
or 10px
, values not present in the token system).These assets must be loaded with the global token definitions found in this package at the following paths: - dist/css/global-vars.css
- dist/css/*-vars.css
: load only those assets relevant to the application context
express
Same contents as the spectrum-two
folder but instead of .spectrum
, properties are attached to .spectrum--express
.
Note: Do not load these assets with the dist/css/global-vars.css
or dist/css/*-vars.css
files. Instead, load global token definitions from the last version of the tokens package: v14.x: i.e.,
dist/css/global-vars.css
dist/css/*-vars.css
When loading express styles, the following assets must be loaded last or be altered to use higher specificity:
dist/css/express/global-vars.css
dist/css/express/*-vars.css
spectrum
Same contents as the spectrum-two
folder but instead of .spectrum
, properties are attached to .spectrum--legacy
.
Note: Do not load these assets with the dist/css/global-vars.css
or dist/css/*-vars.css
files. Instead, load global token definitions from the last version of the tokens package: v14.x: i.e.,
dist/css/global-vars.css
dist/css/*-vars.css
When loading legacy spectrum styles, the following assets must be loaded last or be altered to use higher specificity:
dist/css/spectrum/global-vars.css
dist/css/spectrum/*-vars.css
Overrides and additions to core tokens can be added to custom/*-vars.css
.
Ensure that you add new values to the appropriate color, or scale file:
global-vars.css
- Shared global, unchanging tokenslight-vars.css
- Tokens specific to the light colordark-vars.css
- Tokens specific to the dark colormedium-vars.css
- Tokens specific to the medium (desktop) scalelarge-vars.css
- Tokens specific to the large (mobile) scaleValues added here will be copied over and concatenated with the custom properties being generated from the core tokens by StyleDictionary.
There are no additional contextual folders (i.e., dist/css/spectrum/
) because this package supports no other theming systems outside of the component token mappings. All global tokens are found in the dist/css
folder.
For more notes on how the token data has changed, see the @adobe/spectrum-tokens release documentation.
FAQs
The Spectrum CSS tokens package
The npm package @spectrum-css/tokens receives a total of 0 weekly downloads. As such, @spectrum-css/tokens popularity was classified as not popular.
We found that @spectrum-css/tokens demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.