@beehexa/design-rules 2611.4.1 → 2611.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/catalog.json +602 -248
- package/dist/docs/public/_redirects +2 -0
- package/dist/docs/scripts/token-utils.d.mts +5 -1
- package/dist/docs/scripts/token-utils.mjs +28 -3
- package/dist/docs/src/brand/structure-proposal.md +1 -1
- package/dist/docs/src/components/ColorDemo.astro +52 -14
- package/dist/docs/src/components/MotionDemo.astro +135 -0
- package/dist/docs/src/components/NativeControlsDemo.astro +279 -0
- package/dist/docs/src/components/OpacityDemo.astro +8 -8
- package/dist/docs/src/components/RoleGuides.astro +2 -2
- package/dist/docs/src/components/ShapeDemo.astro +78 -35
- package/dist/docs/src/components/SiteHeader.astro +19 -4
- package/dist/docs/src/components/SystemAreas.astro +1 -1
- package/dist/docs/src/components/TokenTable.astro +16 -1
- package/dist/docs/src/components/TypeDemo.astro +15 -15
- package/dist/docs/src/components/ZIndexDemo.astro +1 -1
- package/dist/docs/src/components/logos/LogoInUse.astro +3 -3
- package/dist/docs/src/content/components/button/accessibility.mdx +41 -8
- package/dist/docs/src/content/components/button/code.mdx +8 -1
- package/dist/docs/src/content/components/button/examples.mdx +23 -4
- package/dist/docs/src/content/components/button/usage.mdx +26 -0
- package/dist/docs/src/content/components/resizable-panel/accessibility.mdx +61 -0
- package/dist/docs/src/content/components/resizable-panel/changelog.mdx +20 -0
- package/dist/docs/src/content/components/resizable-panel/code.mdx +79 -0
- package/dist/docs/src/content/components/resizable-panel/examples.mdx +85 -0
- package/dist/docs/src/content/components/resizable-panel/meta.json +5 -0
- package/dist/docs/src/content/components/resizable-panel/usage.mdx +101 -0
- package/dist/docs/src/content/foundations/guidelines/accessibility/keyboard-and-focus.mdx +75 -0
- package/dist/docs/src/content/foundations/guidelines/accessibility/statement.mdx +45 -0
- package/dist/docs/src/content/foundations/guidelines/accessibility/testing.mdx +58 -0
- package/dist/docs/src/content/foundations/guidelines/accessibility.mdx +100 -11
- package/dist/docs/src/content/foundations/guidelines/content.mdx +11 -2
- package/dist/docs/src/content/foundations/index.mdx +3 -3
- package/dist/docs/src/content/foundations/styles/border.mdx +10 -3
- package/dist/docs/src/content/foundations/styles/color/accessibility.mdx +4 -2
- package/dist/docs/src/content/foundations/styles/color/dark-mode.mdx +2 -2
- package/dist/docs/src/content/foundations/styles/color/index.mdx +14 -2
- package/dist/docs/src/content/foundations/styles/color/palette.mdx +4 -4
- package/dist/docs/src/content/foundations/styles/color/tokens.mdx +2 -2
- package/dist/docs/src/content/foundations/styles/color/usage.mdx +25 -3
- package/dist/docs/src/content/foundations/styles/data-visualization.mdx +76 -0
- package/dist/docs/src/content/foundations/styles/elevation.mdx +7 -1
- package/dist/docs/src/content/foundations/styles/icons/accessibility.mdx +1 -1
- package/dist/docs/src/content/foundations/styles/icons/code.mdx +6 -18
- package/dist/docs/src/content/foundations/styles/icons/index.mdx +2 -2
- package/dist/docs/src/content/foundations/styles/icons/usage.mdx +4 -2
- package/dist/docs/src/content/foundations/styles/interaction-states.mdx +82 -9
- package/dist/docs/src/content/foundations/styles/layout/app-frame.mdx +2 -4
- package/dist/docs/src/content/foundations/styles/layout/breakpoints.mdx +10 -7
- package/dist/docs/src/content/foundations/styles/layout/grid.mdx +4 -2
- package/dist/docs/src/content/foundations/styles/layout/index.mdx +3 -3
- package/dist/docs/src/content/foundations/styles/layout/overlays.mdx +28 -37
- package/dist/docs/src/content/foundations/styles/layout/page-widths.mdx +4 -4
- package/dist/docs/src/content/foundations/styles/logos/downloads-and-terms.mdx +7 -7
- package/dist/docs/src/content/foundations/styles/logos/index.mdx +13 -2
- package/dist/docs/src/content/foundations/styles/logos/placement-and-containers.mdx +4 -2
- package/dist/docs/src/content/foundations/styles/logos/product-logos.mdx +2 -2
- package/dist/docs/src/content/foundations/styles/logos/using-the-logo.mdx +3 -1
- package/dist/docs/src/content/foundations/styles/motion.mdx +131 -3
- package/dist/docs/src/content/foundations/styles/opacity.mdx +7 -1
- package/dist/docs/src/content/foundations/styles/radius.mdx +63 -15
- package/dist/docs/src/content/foundations/styles/scrollbars.mdx +176 -0
- package/dist/docs/src/content/foundations/styles/size-and-density.mdx +16 -6
- package/dist/docs/src/content/foundations/styles/spacing.mdx +17 -3
- package/dist/docs/src/content/foundations/styles/typography/code.mdx +4 -2
- package/dist/docs/src/content/foundations/styles/typography/index.mdx +13 -3
- package/dist/docs/src/content/foundations/styles/typography/usage.mdx +5 -3
- package/dist/docs/src/content/foundations/styles/typography/vietnamese.mdx +2 -2
- package/dist/docs/src/content/foundations/styles/z-index.mdx +4 -0
- package/dist/docs/src/content/foundations/tokens/all-tokens.mdx +11 -0
- package/dist/docs/src/content/foundations/tokens/index.mdx +17 -9
- package/dist/docs/src/content/get-started/design.mdx +1 -1
- package/dist/docs/src/content/get-started/develop.mdx +2 -6
- package/dist/docs/src/content/get-started/index.mdx +1 -1
- package/dist/docs/src/content/release-phases/index.mdx +1 -1
- package/dist/docs/src/content/tools/ant-design-vue-theme.mdx +457 -12
- package/dist/docs/src/content/tools/application-content.mdx +166 -32
- package/dist/docs/src/content/tools/editors.mdx +247 -3
- package/dist/docs/src/content/tools/eslint.mdx +1 -1
- package/dist/docs/src/content/tools/index.mdx +2 -2
- package/dist/docs/src/content/tools/mermaid.mdx +108 -13
- package/dist/docs/src/content/tools/vueflow.mdx +58 -0
- package/dist/docs/src/content-vi/foundations/guidelines/accessibility/keyboard-and-focus.mdx +75 -0
- package/dist/docs/src/content-vi/foundations/guidelines/accessibility/statement.mdx +45 -0
- package/dist/docs/src/content-vi/foundations/guidelines/accessibility/testing.mdx +58 -0
- package/dist/docs/src/content-vi/foundations/guidelines/accessibility.mdx +108 -0
- package/dist/docs/src/content-vi/foundations/guidelines/content.mdx +34 -0
- package/dist/docs/src/content-vi/foundations/index.mdx +9 -0
- package/dist/docs/src/content-vi/foundations/styles/border.mdx +9 -3
- package/dist/docs/src/content-vi/foundations/styles/color/accessibility.mdx +4 -2
- package/dist/docs/src/content-vi/foundations/styles/color/dark-mode.mdx +2 -2
- package/dist/docs/src/content-vi/foundations/styles/color/index.mdx +14 -2
- package/dist/docs/src/content-vi/foundations/styles/color/palette.mdx +5 -5
- package/dist/docs/src/content-vi/foundations/styles/color/tokens.mdx +2 -2
- package/dist/docs/src/content-vi/foundations/styles/color/usage.mdx +24 -2
- package/dist/docs/src/content-vi/foundations/styles/elevation.mdx +7 -1
- package/dist/docs/src/content-vi/foundations/styles/icons/accessibility.mdx +1 -1
- package/dist/docs/src/content-vi/foundations/styles/icons/code.mdx +6 -18
- package/dist/docs/src/content-vi/foundations/styles/icons/index.mdx +2 -2
- package/dist/docs/src/content-vi/foundations/styles/icons/usage.mdx +4 -2
- package/dist/docs/src/content-vi/foundations/styles/interaction-states.mdx +22 -8
- package/dist/docs/src/content-vi/foundations/styles/layout/app-frame.mdx +3 -1
- package/dist/docs/src/content-vi/foundations/styles/layout/breakpoints.mdx +10 -7
- package/dist/docs/src/content-vi/foundations/styles/layout/grid.mdx +4 -2
- package/dist/docs/src/content-vi/foundations/styles/layout/index.mdx +3 -3
- package/dist/docs/src/content-vi/foundations/styles/layout/overlays.mdx +36 -0
- package/dist/docs/src/content-vi/foundations/styles/layout/page-widths.mdx +5 -1
- package/dist/docs/src/content-vi/foundations/styles/logos/downloads-and-terms.mdx +7 -7
- package/dist/docs/src/content-vi/foundations/styles/logos/index.mdx +13 -2
- package/dist/docs/src/content-vi/foundations/styles/logos/placement-and-containers.mdx +4 -2
- package/dist/docs/src/content-vi/foundations/styles/logos/product-logos.mdx +2 -2
- package/dist/docs/src/content-vi/foundations/styles/logos/using-the-logo.mdx +3 -1
- package/dist/docs/src/content-vi/foundations/styles/motion.mdx +139 -0
- package/dist/docs/src/content-vi/foundations/styles/opacity.mdx +8 -2
- package/dist/docs/src/content-vi/foundations/styles/radius.mdx +63 -15
- package/dist/docs/src/content-vi/foundations/styles/size-and-density.mdx +16 -6
- package/dist/docs/src/content-vi/foundations/styles/spacing.mdx +17 -3
- package/dist/docs/src/content-vi/foundations/styles/typography/code.mdx +4 -2
- package/dist/docs/src/content-vi/foundations/styles/typography/index.mdx +14 -4
- package/dist/docs/src/content-vi/foundations/styles/typography/usage.mdx +4 -2
- package/dist/docs/src/content-vi/foundations/styles/typography/vietnamese.mdx +2 -2
- package/dist/docs/src/content-vi/foundations/styles/z-index.mdx +4 -0
- package/dist/docs/src/content-vi/foundations/tokens/all-tokens.mdx +47 -0
- package/dist/docs/src/content-vi/foundations/tokens/index.mdx +35 -0
- package/dist/docs/src/lib/i18n.ts +0 -1
- package/dist/docs/src/lib/token-descriptions-vi.ts +60 -9
- package/dist/docs/src/lib/tokens.ts +3 -0
- package/dist/docs/src/styles/chrome.css +10 -3
- package/dist/docs/src/styles/color.css +33 -23
- package/dist/docs/src/styles/docs.css +26 -28
- package/dist/docs/src/styles/elevation.css +4 -4
- package/dist/docs/src/styles/global.css +21 -1
- package/dist/docs/src/styles/icons.css +10 -9
- package/dist/docs/src/styles/kit.css +36 -32
- package/dist/docs/src/styles/layout.css +7 -7
- package/dist/docs/src/styles/motion.css +34 -0
- package/dist/docs/src/styles/opacity.css +3 -3
- package/dist/docs/src/styles/scrollbars.css +74 -0
- package/dist/docs/src/styles/shapes.css +21 -11
- package/dist/docs/src/styles/tokens.css +392 -12
- package/dist/docs/src/styles/tokens.js +185 -6
- package/dist/docs/src/styles/typography.css +4 -4
- package/dist/docs/src/styles/zindex.css +10 -7
- package/dist/docs/tokens/color.json +18 -1
- package/dist/docs/tokens/content.json +8 -3
- package/dist/docs/tokens/diagram.json +9 -3
- package/dist/docs/tokens/flow.json +2 -2
- package/dist/docs/tokens/layout.json +4 -0
- package/dist/docs/tokens/motion.json +37 -5
- package/dist/docs/tokens/radius.json +52 -8
- package/dist/docs/tokens/resize.json +12 -0
- package/dist/docs/tokens/scrollbar.json +40 -0
- package/dist/docs/tokens/size.json +1 -1
- package/dist/docs/tokens/spacing.json +31 -1
- package/dist/docs/tokens/switch.json +280 -0
- package/dist/index.js +602 -248
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Logos
|
|
3
|
-
description: The
|
|
3
|
+
description: The logo is how people recognise Beehexa. Get the files, and learn how to use them on screen, in print and inside our products.
|
|
4
4
|
order: 12
|
|
5
5
|
sidebarLabel: Overview
|
|
6
6
|
audience: web, print, product UI
|
|
@@ -12,6 +12,8 @@ import LogoAnatomy from '../../../../components/logos/LogoAnatomy.astro';
|
|
|
12
12
|
import LogoConstruction from '../../../../components/logos/LogoConstruction.astro';
|
|
13
13
|
import LogoMeanings from '../../../../components/logos/LogoMeanings.astro';
|
|
14
14
|
|
|
15
|
+
The Beehexa logo is the first thing people see on our website, our invoices and every product. Used the same way everywhere, it tells them they are in the right place.
|
|
16
|
+
|
|
15
17
|
## Download
|
|
16
18
|
|
|
17
19
|
<LogoHero />
|
|
@@ -61,4 +63,13 @@ The three meanings sit inside each other: the yellow shows what Beehexa builds,
|
|
|
61
63
|
| Minimum size | 120 px or 30 mm | 100 px or 25 mm |
|
|
62
64
|
| Colour versions | All yellow | 4 versions |
|
|
63
65
|
|
|
64
|
-
|
|
66
|
+
Existing material keeps the 2018 logo until it is replaced. Use the refreshed logo in all new work.
|
|
67
|
+
|
|
68
|
+
## In this section
|
|
69
|
+
|
|
70
|
+
| Page | What is in it |
|
|
71
|
+
|---|---|
|
|
72
|
+
| [Using the logo](/foundations/styles/logos/using-the-logo/) | Colour versions, clear space, minimum size, the icon on its own and misuse. |
|
|
73
|
+
| [Placement and containers](/foundations/styles/logos/placement-and-containers/) | The logo on websites, documents, email, print and photos, and the icon in app icons and favicons. |
|
|
74
|
+
| [Product logos](/foundations/styles/logos/product-logos/) | HexaSync and other product logos, and which logo goes where. |
|
|
75
|
+
| [Downloads and terms](/foundations/styles/logos/downloads-and-terms/) | Every file, colour codes, the typeface and the trademark terms. |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Placement and containers
|
|
3
|
-
description: Where the logo
|
|
3
|
+
description: Where the logo goes on websites, documents, email, print and photos, and how the icon fits app icons, avatars and favicons.
|
|
4
4
|
order: 2
|
|
5
5
|
audience: web, product UI, documents
|
|
6
6
|
owner: Brand
|
|
@@ -10,10 +10,12 @@ import LogoInUse from '../../../../components/logos/LogoInUse.astro';
|
|
|
10
10
|
import LogoContainer from '../../../../components/logos/LogoContainer.astro';
|
|
11
11
|
import LogoMistakes from '../../../../components/logos/LogoMistakes.astro';
|
|
12
12
|
|
|
13
|
+
The logo turns up in many places, from a website header to a 16 px favicon. These are the settings that keep it clear in each one.
|
|
14
|
+
|
|
13
15
|
## On a website
|
|
14
16
|
|
|
15
17
|
- Put the lockup at the left of the header and link it to the home page.
|
|
16
|
-
- Size: an icon of 24–32 px in a header 56–64 px tall. This site uses a 24 px icon in a
|
|
18
|
+
- Size: an icon of 24–32 px in a header 56–64 px tall. This site uses a 24 px icon in a 48 px header. On screens narrower than 360 px the lockup may shrink to 24 px tall so the header fits without scrolling sideways; never below the minimum width.
|
|
17
19
|
- Keep the [clear space](/foundations/styles/logos/using-the-logo/#clear-space) and follow the [sharp on screen](/foundations/styles/logos/using-the-logo/#sharp-on-screen) rules.
|
|
18
20
|
- Inside HexaSync, show the HexaSync logo instead. See [Product logos](/foundations/styles/logos/product-logos/).
|
|
19
21
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Product logos
|
|
3
|
-
description:
|
|
3
|
+
description: HexaSync and every Beehexa product get a logo built like the company logo. Here is which one to use where.
|
|
4
4
|
order: 3
|
|
5
5
|
audience: product, marketing
|
|
6
6
|
owner: Brand
|
|
@@ -47,7 +47,7 @@ A product has no icon of its own. HexaSync uses the Beehexa icon files for its f
|
|
|
47
47
|
|
|
48
48
|
## A new product logo
|
|
49
49
|
|
|
50
|
-
Every product lockup
|
|
50
|
+
Every product lockup uses the Beehexa icon with the product name next to it. To get one for a new product:
|
|
51
51
|
|
|
52
52
|
1. Write to the Brand owner at [hello@beehexa.com](mailto:hello@beehexa.com?subject=New%20product%20logo) with the product name as it will be written.
|
|
53
53
|
2. Brand builds the lockup from the masters: the icon, the name in Inter Display, outlined, at the chosen weight, with the same spacing.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Using the logo
|
|
3
|
-
description:
|
|
3
|
+
description: "Keep the logo clear and recognisable: the right colour version, enough space around it, a minimum size, and the mistakes to avoid."
|
|
4
4
|
order: 1
|
|
5
5
|
audience: everyone who places the logo
|
|
6
6
|
owner: Brand
|
|
@@ -11,6 +11,8 @@ import LogoClearSpace from '../../../../components/logos/LogoClearSpace.astro';
|
|
|
11
11
|
import LogoMinSize from '../../../../components/logos/LogoMinSize.astro';
|
|
12
12
|
import LogoMisuse from '../../../../components/logos/LogoMisuse.astro';
|
|
13
13
|
|
|
14
|
+
A logo is recognised only when it looks the same every time. These rules keep it that way, on any background and at any size.
|
|
15
|
+
|
|
14
16
|
## Colour versions
|
|
15
17
|
|
|
16
18
|
Four versions made from three colours: yellow #FCB017, graphite #2B2A28 and white. Pick the one with the most contrast against your background.
|
|
@@ -1,11 +1,139 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: Motion
|
|
3
|
-
description:
|
|
2
|
+
title: "Motion"
|
|
3
|
+
description: Motion shows people what just changed. Beehexa motion is quick and quiet, and it stops when people ask for less.
|
|
4
4
|
order: 9
|
|
5
5
|
---
|
|
6
|
+
import MotionDemo from '../../../components/MotionDemo.astro';
|
|
6
7
|
import TokenTable from '../../../components/TokenTable.astro';
|
|
7
8
|
|
|
8
|
-
Motion
|
|
9
|
+
Motion shows people what just changed: where a menu came from, that a dialog now blocks the page, that a row moved. Beehexa motion is quick and quiet, and it switches off when people ask their system to reduce motion.
|
|
10
|
+
|
|
11
|
+
<MotionDemo kind="enterexit" />
|
|
12
|
+
|
|
13
|
+
## How it works
|
|
14
|
+
|
|
15
|
+
- **Every motion is a duration and a curve.** Take both from the tokens; never type a number of milliseconds.
|
|
16
|
+
- **Small and frequent is fast; large and rare is slower.** Hover takes 100 ms, a dialog 300 ms.
|
|
17
|
+
- **Things leave faster than they arrive.** People wait for what they asked for, not for what they closed.
|
|
18
|
+
- **Motion never carries meaning alone.** A change is also shown in words, colour or position.
|
|
19
|
+
|
|
20
|
+
## Duration
|
|
21
|
+
|
|
22
|
+
<MotionDemo kind="durations" />
|
|
23
|
+
|
|
24
|
+
| `motion.duration` | Value | Use for |
|
|
25
|
+
|---|---|---|
|
|
26
|
+
| `instant` | 0 ms | Changes that happen at once; every duration under reduced motion |
|
|
27
|
+
| `fast` | 100 ms | Hover, press, colour changes; closing tooltips, menus and toasts |
|
|
28
|
+
| `default` | 200 ms | Opening tooltips, menus and toasts; tabs, switches, accordions, side navigation; closing dialogs and drawers |
|
|
29
|
+
| `slow` | 300 ms | Opening dialogs and drawers |
|
|
30
|
+
| `slower` | 400 ms | Opening full-screen sheets and other large surfaces |
|
|
31
|
+
| `slowest` | 600 ms | Rare emphasized moments, with `motion.easing.emphasized` |
|
|
32
|
+
|
|
33
|
+
## Curves
|
|
34
|
+
|
|
35
|
+
**A curve sets how speed changes during the motion.** The drawings show distance over time: a steep part is fast, a flat part is slow.
|
|
36
|
+
|
|
37
|
+
<MotionDemo kind="curves" />
|
|
38
|
+
|
|
39
|
+
| `motion.easing` | Use for |
|
|
40
|
+
|---|---|
|
|
41
|
+
| `standard` | Moving within the screen, and changes the system makes on its own |
|
|
42
|
+
| `enter` | Coming onto the screen: menus, dialogs, drawers, toasts |
|
|
43
|
+
| `exit` | Leaving the screen, one duration step shorter than the enter |
|
|
44
|
+
| `linear` | Fades of opacity or colour, progress bars, spinners |
|
|
45
|
+
| `emphasized` | Moments people see once, such as finishing onboarding. Never for everyday controls |
|
|
46
|
+
|
|
47
|
+
## By component
|
|
48
|
+
|
|
49
|
+
Each kind of element has one transition token: a duration and a curve together. Use it as is; it already turns to 0 under reduced motion.
|
|
50
|
+
|
|
51
|
+
| Component | Opens | Closes | How |
|
|
52
|
+
|---|---|---|---|
|
|
53
|
+
| Hover, press, colour | `motion.control` | `motion.control` | Colour only (fast, `standard`) |
|
|
54
|
+
| Tab indicator, switch knob | `motion.indicator` | `motion.indicator` | Slides (default, `enter`) |
|
|
55
|
+
| Tooltip, menu, select, popover | `motion.overlay.enter` | `motion.overlay.exit` | Fades; slides `motion.keyframe.offset.enter` (8 px) in, `.exit` (4 px) out |
|
|
56
|
+
| Accordion, tree, side navigation | `motion.expand` | `motion.expand` | Expands in place (default, `standard`) |
|
|
57
|
+
| Toast | `motion.overlay.enter` | `motion.overlay.exit` | Fades and slides from the edge |
|
|
58
|
+
| Dialog | `motion.modal.enter` | `motion.modal.exit` | Fades and scales up from `motion.keyframe.scale` (95%) |
|
|
59
|
+
| Drawer, side panel | `motion.modal.enter` | `motion.modal.exit` | Slides `motion.keyframe.slide`, its full width |
|
|
60
|
+
| Full-screen sheet | `motion.sheet.enter` | `motion.sheet.exit` | Slides up |
|
|
61
|
+
| Dragged item | `motion.drop` | `motion.drop` | Lifted with `elevation.shadow.overlay`; drops or goes back on cancel |
|
|
62
|
+
| Rare emphasized moment | `motion.emphasized` | – | Seen once, such as finishing onboarding |
|
|
63
|
+
|
|
64
|
+
Things that open and close in place, such as an accordion, take the same time both ways. Only things that leave the screen close faster.
|
|
65
|
+
|
|
66
|
+
## Waiting times
|
|
67
|
+
|
|
68
|
+
- **Tooltip**: shows 300 ms after the pointer rests, at once on keyboard focus, and hides 100 ms after the pointer leaves. A second tooltip right after the first shows at once.
|
|
69
|
+
- **Loading**: show a spinner only when a wait passes 300 ms. Load a whole page with a skeleton.
|
|
70
|
+
- **Toast**: closes after 5 seconds, or 10 seconds when it has an action. The timer pauses while the pointer or focus is on it.
|
|
71
|
+
|
|
72
|
+
## What does not move
|
|
73
|
+
|
|
74
|
+
- Tab content swaps at once; only the indicator slides.
|
|
75
|
+
- A skeleton is replaced by the content at once, without shifting the layout.
|
|
76
|
+
- The focus ring appears at once.
|
|
77
|
+
- A field error shows its message and colour at once; fields do not shake.
|
|
78
|
+
- Numbers change at once; they do not count up.
|
|
79
|
+
- Top-level pages swap at once.
|
|
80
|
+
|
|
81
|
+
## Lists
|
|
82
|
+
|
|
83
|
+
Stagger items by 50 ms each and keep the whole sequence under 500 ms; items after that appear together. Close lists without a stagger. Under reduced motion there is no stagger: the whole list appears at once.
|
|
84
|
+
|
|
85
|
+
## Reduced motion
|
|
86
|
+
|
|
87
|
+
**When people turn on reduce motion in their system, every duration becomes 0.** Menus, dialogs and toasts appear and leave at once, indicators jump, skeletons stop shimmering, lists appear in one go without a stagger, and the page jumps to an anchor instead of scrolling. How long things wait does not change: a toast stays on screen just as long.
|
|
88
|
+
|
|
89
|
+
Spinners and progress bars keep running, because they show that work is happening. Give them their own duration, not a motion token, so reduced motion does not stop them.
|
|
90
|
+
|
|
91
|
+
Beehexa components take every duration from the motion tokens, so they follow the setting without extra code. Any library a product builds on works the same way: if it has durations or animation classes of its own, map them to the motion tokens so they also become 0.
|
|
92
|
+
|
|
93
|
+
Motion started from JavaScript, such as smooth scrolling, stagger delays and chart animations, does not read the CSS tokens. Check `matchMedia('(prefers-reduced-motion: reduce)')` and skip the motion when it matches.
|
|
94
|
+
|
|
95
|
+
A product can also offer its own setting by adding the class `bh-motion-reduced` to the page; motion started from JavaScript checks the same setting. To test, turn on reduced motion in the system or the browser's developer tools and go through the whole flow.
|
|
96
|
+
|
|
97
|
+
## Moving and flashing content
|
|
98
|
+
|
|
99
|
+
- Anything that moves on its own for more than 5 seconds has a control to pause it, and pauses while the pointer or focus is on it (WCAG 2.2.2).
|
|
100
|
+
- Nothing flashes more than three times a second (WCAG 2.3.1).
|
|
101
|
+
- No parallax and no motion that sweeps across the whole screen.
|
|
102
|
+
|
|
103
|
+
## Do and don’t
|
|
104
|
+
|
|
105
|
+
<MotionDemo kind="dodont" item="exit" />
|
|
106
|
+
<MotionDemo kind="dodont" item="stagger" />
|
|
107
|
+
|
|
108
|
+
## Code
|
|
109
|
+
|
|
110
|
+
Animate `transform`, `opacity` and colour only; never `transition: all`.
|
|
111
|
+
|
|
112
|
+
```css
|
|
113
|
+
.menu {
|
|
114
|
+
opacity: 0;
|
|
115
|
+
transform: translateY(calc(-1 * var(--bh-motion-keyframe-offset-exit)));
|
|
116
|
+
transition:
|
|
117
|
+
opacity var(--bh-motion-overlay-exit),
|
|
118
|
+
transform var(--bh-motion-overlay-exit);
|
|
119
|
+
}
|
|
120
|
+
.menu.is-open {
|
|
121
|
+
opacity: 1;
|
|
122
|
+
transform: none;
|
|
123
|
+
transition:
|
|
124
|
+
opacity var(--bh-motion-overlay-enter),
|
|
125
|
+
transform var(--bh-motion-overlay-enter);
|
|
126
|
+
}
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Use `motion.duration` and `motion.easing` directly only for motion no token above covers.
|
|
9
130
|
|
|
10
131
|
## Tokens
|
|
132
|
+
|
|
11
133
|
<TokenTable prefix="motion" />
|
|
134
|
+
|
|
135
|
+
## Related
|
|
136
|
+
|
|
137
|
+
- [Accessibility](/foundations/guidelines/accessibility/#beehexa-rules): the Beehexa rule for reduced motion.
|
|
138
|
+
- [Elevation](/foundations/styles/elevation/) and [Z-index](/foundations/styles/z-index/): the surfaces that move.
|
|
139
|
+
- [Interaction states](/foundations/styles/interaction-states/): the hover and pressed colours that change.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "Opacity"
|
|
3
|
-
description:
|
|
3
|
+
description: How see-through something is. Beehexa uses it in two places only, so every control keeps colours people can read.
|
|
4
4
|
order: 10.5
|
|
5
5
|
---
|
|
6
6
|
import OpacityDemo from '../../../components/OpacityDemo.astro';
|
|
@@ -45,3 +45,9 @@ The scrim dims the page behind a dialog or drawer, so the dialog is the focus an
|
|
|
45
45
|
## Tokens
|
|
46
46
|
|
|
47
47
|
<TokenTable prefix="opacity" />
|
|
48
|
+
|
|
49
|
+
## Related
|
|
50
|
+
|
|
51
|
+
- [Interaction states](/foundations/styles/interaction-states/): how controls show disabled and other states with colour.
|
|
52
|
+
- [Elevation](/foundations/styles/elevation/): dialogs and drawers above the scrim.
|
|
53
|
+
- [Motion](/foundations/styles/motion/): fading things in and out.
|
|
@@ -1,12 +1,22 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Radius
|
|
3
|
-
description:
|
|
3
|
+
description: Corner radius tells people what an element is before they read it. Eight steps, each tied to a role.
|
|
4
4
|
order: 6
|
|
5
5
|
---
|
|
6
6
|
import ShapeDemo from '../../../components/ShapeDemo.astro';
|
|
7
7
|
import TokenTable from '../../../components/TokenTable.astro';
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Radius tells people what an element is before they read it. Rounding by role keeps the whole product consistent: the same kind of element looks the same on every screen.
|
|
10
|
+
|
|
11
|
+
**Every corner is a radius token. Pick the step by the element's role, not by its size.**
|
|
12
|
+
|
|
13
|
+
## How it works
|
|
14
|
+
|
|
15
|
+
- **Small details get the smallest radius.** Badges, checkboxes and keyboard shortcuts are tiny, so 2 px is enough to soften them.
|
|
16
|
+
- **Controls and supporting elements share 4 px.** Buttons, inputs, selects, menu frames and items, tags, status labels and dates use the same corners at every size. Side navigation items retain 6 px.
|
|
17
|
+
- **Surfaces have their own roles.** Cards, alerts, popovers, tooltips and select popups use 8 px; dialogs, drawers and large page containers use 12 px. A select popup is a surface, not a 4 px menu frame.
|
|
18
|
+
- **Full is for people and chips.** Avatars and other user UI, switches and chips are fully round, so anything people can remove or turn on and off reads as one shape.
|
|
19
|
+
- **Every radius has a matching focus ring.** The ring is the element's radius + 2 px, so its corners follow the element.
|
|
10
20
|
|
|
11
21
|
## The scale
|
|
12
22
|
|
|
@@ -14,6 +24,21 @@ Eight steps. The token number follows the spacing scale: `radius.100` is 8 px, l
|
|
|
14
24
|
|
|
15
25
|
<ShapeDemo kind="radius-scale" />
|
|
16
26
|
|
|
27
|
+
| Role | Token | Elements |
|
|
28
|
+
|---|---|---|
|
|
29
|
+
| Edge | `radius.0` | The page header, full-width tables, panels that run to the edge |
|
|
30
|
+
| Small details | `radius.025` · 2 px | Badges, checkboxes, keyboard shortcuts |
|
|
31
|
+
| Controls and supporting elements | `radius.050` · 4 px | Buttons, inputs, text areas, selects, menu frames and items, tags, status labels, dates and timestamps |
|
|
32
|
+
| Navigation | `radius.075` · 6 px | Side navigation items; nested content when the nesting rule gives 6 px |
|
|
33
|
+
| Containment | `radius.100` · 8 px | Cards, alerts and banners, in-page containers, popovers, tooltips, select popups, toasts |
|
|
34
|
+
| Large page elements | `radius.150` · 12 px | Dialogs, drawers, full-page containers, tables in their own frame |
|
|
35
|
+
| Retained scale value | `radius.200` · 16 px | No current component role |
|
|
36
|
+
| People and chips | `radius.full` | Avatars and user UI, switches, chips |
|
|
37
|
+
|
|
38
|
+
Labels, tags and chips are three different elements. [Color usage](/foundations/styles/color/usage/#label-tag-or-chip) says which is which.
|
|
39
|
+
|
|
40
|
+
Use family tokens for shared roles: `radius.control` and `radius.control.small` resolve to 4 px, `radius.item` to 4 px, `radius.card` and `radius.overlay` to 8 px, `radius.modal` to 12 px, and `radius.pill` to `radius.full`. Menu frames use `radius.050` directly; they do not take the generic 8 px overlay radius. These rem-based steps assume the native 16 px root. Changing a role never changes the numeric value of `radius.100`: it remains 8 px.
|
|
41
|
+
|
|
17
42
|
## Examples
|
|
18
43
|
|
|
19
44
|
### `radius.0` · square
|
|
@@ -22,51 +47,63 @@ Edges that touch the screen: the page header, full-width tables and panels that
|
|
|
22
47
|
|
|
23
48
|
<ShapeDemo kind="radius-use" item="0" />
|
|
24
49
|
|
|
50
|
+
### `radius.025` · 2 px
|
|
51
|
+
|
|
52
|
+
Small details: badges, checkboxes and keyboard shortcuts.
|
|
53
|
+
|
|
54
|
+
<ShapeDemo kind="radius-use" item="025" />
|
|
55
|
+
|
|
25
56
|
### `radius.050` · 4 px
|
|
26
57
|
|
|
27
|
-
|
|
58
|
+
Buttons, inputs and selects at every size; menu frames and items; tags, status labels, dates and timestamps. Inputs and buttons always share this value. A select popup is a separate surface and retains 8 px; it is not a menu frame.
|
|
28
59
|
|
|
29
60
|
<ShapeDemo kind="radius-use" item="050" />
|
|
30
61
|
|
|
62
|
+
### `radius.075` · 6 px
|
|
63
|
+
|
|
64
|
+
Side navigation items retain 6 px. This scale value also applies to content without a component role when the nesting rule gives 6 px. Standard buttons, inputs, text areas and selects use `radius.control` (4 px), not this step.
|
|
65
|
+
|
|
66
|
+
<ShapeDemo kind="radius-use" item="075" />
|
|
67
|
+
|
|
31
68
|
### `radius.100` · 8 px
|
|
32
69
|
|
|
33
|
-
|
|
70
|
+
Containment and floating UI: cards, alerts and banners, in-page containers, popovers, tooltips, select popup surfaces and toasts. Groups of controls with 4 px padding use 8 px outside, with nested 4 px corners inside. Menu frames remain 4 px.
|
|
34
71
|
|
|
35
72
|
<ShapeDemo kind="radius-use" item="100" />
|
|
36
73
|
|
|
37
74
|
### `radius.150` · 12 px
|
|
38
75
|
|
|
39
|
-
|
|
76
|
+
Large page elements: dialogs, drawers, full-page containers and a table in its own frame. Groups of controls with 8 px padding use 12 px outside and nested 4 px corners inside.
|
|
40
77
|
|
|
41
78
|
<ShapeDemo kind="radius-use" item="150" />
|
|
42
79
|
|
|
43
80
|
### `radius.200` · 16 px
|
|
44
81
|
|
|
45
|
-
|
|
82
|
+
No current component role. This remains a numeric scale value, not a card, dialog, drawer or media default.
|
|
46
83
|
|
|
47
84
|
<ShapeDemo kind="radius-use" item="200" />
|
|
48
85
|
|
|
49
86
|
### `radius.full` · pill
|
|
50
87
|
|
|
51
|
-
Avatars, switches and
|
|
88
|
+
Avatars and other user UI, switches and chips.
|
|
52
89
|
|
|
53
90
|
<ShapeDemo kind="radius-use" item="full" />
|
|
54
91
|
|
|
55
92
|
## Shapes inside shapes
|
|
56
93
|
|
|
57
|
-
**
|
|
94
|
+
**An element with a role keeps its role radius, wherever it sits.** A button is 4 px in a card, a dialog or a toolbar, and a chip stays fully round inside an input. A 4 px menu frame with 4 px padding keeps its 4 px menu items; it does not create a zero-corner exception.
|
|
58
95
|
|
|
59
|
-
|
|
96
|
+
**Content without a role takes its radius from the container.** Images, panels and other shapes that only fill a container follow its corners: inner radius = outer radius − padding. Use this only when padding is smaller than the outer radius. When the padding is equal to or larger than the outer radius, the corners no longer meet; pick a step that is not larger than the container's. Groups with 4 px padding use 8 px outer / 4 px inner; groups with 8 px padding use 12 px outer / 4 px inner.
|
|
60
97
|
|
|
61
|
-
|
|
98
|
+
<ShapeDemo kind="nesting" />
|
|
62
99
|
|
|
63
|
-
With the spacing rules, the result is always a step on the scale
|
|
100
|
+
With the spacing rules, the result is always a step on the scale.
|
|
64
101
|
|
|
65
102
|
When content sits flush inside a box with a 1 px border, clip it with `overflow: hidden`. Don't make a radius − 1 value.
|
|
66
103
|
|
|
67
104
|
## Focus ring
|
|
68
105
|
|
|
69
|
-
The focus ring sits 2 px outside the element
|
|
106
|
+
The focus ring sits 2 px outside the element and its radius is the element's radius + 2 px: a 4 px button gets a 6 px ring. In code the browser rounds the outline for you, so no radius token is needed. In design files, draw the ring with the element's radius + 2. See [Border](/foundations/styles/border/) for the ring itself.
|
|
70
107
|
|
|
71
108
|
<ShapeDemo kind="focus-radius" />
|
|
72
109
|
|
|
@@ -76,15 +113,26 @@ The focus ring sits 2 px outside the element, and the browser rounds it to match
|
|
|
76
113
|
<ShapeDemo kind="dodont" item="controls" />
|
|
77
114
|
<ShapeDemo kind="dodont" item="corners" />
|
|
78
115
|
|
|
116
|
+
- Do pick the token by role. A large button is still a button: 4 px.
|
|
117
|
+
- Don't write a raw radius value where a token applies.
|
|
118
|
+
|
|
79
119
|
## Code
|
|
80
120
|
|
|
81
121
|
```css
|
|
82
122
|
.card {
|
|
83
|
-
border-radius: var(--bh-radius-
|
|
123
|
+
border-radius: var(--bh-radius-card);
|
|
84
124
|
padding: var(--bh-space-050);
|
|
85
125
|
}
|
|
86
126
|
.card img {
|
|
87
|
-
border-radius: var(--bh-radius-
|
|
127
|
+
border-radius: var(--bh-radius-050); /* 8 − 4 = 4 */
|
|
128
|
+
}
|
|
129
|
+
.button,
|
|
130
|
+
.input,
|
|
131
|
+
.select {
|
|
132
|
+
border-radius: var(--bh-radius-control);
|
|
133
|
+
}
|
|
134
|
+
.menu {
|
|
135
|
+
border-radius: var(--bh-radius-050);
|
|
88
136
|
}
|
|
89
137
|
```
|
|
90
138
|
|
|
@@ -95,4 +143,4 @@ The focus ring sits 2 px outside the element, and the browser rounds it to match
|
|
|
95
143
|
## Related
|
|
96
144
|
|
|
97
145
|
- [Border](/foundations/styles/border/): border widths, the selected bar and the focus ring.
|
|
98
|
-
- [Spacing](/foundations/styles/spacing/): the padding values used
|
|
146
|
+
- [Spacing](/foundations/styles/spacing/): the padding values used for content without a role.
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Scrollbars and scroll ownership
|
|
3
|
+
description: One native and virtual scrollbar appearance family, native ownership, root scaling and accessible platform fallbacks.
|
|
4
|
+
order: 11
|
|
5
|
+
---
|
|
6
|
+
import TokenTable from '../../../components/TokenTable.astro';
|
|
7
|
+
|
|
8
|
+
## Active application contract
|
|
9
|
+
|
|
10
|
+
All native-DOM scroll owners share one Beehexa scrollbar appearance, including
|
|
11
|
+
framework Table bodies, Tree/list holders, drawers and native popup portals.
|
|
12
|
+
Import the explicit application-wide module once beside the source tokens:
|
|
13
|
+
|
|
14
|
+
```js
|
|
15
|
+
import '@beehexa/design-tokens/css';
|
|
16
|
+
import '@beehexa/design-tokens/css/scrollbars';
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Keep `bh-scroll-region` on actual application-created overflow owners as an
|
|
20
|
+
ownership marker, not an enclosing presentation wrapper. Native framework
|
|
21
|
+
holders need no consumer class or internal-node patch: importing the module
|
|
22
|
+
opts their native-DOM bars into the same appearance, including offscreen native
|
|
23
|
+
measurement probes. The recipe changes no overflow, height, forced gutter,
|
|
24
|
+
events or virtual geometry. Layout supplies the actual bound and `overflow:auto`
|
|
25
|
+
where needed; never force an empty bar to make the recipe visible.
|
|
26
|
+
|
|
27
|
+
```html
|
|
28
|
+
<!-- Existing application layout owns the bounded height and overflow:auto. -->
|
|
29
|
+
<section class="inspection-pane bh-scroll-region" aria-label="Inspection results">
|
|
30
|
+
<!-- The complete logical pane content, including its horizontal extent. -->
|
|
31
|
+
</section>
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Use one scroll owner per logical pane with a continuous track across all its
|
|
35
|
+
scrolling content. A resizable pane's frame and slot wrappers must not accidentally
|
|
36
|
+
become additional scroll owners. Non-scrolling flex/grid ancestors need shrinkable
|
|
37
|
+
geometry (`min-width: 0` / `min-height: 0`) where appropriate. Keep headers outside
|
|
38
|
+
the owner only when they are intentionally fixed; do not split a pane into multiple
|
|
39
|
+
scrolling strips just to style its bar. Independently scrolling editors or lists
|
|
40
|
+
are deliberate child viewports, not a reason to put `overflow: auto` on every
|
|
41
|
+
wrapper. Verify both long and short content, both axes together, resize and mobile
|
|
42
|
+
layouts; short content must not acquire an empty scrollbar.
|
|
43
|
+
|
|
44
|
+
The recipe does not change `scroll-behavior`, `overscroll-behavior`, touch action,
|
|
45
|
+
wheel handling or keyboard handling. Continuous appearance means shared paint and
|
|
46
|
+
continuous ownership, not a smooth-scroll animation requirement. Preserve normal
|
|
47
|
+
page scroll chaining; do not add default `overscroll-behavior: contain`. Never hide
|
|
48
|
+
bars with `scrollbar-width: none`, WebKit `display: none`, zero dimensions or legacy
|
|
49
|
+
MS hiding rules. Keep scroll-only content out of drag/pan gesture ownership.
|
|
50
|
+
|
|
51
|
+
## Native ownership and supported virtual adapters
|
|
52
|
+
|
|
53
|
+
Ant Table bodies, Tree holders, panels, lists, drawers and document owners use
|
|
54
|
+
the same native-DOM appearance. The old direct-child `scrollbar-color:auto`
|
|
55
|
+
appearance exemption is removed. Native component internals still own bounds,
|
|
56
|
+
scrolling, keyboard/wheel/touch and header/body synchronization. In particular,
|
|
57
|
+
native measurement probes see the same themed scrollbar width as Table bodies.
|
|
58
|
+
Do not apply an application overflow utility to native roots or replace their
|
|
59
|
+
scroll mechanism simply to style it.
|
|
60
|
+
|
|
61
|
+
AntD4 caches the native fixed-header gutter and sticky offsets only at Table
|
|
62
|
+
mount. The existing provider/root-font observer reconciles that gutter with the
|
|
63
|
+
body's actual physical width after reader-root or forced-colors changes; a media
|
|
64
|
+
listener shares its existing lifecycle. There is no new table observer, scroll
|
|
65
|
+
engine, wrapper, remount or guessed platform width. The source adapter corrects
|
|
66
|
+
only the existing gutter column and its cached fixed-header offset. Native ping
|
|
67
|
+
classes identify horizontal overflow; smaller/overlay gutters also compensate
|
|
68
|
+
the native sticky constraint when all columns fit. Both directions preserve
|
|
69
|
+
native body geometry, scrolling and sort/action hitboxes. The evidenced inline
|
|
70
|
+
column width requires one scoped `!important`; forced-colors paint stays native.
|
|
71
|
+
|
|
72
|
+
AntD4's normal cells consume `paddingContentVerticalLG`, but fixed empty/expanded
|
|
73
|
+
wrappers negate `padding` for both axes. These source aliases intentionally differ
|
|
74
|
+
in the block axis. The adapter aligns only the normal wrapper's block margins to
|
|
75
|
+
the cell role, removing measured false empty overflow without hiding bars,
|
|
76
|
+
clipping content or changing native small/middle, inline or scrolling geometry.
|
|
77
|
+
|
|
78
|
+
Browser scrollbar pseudo-elements cannot paint virtual scrollbar divs. The
|
|
79
|
+
AntD4 source adapter therefore maps `rc-virtual-list`, Tree and TreeSelect bars
|
|
80
|
+
to these same roles. AntD4's `vc-virtual-list/ScrollBar.js` exposes no public
|
|
81
|
+
scrollbar style/size prop and hardcodes inline8px width, translucent thumb and
|
|
82
|
+
99px radius. The adapter's narrowly scoped `!important` declarations override
|
|
83
|
+
only those evidenced inline inputs, never display, thumb top/height or drag
|
|
84
|
+
handlers. Native hover and moving classes retain native lifecycle.
|
|
85
|
+
|
|
86
|
+
Monaco uses `beehexaEditorOptions(locale, observedRootFontSize)` for native
|
|
87
|
+
scrollbar/slider sizes and arrow/shadow options, plus its official
|
|
88
|
+
`scrollbarSlider` theme colors for normal/hover/active. Its API has no track
|
|
89
|
+
or radius theme input; paint-only source CSS is scoped to the existing
|
|
90
|
+
renderer surface for those gaps. All read-only/editable/diff callers reuse
|
|
91
|
+
the root observer; model identity, selection, undo, scroll and disposal stay
|
|
92
|
+
native. Forced-colors mode retains system DOM paint and a visible native
|
|
93
|
+
virtual-list thumb. Do not copy these recipes into consumers.
|
|
94
|
+
Change a retained viewer's display language with Monaco's `setModelLanguage` on
|
|
95
|
+
its existing model. Replacing the model also replaces its native view subtree;
|
|
96
|
+
language changes are not a reason to discard retained editor/model identity.
|
|
97
|
+
|
|
98
|
+
## Source roles and Ant Design Vue 4 evidence
|
|
99
|
+
|
|
100
|
+
These are reusable semantic roles, not an application palette. The installed Ant
|
|
101
|
+
Design Vue 4 source `es/table/style/index.js`, in the Table token factory under
|
|
102
|
+
`Virtual Scroll Bar`, defines:
|
|
103
|
+
|
|
104
|
+
| Ant role | Ant value | Beehexa source role |
|
|
105
|
+
| --- | --- | --- |
|
|
106
|
+
| `tableScrollThumbSize` | `8` | `scrollbar.width` → `space.100` → `0.5rem` (nominal 8px) |
|
|
107
|
+
| `tableScrollThumbBg` | `colorTextPlaceholder` | `scrollbar.thumb` → `color.text.subtlest` |
|
|
108
|
+
| `tableScrollThumbBgHover` | `colorTextHeading` | `scrollbar.thumbHover` → `color.text` |
|
|
109
|
+
| `tableScrollBg` | `colorSplit` | `scrollbar.track` → `color.border` |
|
|
110
|
+
|
|
111
|
+
The Beehexa `createAntDesignVueTheme` factory already maps those three Ant colors
|
|
112
|
+
to the listed semantic roles. Ant's `es/table/style/sticky.js` uses
|
|
113
|
+
`tableScrollThumbBgHover` for both `&:hover` and `&-active` and a `borderRadius: 100`
|
|
114
|
+
pill. Accordingly `scrollbar.thumbActive` aliases the hover role and
|
|
115
|
+
`scrollbar.radius` aliases `radius.full`, not a copied application number.
|
|
116
|
+
`scrollbar.corner` aliases the track to join both axes without a color seam.
|
|
117
|
+
The same roles feed native DOM, Ant virtual bars and Monaco; ownership stays native.
|
|
118
|
+
|
|
119
|
+
Both-axis thickness uses the **same** `scrollbar.width`. Do not introduce
|
|
120
|
+
per-consumer widths, separate horizontal/vertical recipes or token overrides to
|
|
121
|
+
match a local palette. All colors resolve their existing semantic aliases through
|
|
122
|
+
light and dark mode. Vietnamese uses the same geometry and colors; no locale-only
|
|
123
|
+
scrollbar override is needed. Keep the native reader root size; `0.5rem` is nominal
|
|
124
|
+
8px, not a hardcoded root-font mandate.
|
|
125
|
+
|
|
126
|
+
## Contrast, interaction and native fallbacks
|
|
127
|
+
|
|
128
|
+
The thumb is the foreground, not the track. Keep its opaque source color visibly
|
|
129
|
+
distinguishable from the track in both themes; validate at least 3:1 for the
|
|
130
|
+
thumb/track pair when changing their source aliases. Hover and active use the
|
|
131
|
+
stronger text role, not transparency or an invented shade. Text and focus around
|
|
132
|
+
the scroller still use their own semantic foreground and focus roles. A thin bar
|
|
133
|
+
is not the only input mechanism: preserve wheel, touch, keyboard and assistive
|
|
134
|
+
technology access. Give an otherwise unreachable scroll viewport an appropriate
|
|
135
|
+
accessible name and keyboard focus as needed; do not add redundant tab stops to
|
|
136
|
+
already reachable native components.
|
|
137
|
+
|
|
138
|
+
Engines with WebKit scrollbar pseudo-elements use the token dimension for both
|
|
139
|
+
width and height, track/corner colors, full radius and real thumb hover/active.
|
|
140
|
+
The stylesheet selects that renderer with a feature query and leaves the standard
|
|
141
|
+
scrollbar properties at `auto`, because non-auto standard properties suppress
|
|
142
|
+
pseudo-element rendering in modern Chromium. Standards-only engines use native
|
|
143
|
+
`thin` geometry and the same thumb/track colors; their API does not expose radius,
|
|
144
|
+
corner or thumb hover/drag pseudo-elements, so hover/active colors follow the
|
|
145
|
+
scroll host's corresponding state. Do not claim pixel-identical geometry or
|
|
146
|
+
simulate missing thumb events in JavaScript.
|
|
147
|
+
|
|
148
|
+
OS overlay scrollbars may keep their native visibility, hit area or geometry.
|
|
149
|
+
Keep that platform behavior rather than forcing a persistent gutter, hiding bars
|
|
150
|
+
or drawing a substitute. In forced-colors mode the custom paint/geometry recipe
|
|
151
|
+
is inactive: native system scrollbar colors and dimensions remain available.
|
|
152
|
+
Unsupported engines retain their native scrollbar. None of these fallbacks is
|
|
153
|
+
permission for an application-owned competing scrollbar recipe.
|
|
154
|
+
|
|
155
|
+
## Verification
|
|
156
|
+
|
|
157
|
+
Use the built/packed imports, never copied generated CSS. Compare actual Revisions
|
|
158
|
+
Tree and Content side by side, and Settings Members/Profile Admin plus Invitations
|
|
159
|
+
native Table body vertical/horizontal tracks and corners. Cover short/long/empty
|
|
160
|
+
data, tree expansion/collapse,1/2-axis overflow, resize, normal/nested/fullscreen,
|
|
161
|
+
light/dark, reader roots16/20 and relevant desktop/mobile allocations.
|
|
162
|
+
In WebKit-pseudo-element engines inspect both token-sized axes, arrow omission
|
|
163
|
+
and actual thumb hover/active/corner paint; in standards-only engines check the
|
|
164
|
+
supported thin metric/colors. Verify native Table header/body column alignment
|
|
165
|
+
and preserved pagination. Exercise wheel/keyboard/touch and virtual thumb drag,
|
|
166
|
+
forced colors, and long-to-short transitions without a second owner, hidden
|
|
167
|
+
columns or fake empty scrollbar. Source/build alone is not visual proof.
|
|
168
|
+
|
|
169
|
+
The package payload checker requires the typed `css/scrollbars` export, resolves a
|
|
170
|
+
strict side-effect import from a real extracted tarball and compares its CSS bytes
|
|
171
|
+
against `src/styles/scrollbars.css`. The complete active rule is discoverable as
|
|
172
|
+
`en/foundations/styles/scrollbars` through `@beehexa/design-rules`.
|
|
173
|
+
|
|
174
|
+
## Tokens
|
|
175
|
+
|
|
176
|
+
<TokenTable prefix="scrollbar" />
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Size and density
|
|
3
|
-
description:
|
|
3
|
+
description: Three control heights, targets that fingers can hit, and one density that keeps Beehexa screens easy to scan.
|
|
4
4
|
order: 5
|
|
5
5
|
---
|
|
6
6
|
import LayoutDemo from '../../../components/LayoutDemo.astro';
|
|
7
7
|
import TokenTable from '../../../components/TokenTable.astro';
|
|
8
8
|
|
|
9
|
+
A row of controls that line up looks calm and is quick to use. Choosing heights from a short list makes that automatic.
|
|
10
|
+
|
|
9
11
|
**Every control comes in three heights: 24, 32 and 40 px. Controls in one row share one height.**
|
|
10
12
|
|
|
13
|
+
## Control heights
|
|
14
|
+
|
|
11
15
|
Controls are the things people click or type in: buttons, text fields, selects, segmented controls and tabs. A fixed height keeps a row of them lined up, whatever their text.
|
|
12
16
|
|
|
13
17
|
<LayoutDemo kind="controls" />
|
|
@@ -33,16 +37,22 @@ Two other parts have a fixed size:
|
|
|
33
37
|
**Every control can be clicked in an area of at least 24 × 24 px, and tapped in 44 × 44 px on touch screens.**
|
|
34
38
|
|
|
35
39
|
- 24 px is the minimum target size of WCAG 2.2 (SC 2.5.8). Every control height meets it.
|
|
36
|
-
- On touch screens
|
|
40
|
+
- On touch screens (phones and tablets), every control responds to a tap in at least 44 × 44 px (`size.target.touch`). Mouse and keyboard screens keep the 24 px minimum.
|
|
41
|
+
- A control that stands alone, such as an icon button, keeps its visible size and gets an invisible tap area around it. Leave at least 12 px between two 32 px controls so their tap areas do not overlap.
|
|
42
|
+
- Rows in lists and menus, such as navigation items, menu items and tabs, sit next to each other, so an invisible area would cover the next row. Make the rows themselves 44 px high on touch screens.
|
|
37
43
|
|
|
38
44
|
## Density
|
|
39
45
|
|
|
40
|
-
**Beehexa has one density
|
|
41
|
-
|
|
42
|
-
One density means every screen is designed and checked at one size. A compact density may come later; it would lower control heights and spacing together, and screens that use the tokens will need no change.
|
|
46
|
+
**Beehexa has one density: default.**
|
|
43
47
|
|
|
44
|
-
|
|
48
|
+
One density means every screen is designed and checked at one size, and people see the same layout in every product. For a dense table, use small (24 px) controls and rows, not smaller spacing tokens. Screens built on the tokens will follow any future density without changes.
|
|
45
49
|
|
|
46
50
|
## Tokens
|
|
47
51
|
|
|
48
52
|
<TokenTable prefix="size" />
|
|
53
|
+
|
|
54
|
+
## Related
|
|
55
|
+
|
|
56
|
+
- [Spacing](/foundations/styles/spacing/): the space inside and between controls.
|
|
57
|
+
- [Typography](/foundations/styles/typography/usage/): the text style each control uses.
|
|
58
|
+
- [Accessibility](/foundations/guidelines/accessibility/#beehexa-rules): the Beehexa rule for touch targets.
|