WARP CSS
This is the CSS package for WARP.
The package includes resets, component classes and tokens.
Usage
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
Usage (npm)
Only component classes are published to npm to be used in the component libraries.
pnpm add @warp-ds/css
Component classes
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
Tokens
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.
Usage of tokens
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.
How to contribute
If you'd like to contribute to @warp-ds/css
, start by reviewing the contributing guidelines.
2.0.1-next.1 (2024-09-03)
Bug Fixes
- Prevent bleeding of background colors in rounded corners and fixes transparent bottom padding issue in Combobox component (#242) (fca4409)
Bug Fixes
- cc: no classes styling the same CSS properties are set on one element (#237) (90ec539)
- make @warp-ds/uno as a peerDep and devDependency (#220) (e3a568a)
- remove deprecated tokens and classes (#219) (c10955f)
- Rename checkmark icon token for Toggle component (#221) (f7d729f)
- return if brandMode includes oikotie (#232) (7dfa5fe)
- tokens: update to correct color in button-pill-background-hover (#233) (c225c36)
Features
- build all css tokens from the style-dictionary output (#212) (4d42258)
BREAKING CHANGES
-
cc: expandableInfo class has been removed since info prop has been deprecated
-
-
Add eslint and refactor
-
Remove redundant tokens and generate prod ready css tokens
-
More refactor
-
Refactor more
-
Remove switch and update brandNames
-
Update utils.js
Co-authored-by: Balbina K 41303231+BalbinaK@users.noreply.github.com
Co-authored-by: Balbina K 41303231+BalbinaK@users.noreply.github.com
Co-authored-by: Balbina K 41303231+BalbinaK@users.noreply.github.com
-
Cleanup and fix tokens
-
minify