@beehexa/design-rules 2611.3.3 → 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/README.md +1 -1
- package/dist/AGENTS.md +1 -7
- package/dist/catalog.json +703 -321
- package/dist/docs/public/_redirects +2 -0
- package/dist/docs/scripts/color-pairs.mjs +5 -1
- package/dist/docs/scripts/token-utils.d.mts +5 -1
- package/dist/docs/scripts/token-utils.mjs +44 -4
- package/dist/docs/src/brand/structure-proposal.md +1 -1
- package/dist/docs/src/components/ColorDemo.astro +56 -18
- package/dist/docs/src/components/ElevationDemo.astro +196 -0
- package/dist/docs/src/components/LayoutDemo.astro +1 -1
- 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 +95 -0
- package/dist/docs/src/components/RoleGuides.astro +2 -2
- package/dist/docs/src/components/ShapeDemo.astro +88 -44
- package/dist/docs/src/components/ShapePin.astro +5 -3
- 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 +102 -0
- 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 +13 -6
- 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 +34 -5
- package/dist/docs/src/content/foundations/styles/data-visualization.mdx +150 -6
- package/dist/docs/src/content/foundations/styles/elevation.mdx +72 -3
- 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 +13 -8
- package/dist/docs/src/content/foundations/styles/interaction-states.mdx +82 -9
- package/dist/docs/src/content/foundations/styles/layout/app-frame.mdx +12 -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 +49 -5
- 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 +23 -6
- package/dist/docs/src/content/foundations/styles/spacing.mdx +17 -3
- package/dist/docs/src/content/foundations/styles/typography/code.mdx +5 -3
- 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 +67 -5
- 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 +571 -19
- package/dist/docs/src/content/tools/application-content.mdx +176 -0
- package/dist/docs/src/content/tools/editors.mdx +271 -0
- 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 +190 -0
- package/dist/docs/src/content/tools/vueflow.mdx +179 -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 +12 -6
- 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 +34 -5
- package/dist/docs/src/content-vi/foundations/styles/data-visualization.mdx +75 -6
- package/dist/docs/src/content-vi/foundations/styles/elevation.mdx +81 -0
- 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 +13 -8
- 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 +13 -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 +49 -5
- package/dist/docs/src/content-vi/foundations/styles/radius.mdx +63 -15
- package/dist/docs/src/content-vi/foundations/styles/size-and-density.mdx +23 -6
- package/dist/docs/src/content-vi/foundations/styles/spacing.mdx +17 -3
- package/dist/docs/src/content-vi/foundations/styles/typography/code.mdx +5 -3
- 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 +67 -5
- 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 +81 -14
- package/dist/docs/src/lib/tokens.ts +3 -0
- package/dist/docs/src/styles/chrome.css +21 -14
- package/dist/docs/src/styles/color.css +50 -53
- package/dist/docs/src/styles/docs.css +37 -55
- package/dist/docs/src/styles/elevation.css +83 -0
- package/dist/docs/src/styles/global.css +21 -10
- package/dist/docs/src/styles/icons.css +20 -23
- package/dist/docs/src/styles/kit.css +116 -0
- package/dist/docs/src/styles/layout.css +8 -13
- package/dist/docs/src/styles/motion.css +34 -0
- package/dist/docs/src/styles/opacity.css +43 -0
- package/dist/docs/src/styles/scrollbars.css +74 -0
- package/dist/docs/src/styles/shapes.css +35 -29
- package/dist/docs/src/styles/tokens.css +1663 -4
- package/dist/docs/src/styles/tokens.js +538 -4
- package/dist/docs/src/styles/typography.css +8 -11
- package/dist/docs/src/styles/zindex.css +59 -0
- package/dist/docs/tokens/border.json +1 -1
- package/dist/docs/tokens/color.json +75 -4
- package/dist/docs/tokens/content.json +24 -0
- package/dist/docs/tokens/diagram.json +54 -0
- package/dist/docs/tokens/editor.json +129 -0
- package/dist/docs/tokens/elevation.json +15 -5
- package/dist/docs/tokens/flow.json +497 -0
- package/dist/docs/tokens/layout.json +4 -0
- package/dist/docs/tokens/motion.json +37 -5
- package/dist/docs/tokens/opacity.json +9 -0
- package/dist/docs/tokens/radius.json +52 -8
- package/dist/docs/tokens/resize.json +79 -0
- package/dist/docs/tokens/scrollbar.json +40 -0
- package/dist/docs/tokens/size.json +7 -1
- package/dist/docs/tokens/spacing.json +35 -5
- package/dist/docs/tokens/switch.json +280 -0
- package/dist/docs/tokens/typography.json +5 -0
- package/dist/docs/tokens/visualization.json +123 -0
- package/dist/docs/tokens/z-index.json +49 -0
- package/dist/index.js +703 -321
- package/package.json +1 -1
|
@@ -1,45 +1,36 @@
|
|
|
1
1
|
---
|
|
2
|
-
title:
|
|
3
|
-
description:
|
|
2
|
+
title: Detail overlays
|
|
3
|
+
description: How wide a drawer or panel should be when people inspect a record without leaving the page.
|
|
4
4
|
order: 5
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
When people open an order, a sync log or the settings of a connection, they usually want the list behind it to stay where it is. A detail overlay, a drawer or panel that opens over the page, lets them inspect the record and go straight back to where they were.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
configuration while retaining the page context. A short confirmation dialog is not a data-inspection
|
|
11
|
-
overlay and does not inherit this width contract. Prefer the component's standard content sizing
|
|
12
|
-
for short confirmation/action prompts; do not enlarge it just because a data panel uses a wide role.
|
|
9
|
+
## When to use one
|
|
13
10
|
|
|
14
|
-
|
|
11
|
+
Use a detail overlay for the details of a record, structured evidence such as a sync log, or settings that belong to an item on the page.
|
|
15
12
|
|
|
16
|
-
|
|
13
|
+
A short confirmation, such as "Delete this store?", is a dialog, not a detail overlay. Keep it at its normal size, however wide the detail overlays in the product are.
|
|
14
|
+
|
|
15
|
+
## Widths
|
|
16
|
+
|
|
17
|
+
| Width | Token | Size |
|
|
17
18
|
| --- | --- | --- |
|
|
18
|
-
| Default
|
|
19
|
-
| Wide
|
|
20
|
-
| Mobile
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
Use `--bh-layout-overlay-*` CSS variables in styles, or resolved `tokens.light['layout.overlay.default']`
|
|
37
|
-
when an overlay API expects a CSS length string. Numeric app-frame/page APIs convert source
|
|
38
|
-
`rem` dimensions at their framework boundary. Do not copy these values into a consumer token file.
|
|
39
|
-
The explicit pixel CSS package variant preserves nominal sizes during root-unit migration, not
|
|
40
|
-
an exception from font scaling or responsive behavior.
|
|
41
|
-
|
|
42
|
-
Header/sidebar and page-cap roles are also source tokens: `layout.header.height`,
|
|
43
|
-
`layout.sidebar.expanded`, `layout.sidebar.collapsed`, `layout.page.narrow`, `layout.page.wide`
|
|
44
|
-
and `layout.page.margin.*`. Their detailed semantics remain in [App frame](/foundations/styles/layout/app-frame/)
|
|
45
|
-
and [Page widths](/foundations/styles/layout/page-widths/). Do not use a page cap as a viewport breakpoint.
|
|
19
|
+
| Default | `layout.overlay.default` | From 1024 px: half the window, and at least 900 px |
|
|
20
|
+
| Wide | `layout.overlay.wide` | From 1024 px: 70% of the window |
|
|
21
|
+
| Mobile | `layout.overlay.mobile` | Below 1024 px: the whole window |
|
|
22
|
+
|
|
23
|
+
- **Choose the wide width for the content, not for the product.** A long log or a table with many columns may need it; most drawers do not.
|
|
24
|
+
- **Below 1024 px the overlay fills the window**, so it never makes the page scroll sideways.
|
|
25
|
+
- **The important parts stay in view:** the title, the close or back button, the main action and any error message. Long tables and code scroll inside their own area; text and form labels wrap.
|
|
26
|
+
- **Width is only part of the job.** Focus moves into the overlay when it opens and back to what opened it when it closes, the overlay has a name for screen readers, and its action bar stays visible. See [Keyboard and focus](/foundations/guidelines/accessibility/keyboard-and-focus/#moving-focus).
|
|
27
|
+
|
|
28
|
+
## Labels and values
|
|
29
|
+
|
|
30
|
+
Details are often shown as a list of labels with their values beside them. On wide screens, give the label column at least `layout.description.minimum`. When the overlay is narrower than that, put each label above its value instead.
|
|
31
|
+
|
|
32
|
+
## In code
|
|
33
|
+
|
|
34
|
+
Use the CSS variables `--bh-layout-overlay-default`, `--bh-layout-overlay-wide` and `--bh-layout-overlay-mobile`, or the values in `tokens.light` when a component expects a length. Never copy the numbers into your own files.
|
|
35
|
+
|
|
36
|
+
Page widths cap how wide content grows; they are not breakpoints. The window widths where layouts change are in [Breakpoints](/foundations/styles/layout/breakpoints/). The header and side navigation sizes are in [App frame](/foundations/styles/layout/app-frame/), and the page widths in [Page widths](/foundations/styles/layout/page-widths/).
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Page widths
|
|
3
|
-
description:
|
|
3
|
+
description: Give each page full, wide or narrow content by what it holds, so tables get room and text stays easy to read.
|
|
4
4
|
order: 2
|
|
5
5
|
---
|
|
6
6
|
import LayoutDemo from '../../../../components/LayoutDemo.astro';
|
|
7
7
|
|
|
8
|
+
A table of orders needs all the room it can get; a settings form reads better in a narrow column. Each page takes the width that suits what it holds.
|
|
9
|
+
|
|
8
10
|
**Pick one of three widths for each page, by what the page holds.**
|
|
9
11
|
|
|
10
12
|
<LayoutDemo kind="widths" />
|
|
@@ -15,9 +17,7 @@ import LayoutDemo from '../../../../components/LayoutDemo.astro';
|
|
|
15
17
|
| Wide | 1280 px | Dashboards, detail pages, settings overviews, standard pages |
|
|
16
18
|
| Narrow | 768 px | Forms, settings forms, wizard steps, help and documentation pages |
|
|
17
19
|
|
|
18
|
-
Wide and Narrow
|
|
19
|
-
The responsive margins use `layout.page.margin.small`, `.medium` and `.large`.
|
|
20
|
-
Full has no maximum-width cap; do not replace it with an arbitrarily large numeric token.
|
|
20
|
+
In code, Wide and Narrow are `layout.page.wide` and `layout.page.narrow`, and the page margins are `layout.page.margin.small`, `.medium` and `.large`. Full has no maximum, so it has no token: don't stand in a large number for it.
|
|
21
21
|
|
|
22
22
|
- **Full.** Tables and logs show more columns and rows when they use the whole window.
|
|
23
23
|
- **Wide.** Cards and panels stay at a size people can scan on a large monitor.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Downloads and terms
|
|
3
|
-
description: Every logo file,
|
|
3
|
+
description: Every logo file, the colour codes and the typeface, and the terms for using the Beehexa trademark.
|
|
4
4
|
order: 5
|
|
5
5
|
audience: designers, developers, partners, press
|
|
6
6
|
owner: Brand
|
|
@@ -35,13 +35,13 @@ import LogoHero from '../../../../components/logos/LogoHero.astro';
|
|
|
35
35
|
|
|
36
36
|
## Colour codes
|
|
37
37
|
|
|
38
|
-
| Colour | HEX | RGB |
|
|
39
|
-
|
|
40
|
-
| Yellow | #FCB017 | 252 176 23 |
|
|
41
|
-
| Graphite | #2B2A28 | 43 42 40 |
|
|
42
|
-
| White | #FFFFFF | 255 255 255 |
|
|
38
|
+
| Colour | HEX | RGB |
|
|
39
|
+
|---|---|---|
|
|
40
|
+
| Yellow | #FCB017 | 252 176 23 |
|
|
41
|
+
| Graphite | #2B2A28 | 43 42 40 |
|
|
42
|
+
| White | #FFFFFF | 255 255 255 |
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
For print, start the yellow from PMS 1235 C, the value in the 2025 brand guide, and approve a printed proof before the full run: this yellow often prints dull in CMYK on uncoated paper. On white paper, the white version is the paper itself.
|
|
45
45
|
|
|
46
46
|
## Typeface
|
|
47
47
|
|
|
@@ -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,9 +1,53 @@
|
|
|
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
|
-
planned:
|
|
6
|
-
- "Where transparency is allowed: the scrim behind dialogs, image overlays"
|
|
7
|
-
- "Why hover, pressed and disabled use colour steps, not opacity"
|
|
8
|
-
- "Opacity tokens, if any are needed"
|
|
9
5
|
---
|
|
6
|
+
import OpacityDemo from '../../../components/OpacityDemo.astro';
|
|
7
|
+
import TokenTable from '../../../components/TokenTable.astro';
|
|
8
|
+
|
|
9
|
+
Opacity sets how see-through an element is. A faded element lets the background show through, so its colour changes from screen to screen. Beehexa uses opacity in two places only: images inside something turned off, and the scrim behind dialogs.
|
|
10
|
+
|
|
11
|
+
## Why controls use colour
|
|
12
|
+
|
|
13
|
+
- **The background shows through.** A faded button looks different on a white card, a yellow banner and a selected row.
|
|
14
|
+
- **Contrast is no longer checked.** A faded colour is a new colour, and text on it may become unreadable.
|
|
15
|
+
- **Opacity multiplies.** A 40% item inside a 40% card ends up at 16%.
|
|
16
|
+
|
|
17
|
+
The disabled colour tokens, such as `color.text.disabled`, look the same on every background. See [Interaction states](/foundations/styles/interaction-states/).
|
|
18
|
+
|
|
19
|
+
| I need to | Use |
|
|
20
|
+
|---|---|
|
|
21
|
+
| Fade a logo, avatar or illustration of something turned off | `opacity.disabled` (0.4) on the image |
|
|
22
|
+
| Turn off a button, input, text or icon | The disabled colour tokens |
|
|
23
|
+
| Dim the page behind a dialog or drawer | `color.surface.scrim` |
|
|
24
|
+
| Fade something in or out | Opacity 0 and 1 in an animation, see [Motion](/foundations/styles/motion/) |
|
|
25
|
+
|
|
26
|
+
## Images that are turned off
|
|
27
|
+
|
|
28
|
+
Images have their own colours, so no colour token can change them. Fade the image; give the text `color.text.disabled`; keep the card's border. Always say "Turned off" in words as well.
|
|
29
|
+
|
|
30
|
+
<OpacityDemo kind="tile" />
|
|
31
|
+
|
|
32
|
+
<OpacityDemo kind="screen" />
|
|
33
|
+
|
|
34
|
+
## The scrim
|
|
35
|
+
|
|
36
|
+
The scrim dims the page behind a dialog or drawer, so the dialog is the focus and the page reads as unavailable. It is a colour with transparency built in: graphite at 40% in light mode, black at 60% in dark mode, where a dark page needs more to dim. Use it as it is.
|
|
37
|
+
|
|
38
|
+
<OpacityDemo kind="scrim" />
|
|
39
|
+
|
|
40
|
+
## Do and don’t
|
|
41
|
+
|
|
42
|
+
<OpacityDemo kind="dodont" item="container" />
|
|
43
|
+
<OpacityDemo kind="dodont" item="controls" />
|
|
44
|
+
|
|
45
|
+
## Tokens
|
|
46
|
+
|
|
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.
|