mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-21 10:01:42 +01:00
A dimension that belongs to one component's own drawing is a documented constant in that component's file; layout sizes stay semantic tokens, and no size-preset token exists for one component (craft-framework.md 5.4). - Spec: 5.4 rule 3 reworded; Appendix A, 4.6 (the component-token rung goes, no such tokens exist), 8.3, porting.md and the theme README agree. - design-lint: literal-size/* treats a module- or impl-level const with a doc comment as a named value: a name that resolves to it is not flagged, and its initializer is its definition. Fn-local and undocumented consts and call-site literals stay flagged. Nine markers that only covered such consts are removed. - Ruler ticks: size.ruler.tick.* leaves the size presets; kit.rs draws TICK_MID = 6 and TICK_MINOR = 3 points in every density, as the old library and the apps' rulers do. Comfortable ticks go back to 6 / 3 (from 9 / 4.5); Compact is unchanged. - size.scroll_fade becomes FADE_LENGTH in scroll_bar.rs, size.notice.width CARD_WIDTH in notice.rs, and size.story.* multiples of size.control.md in testing/stage.rs (15, 10 and 30 control heights: today's values in both densities). pointer_tip, checker, thumb.sample.*, the card gaps and icon.glyph_md stay tokens: each has more than one user.
191 lines
3.5 KiB
JSON
191 lines
3.5 KiB
JSON
{
|
|
"schema": "craft-design-sizes",
|
|
"schema_version": 1,
|
|
"id": "compact",
|
|
"name": "Compact",
|
|
"base": {
|
|
"edge": "flat",
|
|
"radius": {
|
|
"button": "full",
|
|
"control": 3.0,
|
|
"panel": 0.0,
|
|
"pill": "full",
|
|
"surface": 4.0,
|
|
"window": 6.0
|
|
},
|
|
"size": {
|
|
"bar": {
|
|
"options": 36.0,
|
|
"options_narrow": 28.0,
|
|
"status": 24.0,
|
|
"tab": 26.0,
|
|
"title": 32.0
|
|
},
|
|
"checker": 4.0,
|
|
"control": {
|
|
"md": 24.0,
|
|
"sm": 20.0
|
|
},
|
|
"dialog": {
|
|
"button": 84.0,
|
|
"least": 380.0,
|
|
"side_button": 96.0,
|
|
"wrap": 440.0
|
|
},
|
|
"dock": {
|
|
"column": 340.0
|
|
},
|
|
"float": {
|
|
"height": 240.0,
|
|
"width": 192.0
|
|
},
|
|
"groove": 3.0,
|
|
"handle": {
|
|
"md": 8.0,
|
|
"ring": 18.0,
|
|
"sm": 6.0
|
|
},
|
|
"hit": {
|
|
"edge": 32.0,
|
|
"slop": 3.0,
|
|
"target": 8.0
|
|
},
|
|
"icon": {
|
|
"glyph_md": 12.0,
|
|
"glyph_sm": 10.0,
|
|
"lg": 20.0,
|
|
"md": 16.0,
|
|
"sm": 12.0
|
|
},
|
|
"length": {
|
|
"field": {
|
|
"md": 192.0,
|
|
"sm": 160.0
|
|
},
|
|
"number": {
|
|
"md": 72.0,
|
|
"sm": 60.0
|
|
},
|
|
"short": 96.0,
|
|
"track": 128.0
|
|
},
|
|
"pane": {
|
|
"least": 40.0
|
|
},
|
|
"panel_header": 28.0,
|
|
"plot": {
|
|
"height": 144.0,
|
|
"width": 240.0
|
|
},
|
|
"pointer_tip": {
|
|
"x": 20.0,
|
|
"y": 22.0
|
|
},
|
|
"popup_min": 192.0,
|
|
"rail": {
|
|
"button": 30.0,
|
|
"width": 40.0
|
|
},
|
|
"ramp": {
|
|
"bar": 10.0,
|
|
"groove": 5.0
|
|
},
|
|
"row": {
|
|
"text": 18.0
|
|
},
|
|
"thumb": {
|
|
"card": 128.0,
|
|
"lg": 48.0,
|
|
"md": 24.0,
|
|
"sample": {
|
|
"lg": 96.0,
|
|
"md": 48.0,
|
|
"sm": 36.0
|
|
},
|
|
"sm": 18.0
|
|
},
|
|
"window": {
|
|
"cascade": 32.0
|
|
}
|
|
},
|
|
"space": {
|
|
"gap": {
|
|
"card_column": 12.0,
|
|
"card_row": 18.0,
|
|
"inline": 4.0,
|
|
"item": 8.0,
|
|
"row": 4.0,
|
|
"section": 12.0,
|
|
"stack": 6.0,
|
|
"tight": 2.0
|
|
},
|
|
"inset": {
|
|
"screen": 16.0
|
|
},
|
|
"pad": {
|
|
"chip": 4.0,
|
|
"control": 6.0,
|
|
"regular": 8.0,
|
|
"roomy": 16.0,
|
|
"segment": 10.0
|
|
}
|
|
},
|
|
"stroke": {
|
|
"dash": 4.0,
|
|
"dash_gap": 3.0,
|
|
"heavy": 3.0,
|
|
"icon": 0.0729,
|
|
"medium": 1.5,
|
|
"thick": 2.0,
|
|
"thin": 1.0
|
|
},
|
|
"typography": {
|
|
"body": {
|
|
"font": "ui",
|
|
"line_height": 16.0,
|
|
"size": 12.0
|
|
},
|
|
"body_large": {
|
|
"font": "ui",
|
|
"line_height": 20.0,
|
|
"size": 15.0
|
|
},
|
|
"body_strong": {
|
|
"font": "ui_semibold",
|
|
"line_height": 16.0,
|
|
"size": 12.0
|
|
},
|
|
"caption": {
|
|
"font": "ui",
|
|
"line_height": 14.0,
|
|
"size": 10.5
|
|
},
|
|
"display": {
|
|
"font": "ui_semibold",
|
|
"line_height": 46.0,
|
|
"size": 38.0
|
|
},
|
|
"heading": {
|
|
"font": "ui_semibold",
|
|
"line_height": 20.0,
|
|
"size": 15.0
|
|
},
|
|
"label": {
|
|
"font": "ui",
|
|
"line_height": 16.0,
|
|
"size": 11.5
|
|
},
|
|
"mono": {
|
|
"font": "mono",
|
|
"line_height": 16.0,
|
|
"size": 11.5
|
|
},
|
|
"title": {
|
|
"font": "ui_semibold",
|
|
"line_height": 18.0,
|
|
"size": 13.0
|
|
}
|
|
}
|
|
}
|
|
}
|