@smwb/ui-css
v1.1.0
Published
Prebuilt aggregate stylesheet for the @smwb design system (compiled from @smwb/ui-styles). Framework-agnostic — shared by the React and SolidJS libraries.
Readme
@smwb/ui-css
The prebuilt aggregate stylesheet for the @smwb design system — every component's CSS in one
file, compiled from @smwb/ui-styles. Framework-
agnostic: the exact same stylesheet backs both @smwb/ui-react
and @smwb/ui-solid.
Install
npm install @smwb/ui-cssUsage
import "@smwb/ui-css";
// or
import "@smwb/ui-css/ui.css";Optional CSS reset (from @smwb/ui-styles):
import "@smwb/ui-styles/normalize.css";When to use it
- CJS consumers, or anytime you want a single global stylesheet with a fixed cascade order.
- Quick start / CDN-style usage where tree-shaking isn't set up.
If you import components from @smwb/ui-react / @smwb/ui-solid in an ESM build, each
component already pulls in its own CSS automatically (tree-shakeable), along with the --smui-*
tokens — you don't need this package.
ui.css declares the tokens on :root and :root[data-theme="dark"], and starts with an
@import of the Roboto webfont from Google Fonts.
How it's built
lessc @smwb/ui-styles/less/components.less → dist/ui.css. To customize the design tokens, override
them in @smwb/ui-styles (see its README) and recompile.
