@smwb/ui-css

中文文档
2.10.2发布于 2026/11/02MIT零依赖

Prebuilt aggregate stylesheet for the @smwb design system (compiled from @smwb/ui-styles). Framework-agnostic — shared by the React and SolidJS libraries.

原始使用文档
文档目录5 节
  1. Install
  2. Usage
  3. When to use it
  4. How it's built
  5. License

@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.

license

Install

npm install @smwb/ui-css

Usage

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.

License

MIT

版本与发布记录

@smwb/ui-css 共发布 20 个版本,首次发布于 2026/05/29;过去 12 个月发布了 20 个版本。

版本发布日期距今
2.10.2latest2026/11/021 天前
2.10.12026/11/012 天前
2.10.02026/11/012 天前
2.9.02026/10/295 天前
2.8.02026/10/267 天前
2.7.02026/10/268 天前

关于 @smwb/ui-css 的常见问题

@smwb/ui-css 是什么?

@smwb设计系统的预构建聚合样式表(从@smwb/ui-styles编译)。框架无关——由React和SolidJS库共享。

如何安装 @smwb/ui-css?

在项目目录运行 npm install @smwb/ui-css,或使用 pnpm add / yarn add / bun add。

@smwb/ui-css 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/smwb__ui-css 是否存在。

@smwb/ui-css 可以商用吗?

@smwb/ui-css 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@smwb/ui-css 还在维护吗?

最新版本 2.10.2 发布于 2026/11/02(1 天前);至今共发布 20 个版本,其中过去 12 个月发布了 20 个;首次发布于 2026/05/29。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。