@repobit/dex-system-design 0.25.12 → 0.26.0
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/CHANGELOG.md +187 -0
- package/README.md +131 -8
- package/package.json +95 -13
- package/schemas/component-manifest.json +3294 -405
- package/schemas/manifest-omissions.json +173 -0
- package/src/blog/src/breakpoints.js +6 -6
- package/src/blog/src/content/blog-atoms-showcase.js +1 -1
- package/src/blog/src/content/blog-page-layout.js +2 -2
- package/src/blog/src/lib/article-toc.js +7 -7
- package/src/blog/src/shell/blog-shell.js +1 -1
- package/src/blog/src/tokens/blog.js +2 -2
- package/src/blog/src/tokens/core.js +34 -35
- package/src/blog/src/tokens/legacy.js +0 -9
- package/src/blog/tokens/blog.js +2 -2
- package/src/blog/tokens/core.js +34 -35
- package/src/blog/tokens/legacy.js +0 -9
- package/src/blog/tokens.css +36 -46
- package/src/components/accordion/accordion-bg.css.js +83 -59
- package/src/components/accordion/accordion-bg.js +29 -10
- package/src/components/accordion/accordion-bg.stories.js +67 -67
- package/src/components/accordion/accordion-keyboard.js +80 -0
- package/src/components/accordion/accordion.css.js +142 -80
- package/src/components/accordion/accordion.js +37 -10
- package/src/components/accordion/accordion.stories.js +7 -7
- package/src/components/agent-endpoints/agent-endpoints.css.js +36 -39
- package/src/components/agent-endpoints/agent-endpoints.js +30 -20
- package/src/components/agent-endpoints/agent-endpoints.stories.js +1 -1
- package/src/components/ai-guardian-demo.stories.js +91 -91
- package/src/components/alert/alert.css.js +198 -0
- package/src/components/alert/alert.js +103 -0
- package/src/components/alert/alert.stories.js +206 -0
- package/src/components/anchor/anchor-nav.css.js +213 -101
- package/src/components/anchor/anchor-nav.js +26 -40
- package/src/components/anchor/anchor.stories.js +22 -12
- package/src/components/annotation/annotation.css.js +58 -0
- package/src/components/annotation/annotation.js +67 -0
- package/src/components/annotation/annotation.stories.js +63 -0
- package/src/components/architecture.stories.js +285 -0
- package/src/components/atoms.stories.js +342 -0
- package/src/components/avatar/avatar.css.js +67 -0
- package/src/components/avatar/avatar.js +42 -0
- package/src/components/avatar/avatar.stories.js +95 -0
- package/src/components/awards/awards-flex.css.js +209 -23
- package/src/components/awards/awards-flex.js +66 -7
- package/src/components/awards/awards-flex.stories.js +1 -1
- package/src/components/awards/{awards-light.stories.js → awards-summary.stories.js} +54 -64
- package/src/components/awards/awards.css.js +116 -58
- package/src/components/awards/awards.js +102 -28
- package/src/components/awards/awards.stories.js +1 -1
- package/src/components/back/back.css.js +51 -22
- package/src/components/back/back.js +28 -7
- package/src/components/back/back.stories.js +9 -3
- package/src/components/badge/badge.css.js +158 -46
- package/src/components/badge/badge.js +62 -74
- package/src/components/badge/badge.stories.js +176 -248
- package/src/components/bento-grid/bento-grid.css.js +21 -16
- package/src/components/bento-grid/bento-grid.js +16 -4
- package/src/components/bento-grid/bento-grid.stories.js +19 -18
- package/src/components/bento-grid/bento-item.css.js +52 -28
- package/src/components/bento-grid/bento-item.js +2 -2
- package/src/components/blockquote/blockquote.css.js +47 -0
- package/src/components/blockquote/blockquote.js +29 -0
- package/src/components/blockquote/blockquote.stories.js +62 -0
- package/src/components/breadcrumb/breadcrumb.css.js +92 -22
- package/src/components/breadcrumb/breadcrumb.js +56 -11
- package/src/components/button/button.css.js +531 -161
- package/src/components/button/button.js +206 -214
- package/src/components/button/button.stories.js +322 -174
- package/src/components/caption/caption.css.js +21 -0
- package/src/components/caption/caption.js +31 -0
- package/src/components/caption/caption.stories.js +62 -0
- package/src/components/card-features/card-features.css.js +14 -22
- package/src/components/card-features/card-features.js +68 -9
- package/src/components/card-features/card-features.stories.js +11 -11
- package/src/components/cards/card.css.js +60 -81
- package/src/components/cards/card.js +56 -25
- package/src/components/cards/card.stories.js +39 -39
- package/src/components/carousel/carousel.css.js +93 -99
- package/src/components/carousel/carousel.js +32 -4
- package/src/components/checkbox/checkbox.css.js +111 -93
- package/src/components/checkbox/checkbox.js +64 -90
- package/src/components/checkbox/checkbox.stories.js +96 -29
- package/src/components/code/code.css.js +70 -0
- package/src/components/code/code.js +40 -0
- package/src/components/code/code.stories.js +73 -0
- package/src/components/compare/compare.css.js +179 -43
- package/src/components/compare/compare.js +52 -25
- package/src/components/compare/compare.stories.js +61 -4
- package/src/components/comparison-panel/comparison-panel.css.js +38 -51
- package/src/components/comparison-panel/comparison-panel.js +5 -4
- package/src/components/comparison-panel/comparison-panel.stories.js +1 -1
- package/src/components/compatibility-table/compatibility-table.css.js +180 -80
- package/src/components/compatibility-table/compatibility-table.js +37 -9
- package/src/components/control-alignment.stories.js +393 -0
- package/src/components/cta-banner/cta-banner.css.js +41 -13
- package/src/components/cta-banner/cta-banner.js +6 -5
- package/src/components/cta-banner/cta-banner.stories.js +43 -98
- package/src/components/display/display.css.js +25 -1
- package/src/components/display/display.js +46 -13
- package/src/components/display/display.stories.js +270 -40
- package/src/components/divider/divider-horizontal.js +21 -5
- package/src/components/divider/divider-vertical.js +15 -7
- package/src/components/divider/divider.css.js +2 -2
- package/src/components/divider/divider.stories.js +38 -34
- package/src/components/dropdown/dropdown.css.js +93 -126
- package/src/components/dropdown/dropdown.js +114 -34
- package/src/components/dropdown/dropdown.stories.js +56 -24
- package/src/components/features/features.css.js +24 -11
- package/src/components/features/features.js +7 -3
- package/src/components/features/features.stories.js +37 -37
- package/src/components/features-tab/features-tab.css.js +19 -8
- package/src/components/features-tab/features-tab.js +6 -5
- package/src/components/features-tab/features-tab.stories.js +23 -23
- package/src/components/fieldset/fieldset.css.js +30 -0
- package/src/components/fieldset/fieldset.js +28 -0
- package/src/components/fieldset/fieldset.stories.js +84 -0
- package/src/components/footer/footer-links-group.css.js +10 -14
- package/src/components/footer/footer-links-group.js +4 -3
- package/src/components/footer/footer-lp.css.js +59 -30
- package/src/components/footer/footer-lp.js +17 -12
- package/src/components/footer/footer-lp.stories.js +63 -75
- package/src/components/footer/footer-nav-menu.css.js +26 -4
- package/src/components/footer/footer-nav-menu.js +3 -2
- package/src/components/footer/footer.css.js +146 -264
- package/src/components/footer/footer.js +176 -106
- package/src/components/footer/footer.stories.js +9 -9
- package/src/components/footer/localeMap.js +1 -1
- package/src/components/grid/grid.css.js +1 -1
- package/src/components/grid/grid.js +49 -7
- package/src/components/grid/grid.stories.js +111 -0
- package/src/components/header/header-code.css.js +61 -51
- package/src/components/header/header-code.js +28 -14
- package/src/components/header/header-code.stories.js +5 -5
- package/src/components/header/header.css.js +655 -176
- package/src/components/header/header.js +269 -36
- package/src/components/header/header.stories.js +841 -18
- package/src/components/heading/heading.css.js +14 -17
- package/src/components/heading/heading.js +48 -33
- package/src/components/heading/heading.stories.js +27 -25
- package/src/components/help-text/help-text.css.js +21 -0
- package/src/components/help-text/help-text.js +25 -0
- package/src/components/help-text/help-text.stories.js +66 -0
- package/src/components/highlight/highlight.css.js +86 -64
- package/src/components/highlight/highlight.js +18 -27
- package/src/components/highlight/highlight.stories.js +14 -3
- package/src/components/icons/analysis-icon.js +6 -16
- package/src/components/icons/arrow-down-icon.js +6 -19
- package/src/components/icons/arrow-icon.js +44 -0
- package/src/components/icons/arrow-right-icon.js +30 -23
- package/src/components/icons/arrow-up-icon.js +19 -18
- package/src/components/icons/bd-ai-icon.js +1 -1
- package/src/components/icons/brand-marks.stories.js +279 -0
- package/src/components/icons/brand-signature-icon.js +42 -0
- package/src/components/icons/check-icon.js +27 -0
- package/src/components/icons/circle-info-icon.js +33 -0
- package/src/components/icons/close-icon.js +6 -18
- package/src/components/icons/family-icon.js +8 -20
- package/src/components/icons/globe-icon.js +6 -18
- package/src/components/icons/guide-icon.js +6 -18
- package/src/components/icons/icon-element.js +99 -0
- package/src/components/icons/icons.js +36 -0
- package/src/components/icons/icons.stories.js +184 -52
- package/src/components/icons/individual-icon.js +6 -18
- package/src/components/icons/laurel-icon.js +9 -19
- package/src/components/icons/machine-learning-icon.js +6 -17
- package/src/components/icons/marks.js +41 -0
- package/src/components/icons/minus-icon.js +7 -21
- package/src/components/icons/missing-icon.js +52 -0
- package/src/components/icons/plus-icon.js +7 -21
- package/src/components/icons/quote-icon.js +19 -19
- package/src/components/image/image.css.js +72 -25
- package/src/components/image/image.js +11 -6
- package/src/components/image/image.stories.js +2 -2
- package/src/components/input/custom-form.stories.js +214 -62
- package/src/components/input/input-clipboard.css.js +51 -144
- package/src/components/input/input-clipboard.js +31 -15
- package/src/components/input/input.css.js +8 -146
- package/src/components/input/input.js +93 -38
- package/src/components/install-options/install-options.css.js +84 -77
- package/src/components/install-options/install-options.js +33 -30
- package/src/components/install-options/install-options.stories.js +3 -3
- package/src/components/label/label.css.js +35 -0
- package/src/components/label/label.js +38 -0
- package/src/components/label/label.stories.js +82 -0
- package/src/components/light-carousel/light-carousel.css.js +111 -63
- package/src/components/light-carousel/light-carousel.js +85 -11
- package/src/components/light-carousel/light-carousel.stories.js +126 -82
- package/src/components/link/link.css.js +150 -99
- package/src/components/link/link.js +86 -11
- package/src/components/link/link.stories.js +124 -30
- package/src/components/list/list-item/list-item.css.js +74 -22
- package/src/components/list/list-item/list-item.js +32 -10
- package/src/components/list/list-item/list-item.stories.js +23 -23
- package/src/components/list/list.css.js +8 -2
- package/src/components/list/list.js +3 -2
- package/src/components/list/list.stories.js +222 -0
- package/src/components/modal/modal.css.js +114 -24
- package/src/components/modal/modal.js +83 -7
- package/src/components/modal/modal.stories.js +9 -9
- package/src/components/overview/overview.css.js +19 -14
- package/src/components/overview/overview.js +6 -5
- package/src/components/overview/overview.stories.js +10 -10
- package/src/components/page-switcher/page-switcher.css.js +97 -40
- package/src/components/page-switcher/page-switcher.js +28 -5
- package/src/components/page-switcher/page-switcher.stories.js +95 -0
- package/src/components/paragraph/paragraph.css.js +15 -10
- package/src/components/paragraph/paragraph.js +41 -44
- package/src/components/paragraph/paragraph.stories.js +56 -21
- package/src/components/picture/picture.css.js +103 -44
- package/src/components/picture/picture.js +100 -30
- package/src/components/picture/picture.stories.js +1 -1
- package/src/components/pricing-cards/new-pricing-card.js +3 -3
- package/src/components/pricing-cards/new-pricing.css.js +24 -15
- package/src/components/pricing-cards/pricing-card-actions.css.js +1 -1
- package/src/components/pricing-cards/pricing-card-actions.js +3 -4
- package/src/components/pricing-cards/pricing-card-container.css.js +3 -3
- package/src/components/pricing-cards/pricing-card-container.js +3 -2
- package/src/components/pricing-cards/pricing-card-header.css.js +10 -8
- package/src/components/pricing-cards/pricing-card-header.js +6 -7
- package/src/components/pricing-cards/pricing-card-pricing.css.js +16 -9
- package/src/components/pricing-cards/pricing-card-pricing.js +8 -6
- package/src/components/pricing-cards/pricing-card-show-more.css.js +11 -3
- package/src/components/pricing-cards/pricing-card-show-more.js +8 -3
- package/src/components/pricing-cards/pricing-card.css.js +244 -190
- package/src/components/pricing-cards/pricing-card.js +54 -70
- package/src/components/pricing-cards/pricing-feature-item.css.js +25 -8
- package/src/components/pricing-cards/pricing-feature-item.js +8 -3
- package/src/components/process-steps/process-steps.css.js +26 -14
- package/src/components/process-steps/process-steps.js +23 -6
- package/src/components/process-steps/process-steps.stories.js +1 -1
- package/src/components/progress/progress.css.js +80 -0
- package/src/components/progress/progress.js +42 -0
- package/src/components/progress/progress.stories.js +79 -0
- package/src/components/quick-answer/quick-answer.css.js +75 -13
- package/src/components/quick-answer/quick-answer.js +8 -3
- package/src/components/radio/radio.css.js +92 -128
- package/src/components/radio/radio.js +106 -127
- package/src/components/radio/radio.stories.js +54 -19
- package/src/components/review/review-grid.css.js +5 -6
- package/src/components/review/review-grid.js +14 -11
- package/src/components/review/review.css.js +11 -6
- package/src/components/review/review.js +3 -8
- package/src/components/shared/ensemble.css.js +93 -0
- package/src/components/shared/form-field.css.js +206 -0
- package/src/components/shared/prop-vocabulary.js +48 -0
- package/src/components/shared/token-scales.js +306 -0
- package/src/components/skeleton/skeleton.css.js +34 -0
- package/src/components/skeleton/skeleton.js +32 -0
- package/src/components/skeleton/skeleton.stories.js +70 -0
- package/src/components/spinner/spinner.css.js +62 -0
- package/src/components/spinner/spinner.js +38 -0
- package/src/components/spinner/spinner.stories.js +92 -0
- package/src/components/spotlight-section/spotlight-section.css.js +14 -13
- package/src/components/spotlight-section/spotlight-section.js +42 -39
- package/src/components/switch/switch.css.js +103 -0
- package/src/components/switch/switch.js +44 -0
- package/src/components/switch/switch.stories.js +86 -0
- package/src/components/tab-list/content-switcher.stories.js +189 -0
- package/src/components/tab-list/tab-list.css.js +250 -0
- package/src/components/tab-list/tab-list.js +184 -0
- package/src/components/tab-list/tab-list.stories.js +221 -0
- package/src/components/tabs/tabs.css.js +14 -123
- package/src/components/tabs/tabs.js +16 -19
- package/src/components/tabs/tabs.stories.js +95 -95
- package/src/components/tag/tag.css.js +54 -0
- package/src/components/tag/tag.js +32 -0
- package/src/components/tag/tag.stories.js +126 -0
- package/src/components/terminal/terminal-message.css.js +164 -60
- package/src/components/terminal/terminal-message.js +5 -5
- package/src/components/terminal/terminal-message.stories.js +70 -1
- package/src/components/termsOfUse/terms.css.js +25 -20
- package/src/components/termsOfUse/terms.js +13 -9
- package/src/components/termsOfUse/terms.stories.js +1 -1
- package/src/components/textarea/textarea.css.js +51 -0
- package/src/components/textarea/textarea.js +136 -0
- package/src/components/textarea/textarea.stories.js +191 -0
- package/src/components/tooltip/tooltip.css.js +75 -0
- package/src/components/tooltip/tooltip.js +156 -0
- package/src/components/tooltip/tooltip.stories.js +161 -0
- package/src/components/trust-panel/trust-panel.css.js +85 -33
- package/src/components/trust-panel/trust-panel.js +18 -10
- package/src/components/trust-panel/trust-panel.stories.js +1 -1
- package/src/components/ultimate-security-demo.stories.js +431 -0
- package/src/components/video/video.css.js +17 -0
- package/src/components/video/video.js +40 -0
- package/src/components/video/video.stories.js +106 -0
- package/src/components/video-player/video-player.css.js +67 -11
- package/src/components/video-player/video-player.js +35 -4
- package/src/components/video-player/video-player.stories.js +1 -1
- package/src/components/visual-alignment.stories.js +411 -0
- package/src/components/visually-hidden/visually-hidden.css.js +24 -0
- package/src/components/visually-hidden/visually-hidden.js +16 -0
- package/src/components/visually-hidden/visually-hidden.stories.js +56 -0
- package/src/stories/Button.stories.js +17 -17
- package/src/stories/Header.stories.js +10 -10
- package/src/stories/Page.js +1 -1
- package/src/stories/Page.stories.js +6 -6
- package/src/tokens/borders.stories.js +339 -0
- package/src/tokens/color-responsibilities.stories.js +227 -0
- package/src/tokens/dark-derivation.js +309 -0
- package/src/tokens/dark-findings.js +197 -0
- package/src/tokens/dark-mode.stories.js +207 -0
- package/src/tokens/dimension.stories.js +251 -0
- package/src/tokens/elevation.stories.js +143 -0
- package/src/tokens/focus.stories.js +276 -0
- package/src/tokens/fonts.css +20 -20
- package/src/tokens/fonts.stories.js +354 -374
- package/src/tokens/layout.css +25 -11
- package/src/tokens/motion.stories.js +231 -0
- package/src/tokens/shape.stories.js +272 -0
- package/src/tokens/spacing-rhythm.stories.js +359 -0
- package/src/tokens/spacing.stories.js +208 -703
- package/src/tokens/story-chrome.js +503 -0
- package/src/tokens/surfaces.stories.js +224 -0
- package/src/tokens/text-on-surface.stories.js +164 -0
- package/src/tokens/token-map.js +220 -0
- package/src/tokens/token-map.stories.js +257 -0
- package/src/tokens/token-purposes.js +266 -0
- package/src/tokens/tokens-grid.stories.js +388 -900
- package/src/tokens/tokens.css +1633 -1045
- package/src/tokens/tokens.js +1130 -492
- package/src/tokens/tokens.stories.js +137 -47
- package/src/tokens/type-ceiling-words.js +299 -0
- package/src/tokens/typography.stories.js +1003 -965
- package/src/tokens/vertical-rhythm.stories.js +224 -0
- package/src/components/awards/awards-icon.js +0 -56
- package/src/components/awards/awards-light.js +0 -240
- package/src/components/banner/banner.js +0 -60
- package/src/components/banner/banner.stories.js +0 -51
- package/src/components/button/icons.js +0 -24
- package/src/components/input/index.js +0 -0
- package/src/components/light-carousel/light-carousel-simple.css.js +0 -183
- package/src/components/light-carousel/light-carousel-simple.js +0 -74
- package/src/tokens/colors.js +0 -121
- package/src/tokens/typography.css.js +0 -207
- package/src/tokens/typography.js +0 -0
|
@@ -1,14 +1,47 @@
|
|
|
1
|
-
import { css } from "lit";
|
|
1
|
+
import { css, unsafeCSS } from "lit";
|
|
2
|
+
import { below } from "../shared/token-scales.js";
|
|
2
3
|
|
|
3
4
|
export const awardsCSS = css`
|
|
4
5
|
|
|
5
|
-
bd-awards-section
|
|
6
|
+
/* :host, not "bd-awards-section". This rule was written as a bare type
|
|
7
|
+
selector inside a stylesheet Lit adopts into the shadow root, where it can
|
|
8
|
+
never match the element that owns it -- only :host can. Measured before:
|
|
9
|
+
the rule was present in the shadow sheet and matched 0 elements, and the
|
|
10
|
+
host computed display inline, background transparent, padding 0,
|
|
11
|
+
content-box, and font-family Times. Every declaration was dead.
|
|
12
|
+
.
|
|
13
|
+
THREE OF THE FIVE ARE CARRIED OVER AND TWO ARE NOT, because they are not
|
|
14
|
+
the same kind of change. display, box-sizing and font-family are latent
|
|
15
|
+
defects: a custom element defaults to display inline, so this section's
|
|
16
|
+
host has never been a block box; and its font-family fell through to Times,
|
|
17
|
+
which reaches any text that does not set its own -- today nothing does, so
|
|
18
|
+
it is a trap rather than a visible fault. Turning those three on changes
|
|
19
|
+
nothing a reader sees: the two children measure 409.781 and 520.789 before
|
|
20
|
+
and after, and the host now measures 930.570 -- exactly their sum, which is
|
|
21
|
+
what a block box wrapping its content should be. As an inline box its rect
|
|
22
|
+
was computed from line boxes instead and rounded a pixel lower. The
|
|
23
|
+
screenshots are indistinguishable.
|
|
24
|
+
.
|
|
25
|
+
background and padding were held back one commit and are now carried over
|
|
26
|
+
too, on an explicit call after seeing them rendered. They are the visible
|
|
27
|
+
half: the section gains its blue-50 band and a 32px inset it had never
|
|
28
|
+
rendered, and grows 930px to 995px. The band is what the token
|
|
29
|
+
--layout-awards-section-background was always for -- the blog subsystem
|
|
30
|
+
has been resolving it all along, and only this consumer was spelling it in
|
|
31
|
+
a selector that could not match.
|
|
32
|
+
.
|
|
33
|
+
The band does not arrive alone. It turns every card inside this section
|
|
34
|
+
into a card on a tinted ground, which is the second clause of "a card's
|
|
35
|
+
ground and its edge" -- see .bd-awards-feature-card below, which moved with
|
|
36
|
+
it. Measured on the preview before deciding: the feature card's
|
|
37
|
+
surface/container ground read 1.034:1 against the band, and worse than that
|
|
38
|
+
number suggests, because the step is across hues rather than lightness. */
|
|
39
|
+
:host {
|
|
6
40
|
display: block;
|
|
7
41
|
font-family: var(--typography-fontFamily-sans);
|
|
8
|
-
background: var(--layout-awards-section-background);
|
|
9
42
|
box-sizing: border-box;
|
|
10
|
-
|
|
11
|
-
|
|
43
|
+
background: var(--layout-awards-section-background);
|
|
44
|
+
padding: var(--spacing-32);
|
|
12
45
|
}
|
|
13
46
|
|
|
14
47
|
.bd-awards-root {
|
|
@@ -16,7 +49,7 @@ export const awardsCSS = css`
|
|
|
16
49
|
flex-direction: column;
|
|
17
50
|
align-items: center;
|
|
18
51
|
gap: var(--spacing-48);
|
|
19
|
-
padding: var(--spacing-48)
|
|
52
|
+
padding-block: var(--spacing-48);
|
|
20
53
|
box-sizing: border-box;
|
|
21
54
|
max-width: 100%;
|
|
22
55
|
}
|
|
@@ -35,23 +68,20 @@ export const awardsCSS = css`
|
|
|
35
68
|
}
|
|
36
69
|
|
|
37
70
|
.bd-awards-tagline {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
71
|
+
/* The brand text role, not the brand primitive. This darkens the ink: the
|
|
72
|
+
role is blue-600, so contrast on white goes 4.53:1 -> 6.18:1. It is not a
|
|
73
|
+
like-for-like swap, and it cannot be -- no text role exists at blue-500's
|
|
74
|
+
value. The roles sitting there are surface, border, action, two status
|
|
75
|
+
fills, an accent and the tab indicator, and blue-500 is the step
|
|
76
|
+
CLAUDE.md says is not for text. */
|
|
77
|
+
color: var(--color-text-brand);
|
|
42
78
|
}
|
|
43
79
|
|
|
44
80
|
.bd-awards-section-title {
|
|
45
|
-
color: var(--color-blue-500);
|
|
46
|
-
font-size: var(--typography-fontSize-xl);
|
|
47
|
-
font-weight: 700;
|
|
48
81
|
margin: var(--spacing-0) var(--spacing-0) var(--spacing-14);
|
|
49
82
|
}
|
|
50
83
|
|
|
51
84
|
.bd-awards-feature-title {
|
|
52
|
-
color: var(--color-blue-500);
|
|
53
|
-
font-size: var(--typography-fontSize-xl);
|
|
54
|
-
font-weight: 700;
|
|
55
85
|
margin: var(--spacing-0) var(--spacing-0) var(--spacing-14);
|
|
56
86
|
}
|
|
57
87
|
|
|
@@ -67,6 +97,33 @@ export const awardsCSS = css`
|
|
|
67
97
|
}
|
|
68
98
|
|
|
69
99
|
.bd-awards-laurel-icon {
|
|
100
|
+
/* no role: the laurel wreath. ORNAMENT, not a mark and not a glyph in a
|
|
101
|
+
text flow -- the same decision highlight.css.js records for its deco bar
|
|
102
|
+
and ellipses, and for the same reason: every icon-role candidate in this
|
|
103
|
+
package is an INK role, and ink is the wrong family for an ornament. The
|
|
104
|
+
span wraps an aria-hidden SVG painted with currentColor, so nothing here
|
|
105
|
+
is exposed to assistive technology and the adjacent headline carries the
|
|
106
|
+
meaning.
|
|
107
|
+
.
|
|
108
|
+
--color-blue-500 is the brand blue. It is a primitive because the system
|
|
109
|
+
has no brand ink at that step and deliberately does not want one: every
|
|
110
|
+
blue-500 role is a surface, a border, an action, an indicator or a status
|
|
111
|
+
fill, so adopting one would say this wreath is an action. Naming a new
|
|
112
|
+
role for two sites in one component family would be the mistake the
|
|
113
|
+
"deliberately not a token" section exists to prevent.
|
|
114
|
+
.
|
|
115
|
+
Contrast, against the blue-50 this file always intended and now actually
|
|
116
|
+
paints. The :host rule at the top declared
|
|
117
|
+
background: var(--layout-awards-section-background) as a bare type
|
|
118
|
+
selector that could never match, so for the whole life of this rule the
|
|
119
|
+
wreath sat on white; the selector is fixed and the band is on, so the
|
|
120
|
+
ground is blue-50.
|
|
121
|
+
.
|
|
122
|
+
Measured on that ground: 5.72:1 -> 4.20:1. It was 6.18:1 -> 4.53:1 while
|
|
123
|
+
the band was dead. Every one of those clears the 3:1 non-text minimum, and
|
|
124
|
+
a decorative graphic has no minimum at all, so the wreath was safe before
|
|
125
|
+
the band and is safe after it -- which is why this choice did not have to
|
|
126
|
+
wait on that decision. */
|
|
70
127
|
color: var(--color-blue-500);
|
|
71
128
|
display: flex;
|
|
72
129
|
align-items: center;
|
|
@@ -76,15 +133,12 @@ export const awardsCSS = css`
|
|
|
76
133
|
flex-shrink: 0;
|
|
77
134
|
}
|
|
78
135
|
|
|
79
|
-
.bd-awards-laurel-icon bd-icon {
|
|
80
|
-
--bd-icon-w: var(--spacing-80);
|
|
81
|
-
--bd-icon-h: var(--spacing-80);
|
|
82
|
-
}
|
|
83
136
|
|
|
84
|
-
.bd-awards-laurel-icon svg
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
137
|
+
/* A ".bd-awards-laurel-icon svg" rule stood here and could never match. The
|
|
138
|
+
span holds <bd-laurel-icon>, whose svg lives in that atom's own shadow
|
|
139
|
+
root, and a descendant selector from this stylesheet does not cross that
|
|
140
|
+
boundary. The atom sizes itself -- see its defaultSize -- so the sizing
|
|
141
|
+
this rule tried to impose was already handled a layer down. */
|
|
88
142
|
|
|
89
143
|
.bd-awards-headline-line {
|
|
90
144
|
display: block;
|
|
@@ -141,11 +195,9 @@ export const awardsCSS = css`
|
|
|
141
195
|
display: none;
|
|
142
196
|
}
|
|
143
197
|
|
|
144
|
-
/* All badges: uniform height
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
--bd-icon-w: auto;
|
|
148
|
-
}
|
|
198
|
+
/* All badges: uniform height, width from each mark's natural aspect ratio.
|
|
199
|
+
The award elements draw at that height intrinsically, so nothing is set
|
|
200
|
+
here — this used to size the local bd-icon wrapper that has been removed. */
|
|
149
201
|
|
|
150
202
|
/* ── Lower block ── */
|
|
151
203
|
|
|
@@ -201,10 +253,25 @@ export const awardsCSS = css`
|
|
|
201
253
|
|
|
202
254
|
/* ── Feature card ── */
|
|
203
255
|
|
|
256
|
+
/* A content card by every measure that was compared: the same 32px padding,
|
|
257
|
+
no resting shadow, exactly like the card box and the card-features card.
|
|
258
|
+
The corner was the only thing it did differently, and the card role settled
|
|
259
|
+
that.
|
|
260
|
+
.
|
|
261
|
+
THE GROUND AND THE EDGE MOVED WHEN THE BAND ARRIVED. This card used to sit
|
|
262
|
+
on the page, where surface/container's tonal step is the separation and an
|
|
263
|
+
edge is redundant -- the first clause of the rule. Its section now paints a
|
|
264
|
+
blue-50 band, so it is a card on a tint, and the second clause applies:
|
|
265
|
+
surface/default with a border-width-1 border/container edge, because no
|
|
266
|
+
tonal step is available across a hue change. Measured before the move: the
|
|
267
|
+
container ground read 1.034:1 against the band, which is not a step so much
|
|
268
|
+
as a smudge. The Trust Panel card and the Comparison Panel column already
|
|
269
|
+
draw exactly this, for exactly this reason. */
|
|
204
270
|
.bd-awards-feature-card {
|
|
205
|
-
background: var(--color-
|
|
206
|
-
border
|
|
207
|
-
|
|
271
|
+
background: var(--color-surface-default);
|
|
272
|
+
border: var(--border-width-1) solid var(--color-border-container);
|
|
273
|
+
border-radius: var(--card-radius);
|
|
274
|
+
padding: var(--card-padding);
|
|
208
275
|
display: flex;
|
|
209
276
|
flex-direction: column;
|
|
210
277
|
gap: var(--spacing-8);
|
|
@@ -229,33 +296,22 @@ export const awardsCSS = css`
|
|
|
229
296
|
justify-content: center;
|
|
230
297
|
}
|
|
231
298
|
|
|
232
|
-
.bd-awards-feature-icon bd-icon {
|
|
233
|
-
width: 100%;
|
|
234
|
-
height: 100%;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
.bd-awards-feature-icon bd-icon svg,
|
|
238
|
-
.bd-awards-feature-icon bd-icon img {
|
|
239
|
-
width: 100%;
|
|
240
|
-
height: 100%;
|
|
241
|
-
object-fit: contain;
|
|
242
|
-
}
|
|
243
299
|
|
|
244
300
|
.bd-awards-feature-card .bd-awards-feature-title {
|
|
245
301
|
display: block;
|
|
246
302
|
margin: 0;
|
|
247
303
|
}
|
|
248
304
|
|
|
249
|
-
.bd-awards-badge img
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
305
|
+
/* A ".bd-awards-badge img" rule stood here and could never match: the badge
|
|
306
|
+
renders icon atoms through iconFn(), not an <img>, so there is no image
|
|
307
|
+
element in this shadow root to size. A leftover from before the award
|
|
308
|
+
marks became atoms. */
|
|
253
309
|
|
|
254
310
|
/* ── Mobile (≤ 599px) ── */
|
|
255
311
|
|
|
256
|
-
@media (
|
|
312
|
+
@media ${unsafeCSS(below('sm'))} {
|
|
257
313
|
.bd-awards-root {
|
|
258
|
-
padding: var(--spacing-24);
|
|
314
|
+
padding-block: var(--spacing-24);
|
|
259
315
|
gap: var(--spacing-24);
|
|
260
316
|
}
|
|
261
317
|
|
|
@@ -276,9 +332,10 @@ export const awardsCSS = css`
|
|
|
276
332
|
height: var(--spacing-40);
|
|
277
333
|
}
|
|
278
334
|
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
335
|
+
/* The icon's own default is 80px; the box here is 40. Setting height on the
|
|
336
|
+
element beats its :host rule, and its svg follows at width auto. */
|
|
337
|
+
.bd-awards-laurel-icon bd-laurel-icon {
|
|
338
|
+
height: var(--spacing-40);
|
|
282
339
|
}
|
|
283
340
|
|
|
284
341
|
.bd-awards-trust-intro .bd-awards-subtext {
|
|
@@ -286,9 +343,7 @@ export const awardsCSS = css`
|
|
|
286
343
|
}
|
|
287
344
|
|
|
288
345
|
.bd-awards-bar {
|
|
289
|
-
// flex-direction: column;
|
|
290
346
|
align-items: center;
|
|
291
|
-
// gap: var(--spacing-16);
|
|
292
347
|
}
|
|
293
348
|
|
|
294
349
|
/* Hide desktop rows (3+3+1), show mobile rows (3+4) */
|
|
@@ -305,10 +360,13 @@ export const awardsCSS = css`
|
|
|
305
360
|
width: 100%;
|
|
306
361
|
}
|
|
307
362
|
|
|
308
|
-
/* Mobile badge height — half of desktop
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
363
|
+
/* Mobile badge height — half of desktop. The award elements render into
|
|
364
|
+
light DOM, so their svg is reachable from here; height + width auto
|
|
365
|
+
keeps each mark's aspect ratio. Replaces a rule that sized the local
|
|
366
|
+
bd-icon wrapper. */
|
|
367
|
+
.bd-awards-badge svg {
|
|
368
|
+
height: var(--spacing-32);
|
|
369
|
+
width: auto;
|
|
312
370
|
}
|
|
313
371
|
|
|
314
372
|
.bd-awards-lower {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// awards.js - varianta cu Shadow DOM (ca la celelalte componente)
|
|
2
|
-
import { LitElement, html } from "lit";
|
|
3
|
-
|
|
2
|
+
import { LitElement, html, nothing } from "lit";
|
|
3
|
+
// Installs the design tokens into document scope; see src/tokens/tokens.js
|
|
4
|
+
import "../../tokens/tokens.js";
|
|
4
5
|
import "../icons/analysis-icon.js";
|
|
5
6
|
import "../icons/av-comparatives-icon.js";
|
|
6
7
|
import "../icons/best-brands-icon.js";
|
|
@@ -11,7 +12,11 @@ import "../icons/pc-mag-business-icon.js";
|
|
|
11
12
|
import "../icons/pc-mag-icon.js";
|
|
12
13
|
import "../icons/pc-mag-readers-icon.js";
|
|
13
14
|
import "../icons/top-product-icon.js";
|
|
15
|
+
import "../heading/heading.js";
|
|
16
|
+
import "../paragraph/paragraph.js";
|
|
14
17
|
import { awardsCSS } from "./awards.css.js";
|
|
18
|
+
import { ensembleCSS } from "../shared/ensemble.css.js";
|
|
19
|
+
import { below } from "../shared/token-scales.js";
|
|
15
20
|
|
|
16
21
|
const ICON_RENDERERS = {
|
|
17
22
|
"bd-pc-mag-icon" : () => html`<bd-pc-mag-icon></bd-pc-mag-icon>`,
|
|
@@ -27,6 +32,29 @@ const ICON_RENDERERS = {
|
|
|
27
32
|
|
|
28
33
|
export class AwardsSection extends LitElement {
|
|
29
34
|
static properties = {
|
|
35
|
+
/**
|
|
36
|
+
* Which content this section renders.
|
|
37
|
+
*
|
|
38
|
+
* full the trust banner, the award bar, the secret section and the
|
|
39
|
+
* feature cards
|
|
40
|
+
* summary the trust banner and the award bar only
|
|
41
|
+
*
|
|
42
|
+
* It answers what is rendered, not what the thing used to be called. This
|
|
43
|
+
* was a second element, bd-awards-section-light, until P6E.1B: a fork of
|
|
44
|
+
* this component that stopped after the award bar. Its own Storybook page
|
|
45
|
+
* described it that way -- "renders only the trust banner and award badges
|
|
46
|
+
* -- without the secret section or feature cards" -- so the difference was
|
|
47
|
+
* always content scope, and is now said in one word instead of in a second
|
|
48
|
+
* custom element.
|
|
49
|
+
*
|
|
50
|
+
* The 48px of block padding that comes with `summary` is not a separate
|
|
51
|
+
* visual treatment and does not get its own axis. Measured on the fork:
|
|
52
|
+
* the banner sat 48px from the top and the bar 48px from the bottom,
|
|
53
|
+
* because nothing followed the bar to give the section its rhythm. With
|
|
54
|
+
* the lower content present that padding would be wrong, which is exactly
|
|
55
|
+
* what makes it a consequence of the scope rather than a theme.
|
|
56
|
+
*/
|
|
57
|
+
content : { type: String, reflect: true },
|
|
30
58
|
tagline : { type: String },
|
|
31
59
|
headline : { type: String },
|
|
32
60
|
subtext : { type: String },
|
|
@@ -38,15 +66,16 @@ export class AwardsSection extends LitElement {
|
|
|
38
66
|
_featureNarrow: { state: true }
|
|
39
67
|
};
|
|
40
68
|
|
|
41
|
-
static styles = [
|
|
69
|
+
static styles = [ensembleCSS, awardsCSS];
|
|
42
70
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
71
|
+
_mqlSm = null;
|
|
72
|
+
_mqlMd = null;
|
|
73
|
+
_onSm = () => { this._narrow = this._mqlSm?.matches ?? false; };
|
|
74
|
+
_onMd = () => { this._featureNarrow = this._mqlMd?.matches ?? false; };
|
|
47
75
|
|
|
48
76
|
constructor() {
|
|
49
77
|
super();
|
|
78
|
+
this.content = "full";
|
|
50
79
|
this.tagline = "You're Making A Great Choice";
|
|
51
80
|
this.headline = "World-class security software you can trust. Always.";
|
|
52
81
|
this.subtext = "We've added 25 new accolades in the past two years to the hundreds we have won since we started in 2001 - so you know you are in good hands.";
|
|
@@ -83,19 +112,19 @@ export class AwardsSection extends LitElement {
|
|
|
83
112
|
connectedCallback() {
|
|
84
113
|
super.connectedCallback();
|
|
85
114
|
if (typeof window !== "undefined" && window.matchMedia) {
|
|
86
|
-
this.
|
|
87
|
-
this.
|
|
88
|
-
this._narrow = this.
|
|
89
|
-
this._featureNarrow = this.
|
|
90
|
-
this.
|
|
91
|
-
this.
|
|
115
|
+
this._mqlSm = window.matchMedia(below('sm'));
|
|
116
|
+
this._mqlMd = window.matchMedia(below('md'));
|
|
117
|
+
this._narrow = this._mqlSm.matches;
|
|
118
|
+
this._featureNarrow = this._mqlMd.matches;
|
|
119
|
+
this._mqlSm.addEventListener("change", this._onSm);
|
|
120
|
+
this._mqlMd.addEventListener("change", this._onMd);
|
|
92
121
|
}
|
|
93
122
|
}
|
|
94
123
|
|
|
95
124
|
disconnectedCallback() {
|
|
96
125
|
super.disconnectedCallback();
|
|
97
|
-
this.
|
|
98
|
-
this.
|
|
126
|
+
this._mqlSm?.removeEventListener("change", this._onSm);
|
|
127
|
+
this._mqlMd?.removeEventListener("change", this._onMd);
|
|
99
128
|
}
|
|
100
129
|
|
|
101
130
|
_renderBadge(award) {
|
|
@@ -109,6 +138,26 @@ export class AwardsSection extends LitElement {
|
|
|
109
138
|
`;
|
|
110
139
|
}
|
|
111
140
|
|
|
141
|
+
/* The narrow branches below change visual-level, not as.
|
|
142
|
+
|
|
143
|
+
They used to change `as`, which made the document outline depend on the
|
|
144
|
+
viewport: measured on Modules/Awards Section, the same content rendered
|
|
145
|
+
h6/h4 at 375 and 576 and h4/h3 from 768 up, so a reader on a phone got a
|
|
146
|
+
different heading structure from a reader on a laptop -- and the narrow
|
|
147
|
+
version put feature titles at h6 directly under an h4, skipping h5.
|
|
148
|
+
|
|
149
|
+
CLAUDE.md already separates these two questions: `as` is the document
|
|
150
|
+
outline, which the composing page owns, and `visual-level` is the type
|
|
151
|
+
role, which the component owns. A responsive size change belongs to the
|
|
152
|
+
second. The outline now holds at the wider levels -- h3 for the headline
|
|
153
|
+
and the secret-section title, h4 for feature titles -- at every width, and
|
|
154
|
+
the smaller rendering at narrow widths is expressed as the type role it
|
|
155
|
+
always was.
|
|
156
|
+
|
|
157
|
+
Nothing about the narrow layout changes visually: h6 as a visual-level
|
|
158
|
+
resolves to the same type role the h6 element resolved to. The content
|
|
159
|
+
branches stay as they are; the narrow headline genuinely renders different
|
|
160
|
+
copy. */
|
|
112
161
|
_renderFeature(f) {
|
|
113
162
|
const narrow = this._featureNarrow;
|
|
114
163
|
const iconFn = ICON_RENDERERS[f.tag];
|
|
@@ -119,11 +168,11 @@ export class AwardsSection extends LitElement {
|
|
|
119
168
|
</div>
|
|
120
169
|
<div class="bd-awards-feature-text">
|
|
121
170
|
${narrow
|
|
122
|
-
? html`<bd-h as="h6" fontWeight="
|
|
123
|
-
: html`<bd-h as="h4" fontWeight="
|
|
171
|
+
? html`<bd-h as="h4" visual-level="h6" fontWeight="bold" class="bd-awards-feature-title">${f.title}</bd-h>`
|
|
172
|
+
: html`<bd-h as="h4" fontWeight="bold" class="bd-awards-feature-title">${f.title}</bd-h>`}
|
|
124
173
|
${narrow
|
|
125
|
-
? html`<bd-p
|
|
126
|
-
: html`<bd-p
|
|
174
|
+
? html`<bd-p variant="small" class="bd-awards-feature-desc">${f.description}</bd-p>`
|
|
175
|
+
: html`<bd-p variant="regular" class="bd-awards-feature-desc">${f.description}</bd-p>`}
|
|
127
176
|
</div>
|
|
128
177
|
</article>
|
|
129
178
|
`;
|
|
@@ -131,20 +180,30 @@ export class AwardsSection extends LitElement {
|
|
|
131
180
|
|
|
132
181
|
render() {
|
|
133
182
|
const narrow = this._narrow;
|
|
183
|
+
/* `summary` needs the section to carry its own block padding, because
|
|
184
|
+
nothing follows the award bar. `full` must not get that wrapper: its
|
|
185
|
+
rhythm comes from the lower content, and adding padding there would move
|
|
186
|
+
a component this phase is not allowed to move. */
|
|
187
|
+
return this.content === "summary"
|
|
188
|
+
? html`<div class="bd-ensemble bd-awards-root">${this._renderUpper(narrow)}</div>`
|
|
189
|
+
: html`${this._renderUpper(narrow)}${this._renderLower(narrow)}`;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
_renderUpper(narrow) {
|
|
134
193
|
return html`
|
|
135
194
|
<div class="bd-awards-trust-banner">
|
|
136
195
|
<div class="bd-awards-trust-intro">
|
|
137
196
|
<span class="bd-awards-laurel-icon" aria-hidden="true">
|
|
138
|
-
<bd-laurel-icon
|
|
197
|
+
<bd-laurel-icon></bd-laurel-icon>
|
|
139
198
|
</span>
|
|
140
199
|
|
|
141
200
|
${narrow
|
|
142
|
-
? html`<bd-p
|
|
143
|
-
: html`<bd-p
|
|
201
|
+
? html`<bd-p variant="small" class="bd-awards-tagline">${this.tagline}</bd-p>`
|
|
202
|
+
: html`<bd-p variant="large" class="bd-awards-tagline">${this.tagline}</bd-p>`}
|
|
144
203
|
|
|
145
204
|
${narrow
|
|
146
205
|
? html`
|
|
147
|
-
<bd-h as="h4" class="bd-awards-headline">
|
|
206
|
+
<bd-h as="h3" visual-level="h4" class="bd-awards-headline">
|
|
148
207
|
<span class="bd-awards-headline-line">World-class security</span>
|
|
149
208
|
<span class="bd-awards-headline-line">software you can trust.</span>
|
|
150
209
|
<span class="bd-awards-headline-line">Always.</span>
|
|
@@ -153,8 +212,8 @@ export class AwardsSection extends LitElement {
|
|
|
153
212
|
: html`<bd-h as="h3" class="bd-awards-headline">${this.headline}</bd-h>`}
|
|
154
213
|
|
|
155
214
|
${narrow
|
|
156
|
-
? html`<bd-p
|
|
157
|
-
: html`<bd-p
|
|
215
|
+
? html`<bd-p variant="small" class="bd-awards-subtext">${this.subtext}</bd-p>`
|
|
216
|
+
: html`<bd-p variant="regular" class="bd-awards-subtext">${this.subtext}</bd-p>`}
|
|
158
217
|
</div>
|
|
159
218
|
|
|
160
219
|
<div class="bd-awards-bar" role="list" aria-label="Industry awards">
|
|
@@ -167,14 +226,29 @@ export class AwardsSection extends LitElement {
|
|
|
167
226
|
</div>
|
|
168
227
|
</div>
|
|
169
228
|
|
|
229
|
+
`;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* The secret section and the feature cards, or nothing at all.
|
|
234
|
+
*
|
|
235
|
+
* Nothing at all means no element, not an empty one. The fork rendered an
|
|
236
|
+
* empty `.bd-awards-lower`, which stayed a flex child of its wrapper and so
|
|
237
|
+
* still took the wrapper's 48px gap -- and that is why the fork also carried
|
|
238
|
+
* a `gap: 0` override. Omitting the element removes both the phantom gap and
|
|
239
|
+
* the reason for the override.
|
|
240
|
+
*/
|
|
241
|
+
_renderLower(narrow) {
|
|
242
|
+
if (this.content === "summary") return nothing;
|
|
243
|
+
return html`
|
|
170
244
|
<div class="bd-awards-lower">
|
|
171
245
|
<section class="bd-awards-secret-section">
|
|
172
246
|
${narrow
|
|
173
|
-
? html`<bd-h as="h4" class="bd-awards-section-title">${this.secretTitle}</bd-h>`
|
|
247
|
+
? html`<bd-h as="h3" visual-level="h4" class="bd-awards-section-title">${this.secretTitle}</bd-h>`
|
|
174
248
|
: html`<bd-h as="h3" class="bd-awards-section-title">${this.secretTitle}</bd-h>`}
|
|
175
249
|
${narrow
|
|
176
|
-
? html`<bd-p
|
|
177
|
-
: html`<bd-p
|
|
250
|
+
? html`<bd-p variant="small" class="bd-awards-section-subtext">${this.secretSubtext}</bd-p>`
|
|
251
|
+
: html`<bd-p variant="regular" class="bd-awards-section-subtext">${this.secretSubtext}</bd-p>`}
|
|
178
252
|
</section>
|
|
179
253
|
|
|
180
254
|
<div class="bd-awards-features-grid">
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import { css } from "lit";
|
|
1
|
+
import { css, unsafeCSS } from "lit";
|
|
2
|
+
/* unsafeCSS is how a Lit css`` template accepts a computed string. The
|
|
3
|
+
value is not arbitrary: below() resolves a name from the closed
|
|
4
|
+
breakpoint set and throws on anything else, so the only strings that
|
|
5
|
+
reach here are the ones the scale produced. */
|
|
6
|
+
import { below } from "../shared/token-scales.js";
|
|
2
7
|
|
|
3
8
|
export default css`
|
|
4
9
|
@layer bd-components {
|
|
@@ -6,49 +11,73 @@ export default css`
|
|
|
6
11
|
all: unset;
|
|
7
12
|
display: inline-flex;
|
|
8
13
|
align-items: center;
|
|
9
|
-
gap:
|
|
10
|
-
padding:
|
|
14
|
+
gap: var(--spacing-8);
|
|
15
|
+
padding: var(--spacing-12) var(--spacing-16);
|
|
11
16
|
font-family: var(--typography-fontFamily-sans);
|
|
12
17
|
font-size: var(--typography-body-regular-fontSize);
|
|
18
|
+
/* no role: the weight of a control -- see button.css.js's .button--bold,
|
|
19
|
+
and note no role carries bold at a body size. */
|
|
13
20
|
font-weight: var(--typography-fontWeight-bold);
|
|
14
|
-
|
|
21
|
+
color: var(--color-text-primary);
|
|
15
22
|
cursor: pointer;
|
|
16
|
-
border-radius:
|
|
17
|
-
|
|
23
|
+
border-radius: var(--radius-lg);
|
|
24
|
+
/* the properties that change, not all */
|
|
25
|
+
transition: background-color var(--transition-duration-normal) var(--transition-easing-smooth),
|
|
26
|
+
color var(--transition-duration-normal) var(--transition-easing-smooth);
|
|
18
27
|
user-select: none;
|
|
19
28
|
}
|
|
20
29
|
|
|
30
|
+
/* The ink does not change on hover — the background does. It used to go to
|
|
31
|
+
pure black, which moved this control off the single ink bd-h, bd-p,
|
|
32
|
+
bd-display and bd-li were unified on, for no gain: the fill already
|
|
33
|
+
carries the hover, and neutral-900 to neutral-1000 is a step nobody can
|
|
34
|
+
see except as an inconsistency next to a heading. */
|
|
21
35
|
.bd-back:hover {
|
|
22
|
-
background-color: var(--color-
|
|
23
|
-
color: var(--color-neutral-1000);
|
|
36
|
+
background-color: var(--color-surface-muted);
|
|
24
37
|
}
|
|
25
38
|
|
|
26
39
|
.bd-back:active {
|
|
27
|
-
background-color: var(--color-
|
|
40
|
+
background-color: var(--color-surface-pressed);
|
|
28
41
|
transform: translateY(1px);
|
|
29
42
|
}
|
|
30
43
|
|
|
44
|
+
/* No border-radius here. The ring is a box-shadow and already follows the
|
|
45
|
+
shape of what it sits on, and this control has a --radius-lg of its own —
|
|
46
|
+
setting --focus-outline-radius as well pulled its corners in from 8px to
|
|
47
|
+
4px for as long as it was focused. That token is the default for
|
|
48
|
+
elements with no radius, which is what Foundations/Focus says. */
|
|
31
49
|
.bd-back:focus-visible {
|
|
32
|
-
outline:
|
|
33
|
-
|
|
50
|
+
outline: none;
|
|
51
|
+
box-shadow: var(--focus-outline-primary);
|
|
34
52
|
}
|
|
35
53
|
|
|
36
|
-
.bd-back-arrow
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
54
|
+
/* No .bd-back-arrow rule. The arrow was a text glyph once and is an inline
|
|
55
|
+
svg now, so the class this styled is in no template: measured 0 matches
|
|
56
|
+
across 8 bd-back shadow roots in 604 built stories. The four
|
|
57
|
+
declarations it carried -- an em font-size, a bold weight, a 1.2 scale
|
|
58
|
+
and a tighter tracking -- were all typographic properties of a character
|
|
59
|
+
that is no longer there. The svg takes its colour from currentColor and
|
|
60
|
+
its size from its own width and height. */
|
|
43
61
|
|
|
44
62
|
.bd-back-label {
|
|
45
|
-
line-height:
|
|
63
|
+
line-height: var(--typography-lineHeight-none);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
@media (prefers-reduced-motion: reduce) {
|
|
67
|
+
.bd-back {
|
|
68
|
+
transition: none;
|
|
69
|
+
}
|
|
70
|
+
.bd-back:active {
|
|
71
|
+
transform: none;
|
|
72
|
+
}
|
|
46
73
|
}
|
|
47
74
|
|
|
48
|
-
/*
|
|
49
|
-
|
|
75
|
+
/* Narrower than md. The complement comes from below() rather than being
|
|
76
|
+
written out: a max-width of 768px also matches at exactly 768px, where
|
|
77
|
+
--breakpoint-md says the wider layout begins. */
|
|
78
|
+
@media ${unsafeCSS(below('md'))} {
|
|
50
79
|
.bd-back {
|
|
51
|
-
padding:
|
|
80
|
+
padding: var(--spacing-14) var(--spacing-16);
|
|
52
81
|
font-size: var(--typography-body-large-fontSize);
|
|
53
82
|
}
|
|
54
83
|
}
|