@aurodesignsystem/webcorestylesheets

中文文档
12.0.1发布于 2026/08/21Apache-2.0CommonJS构建来源已验证近 30 天下载 6.1万

Auro core foundation Sass UI Kit

原始使用文档
文档目录10 节
  1. What's included
  2. Documentation
  3. Upgrading to v12 (Sass modules)
  4. Design tokens and legacy component support
  5. Install
  6. Pre-processed bundled resources
  7. Using the files in Sass from npm resource
  8. Multi-Theme Support
  9. Development
  10. Committed build output

WC Style Sheets

WC Style Sheets(WCSS) is a responsive, mobile-first collection of styles and tools designed to make it quick and simple for developers to create web experiences using the Auro Design Language.

What's included

This repository is a library of core level styles, functions, and mixins that can be used for consistent front-end UI development. This will include full descriptions of CSS selectors, mixins and any other supporting functions or tools.

Documentation

Please see the documentation site for all information related to WC Style Sheets.

Upgrading to v12 (Sass modules)

WCSS v12.0.0 migrates from the deprecated Sass @import system to the Sass module system (@use / @forward). This is a breaking change for consumers. See the Migration Guide for the required @use syntax and the new @use ... with (...) form for scope, prefix, and !important configuration.

Design tokens and legacy component support

Upgrading to WCSS v5.x requires @aurodesignsystem/[email protected].

When upgrading your project it may be required to also retain @aurodesignsystem/[email protected] in order to support Auro custom elements have not been updated to support the new design token naming convention.

Please also see Auro design tokens migration from 3.x to 4.x for additional information.

Install

Build Status See it on NPM! License issues ESM supported

Pre-processed bundled resources

At a limited scale, some files have been pre-processed to CSS so that it can be delivered via CDN and used in environments where this rendered resource is required.

API Note: First supporting version v2.9.0

NOTICE! Use @latest at your own risk. This will not restrict updates and will allow instant access to MAJOR releases that will contain BREAKING CHANGES. You have been warned!

resourceCDN URL
essentials.scss
fonts.scss
https://cdn.jsdelivr.net/npm/@aurodesignsystem/
webcorestylesheets@latest/dist/bundled/essentials.css
focus-visible.scss
essentials.scss
fonts.scss
https://cdn.jsdelivr.net/npm/@aurodesignsystem/
webcorestylesheets@latest/dist/bundled/essentials+fv.css

Using the files in Sass from npm resource

$ npm i @aurodesignsystem/webcorestylesheets

There are no core files to import, rather WCSS is an à la carte solution allowing for users to load what they want and when they want it. WCSS ships as Sass modules — load a file with @use as illustrated below:

@use "./../node_modules/@aurodesignsystem/webcorestylesheets/src/ ... " as *;

Multi-Theme Support

WebCoreStyleSheets provides multi-theme support for various brands in the Alaska Air Group. Each theme includes its own font definitions and styling.

Available Themes

For more information on the available themes and how to use them, please see the Auro Design Tokens documentation.

Using a Theme

To use a specific theme in your project, load the corresponding theme file.

For example:

/* Alaska Airlines theme (Auro default) */
@use "./../node_modules/@aurodesignsystem/webcorestylesheets/src/essentials-as" as *;

Additional themes are available in the src directory.

Bundled Theme Resources

Each theme also has a bundled version in the dist/bundles directory that includes essentials for quick implementation:

For example:

/* Alaska Airlines theme (Auro default) */
dist/bundles/essentials-as.css

Development

To develop against WCSS run both npm run watch and npm run serve in separate terminals.

The watch command will run a Sass linter, process a test file from Sass to CSS and run a post CSS linter. This will ensure the quality of all new Sass added to the repo.

If additional selectors or scenarios are needed, please update the ./scripts/testBuild.scss file to test your code.

Running the serve command will open the Sassdoc view. Please review all changes as Sassdoc produces all documentation.

Committed build output

Two sets of files are generated and committed to the repo:

  • dist/ — the pre-processed bundles consumed by downstream users.
  • src/type/mixins/_theme-codes.scss — a generated Sass partial (@use "theme-codes") written by scripts/theme-codes.build.mjs from the AuroDesignTokens theme definitions. Because it is committed, a direct sass invocation compiles without any prebuild step.

Both are produced by npm run build (which runs build:theme-codes first). Do not hand-edit them — _theme-codes.scss is regenerated from design-tokens, and dist/ from src/. CI enforces that the committed output matches a fresh build, so whenever you change src/ or bump @aurodesignsystem/design-tokens, run npm run build and commit the resulting changes or the PR build will fail.

To regenerate just the theme-codes partial:

$ npm run build:theme-codes

版本与发布记录

@aurodesignsystem/webcorestylesheets 共发布 64 个版本,首次发布于 2022/06/09;过去 12 个月发布了 7 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
12.0.1latest2026/08/212 个月前
12.0.02026/08/202 个月前
11.1.32026/05/295 个月前
11.1.22026/05/295 个月前
11.1.12026/05/145 个月前
11.1.02026/05/076 个月前

其他发布通道:beta → 6.0.0-beta.1。

关于 @aurodesignsystem/webcorestylesheets 的常见问题

@aurodesignsystem/webcorestylesheets 是什么?

Auro core foundation Sass UI Kit

如何安装 @aurodesignsystem/webcorestylesheets?

在项目目录运行 npm install @aurodesignsystem/webcorestylesheets,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:sass(^1.42.1)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@aurodesignsystem/webcorestylesheets 支持 TypeScript 吗?

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

@aurodesignsystem/webcorestylesheets 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@aurodesignsystem/webcorestylesheets 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=20。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@aurodesignsystem/webcorestylesheets 可以商用吗?

@aurodesignsystem/webcorestylesheets 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@aurodesignsystem/webcorestylesheets 的下载量有多少?

根据 npm 官方下载统计,@aurodesignsystem/webcorestylesheets 在 2026/10/07 – 2026/11/05 这 30 天内被下载 61,073 次,日均约 2,036 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@aurodesignsystem/webcorestylesheets 还在维护吗?

最新版本 12.0.1 发布于 2026/08/21(2 个月前);至今共发布 64 个版本,其中过去 12 个月发布了 7 个;首次发布于 2022/06/09。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。