ShtukbaseStandard
页面/design/design.md

这段内容尚未翻译,下面是英文原文。

Design

The project's design choice: which style, component libraries and lens layout it uses.

页面字段(4)
icon🎨
style
libraries
layout

The project's choice is in the header of this page:

  • style is the id of the style package whose tokens the project uses. The style lays its tokens in /design/<style>/ (tokens.css is the built file). A style package sets this field on install when it is empty. Empty means no style is chosen yet.

  • libraries is the list of ids of the component libraries the project uses (HTML, React). Every library takes the chosen style through the token contract, so changing style changes the look of all of them.

  • layout is the id of the lens layout package. A layout can select itself on install when the field is empty. Lenses use the built-in frame when no layout is selected.

The check DTK-R03 reads style and judges /design/<style>/tokens.css against the contract. The viewers (the style specimen, the component catalog) read the style and libraries.

To swap the style: install the other style package, set style: here to its id, run shtuk check.

To swap the layout, install the other layout package, set layout: here, run shtuk run design-components sync and rebuild with shtuk run lenses build.

包 Design tokens (W3C DTCG) 会把此页面放在 /design/design.md。源文本