This is the CSS package for WARP.
The package includes resets, component classes and tokens.
The CSS files should be used directly from Eik. This is because we can alias releases by major versions.
We publish 3 css files.
- Resets:
https://assets.finn.no/pkg/@warp-ds/css/v1/resets.css
- Components css:
https://assets.finn.no/pkg/@warp-ds/css/v1/components.css
- Brand css with tokens:
https://assets.finn.no/pkg/@warp-ds/css/v1/tokens/[BRANDNAME e.g. tori-fi].css
Only component classes are published to npm to be used in the component libraries.
pnpm add @warp-ds/css
The package includes component classes, such as:
- attention
- pageIndicator
- ribbon
- slider
- modal
- box
- pill
- step
- card
- switchToggle
- toaster
- toast
- tabs
- tab
- expandable
- suffix
- prefix
And shortcuts, such as:
- button
- button--secondary
- button--default
- button--small
- button--link
- button--primary
- button--cta
- button--pill
- button--utility
- button--utility-flat
- button--destructive
- button--destructive-flat
- button--flat
Creates brand-css files from tokens.
Uses the Tokenizer to build css vars. The output is css files, one for each support brand. These CSS files are what's actually holding the theme.
If you have new components to add tokens to (if you only want to update existing tokens proceed to step 2):
- Under applicable brand create a new yml file and preferably name it the same as the new component(e.g. button.yml if it is a button component)
- Update tokens needed.
- Push your changes.
- The CSS files for each brand will be built and published to Eik. Please find your release here and search for the css urls which were published under
Eik login and publish
step. ! Be aware that it takes some time before we update the aliased version on Eik so if you need to test your changes immediately use the full version and not an alias.
If you'd like to contribute to @warp-ds/css
, start by reviewing the contributing guidelines.