@undrr/undrr-mangrove 2.0.0-alpha.2 → 2.0.0-alpha.4

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.
Files changed (110) hide show
  1. package/README.md +4 -4
  2. package/components/BookCard.js +2 -2
  3. package/components/Breadcrumbs.js +2 -2
  4. package/components/Checkbox.js +2 -2
  5. package/components/Chips.js +2 -2
  6. package/components/CtaButton.js +2 -2
  7. package/components/EmbedContainer.js +2 -2
  8. package/components/Footer.js +2 -2
  9. package/components/FormAction.js +2 -2
  10. package/components/FormErrorSummary.js +2 -2
  11. package/components/FormGroup.js +2 -2
  12. package/components/FullWidth.js +2 -2
  13. package/components/Gallery.js +2 -2
  14. package/components/Hero.js +2 -2
  15. package/components/HighlightBox.js +2 -2
  16. package/components/HorizontalBookCard.js +2 -2
  17. package/components/HorizontalCard.js +2 -2
  18. package/components/IconCard.js +2 -2
  19. package/components/Loader.js +2 -2
  20. package/components/MegaMenu.js +2 -2
  21. package/components/PageHeader.js +2 -2
  22. package/components/Pager.js +2 -2
  23. package/components/QuoteHighlight.js +2 -2
  24. package/components/Radio.js +2 -2
  25. package/components/ScrollContainer.js +2 -2
  26. package/components/Select.js +2 -2
  27. package/components/ShareButtons.js +2 -2
  28. package/components/ShowMore.js +2 -2
  29. package/components/StatsCard.js +2 -2
  30. package/components/SyndicationSearchWidget.js +2 -2
  31. package/components/Tab.js +2 -2
  32. package/components/TextCta.js +2 -2
  33. package/components/TextInput.js +2 -2
  34. package/components/Textarea.js +2 -2
  35. package/components/UserFeedback.js +2 -2
  36. package/components/VerticalCard.js +2 -2
  37. package/components/hydrate.js +1 -1
  38. package/css/style-all.css +286 -42
  39. package/css/style-all.css.map +1 -1
  40. package/css/style-delta.css +286 -42
  41. package/css/style-delta.css.map +1 -1
  42. package/css/style-gutenberg.css +254 -13
  43. package/css/style-gutenberg.css.map +1 -1
  44. package/css/style-irp.css +286 -42
  45. package/css/style-irp.css.map +1 -1
  46. package/css/style-mcr.css +286 -42
  47. package/css/style-mcr.css.map +1 -1
  48. package/css/style-preventionweb.css +286 -42
  49. package/css/style-preventionweb.css.map +1 -1
  50. package/css/style.css +285 -41
  51. package/css/style.css.map +1 -1
  52. package/error-pages/401.html +1 -1
  53. package/error-pages/403.html +1 -1
  54. package/error-pages/404.html +1 -1
  55. package/error-pages/429.html +1 -1
  56. package/error-pages/500.html +1 -1
  57. package/error-pages/502.html +1 -1
  58. package/error-pages/503.html +1 -1
  59. package/error-pages/504.html +1 -1
  60. package/error-pages/5xx.html +1 -1
  61. package/error-pages/challenge.html +1 -1
  62. package/error-pages/managed-challenge.html +1 -1
  63. package/js/tabs.js +577 -401
  64. package/package.json +10 -10
  65. package/scss/Atom/BaseTypography/Code/code.scss +3 -3
  66. package/scss/Atom/EmptyState/empty-state.scss +117 -0
  67. package/scss/Atom/ReachElement/Details/details.scss +1 -1
  68. package/scss/Atom/StatusLabel/status-label.scss +64 -0
  69. package/scss/Atom/Tag/tag.scss +1 -8
  70. package/scss/Components/Boilerplate/boilerplate.scss +1 -2
  71. package/scss/Components/Breadcrumbs/breadcrumbs.scss +1 -8
  72. package/scss/Components/Buttons/Chips/chips.scss +7 -10
  73. package/scss/Components/Buttons/CtaButton/cta-button.scss +19 -22
  74. package/scss/Components/Buttons/ShareButtons/share-buttons.scss +9 -13
  75. package/scss/Components/Cards/Card/card.scss +13 -13
  76. package/scss/Components/Cards/StatsCard/stats-card.scss +5 -14
  77. package/scss/Components/CookieConsentBanner/cookie-consent-banner.scss +2 -10
  78. package/scss/Components/Footer/footer.scss +1 -8
  79. package/scss/Components/Forms/_form-base.scss +49 -37
  80. package/scss/Components/Gallery/gallery.scss +13 -16
  81. package/scss/Components/Hero/hero.scss +4 -19
  82. package/scss/Components/MegaMenu/mega-menu.scss +337 -22
  83. package/scss/Components/OnThisPageNav/on-this-page-nav.scss +2 -10
  84. package/scss/Components/Pager/pager.scss +1 -2
  85. package/scss/Components/PreviewAccess/preview-access.scss +21 -29
  86. package/scss/Components/Snackbar/snackbar.scss +1 -1
  87. package/scss/Components/SyndicationSearchWidget/syndication-search-widget.scss +13 -15
  88. package/scss/Components/Tab/tab.scss +269 -123
  89. package/scss/Components/TextCta/text-cta.scss +1 -1
  90. package/scss/Components/UserFeedback/user-feedback.scss +2 -8
  91. package/scss/assets/fonts/noto-kufi-arabic/noto-kufi-arabic.scss +73 -3
  92. package/scss/assets/fonts/noto-sans-arabic/noto-sans-arabic.scss +79 -0
  93. package/scss/assets/scss/_components.scss +2 -0
  94. package/scss/assets/scss/_fonts.scss +158 -2
  95. package/scss/assets/scss/_foundational.scss +45 -30
  96. package/scss/assets/scss/_mixins.scss +53 -8
  97. package/scss/assets/scss/_theme-delta.scss +6 -63
  98. package/scss/assets/scss/_theme-irp.scss +6 -34
  99. package/scss/assets/scss/_theme-mcr.scss +7 -52
  100. package/scss/assets/scss/_theme-preventionweb.scss +6 -32
  101. package/scss/assets/scss/_tokens-data-viz.scss +300 -0
  102. package/scss/assets/scss/_tokens-tabs.scss +32 -0
  103. package/scss/assets/scss/_utility.scss +4 -6
  104. package/scss/assets/scss/_variables.scss +221 -300
  105. package/scss/assets/scss/generated/_tokens-delta.scss +248 -0
  106. package/scss/assets/scss/generated/_tokens-irp.scss +114 -0
  107. package/scss/assets/scss/generated/_tokens-mangrove.scss +607 -0
  108. package/scss/assets/scss/generated/_tokens-mcr.scss +135 -0
  109. package/scss/assets/scss/generated/_tokens-preventionweb.scss +101 -0
  110. package/scss/assets/fonts/dubai/dubai.scss +0 -9
package/package.json CHANGED
@@ -1,7 +1,14 @@
1
1
  {
2
2
  "name": "@undrr/undrr-mangrove",
3
- "version": "2.0.0-alpha.2",
3
+ "version": "2.0.0-alpha.4",
4
4
  "description": "Mangrove design System for UNDRR",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/unisdr/undrr-mangrove.git"
8
+ },
9
+ "keywords": [],
10
+ "author": "",
11
+ "license": "Apache-2.0",
5
12
  "main": "dist/index.js",
6
13
  "files": [
7
14
  "components/**/*",
@@ -10,12 +17,5 @@
10
17
  "scss/**/*.scss",
11
18
  "error-pages/**/*",
12
19
  "fonts/**/*"
13
- ],
14
- "repository": {
15
- "type": "git",
16
- "url": "https://github.com/unisdr/undrr-mangrove.git"
17
- },
18
- "keywords": [],
19
- "author": "",
20
- "license": "Apache-2.0"
21
- }
20
+ ]
21
+ }
@@ -6,7 +6,7 @@ code {
6
6
  border-radius: var(--mg-radius-form-input);
7
7
  box-shadow: inset 0 0 0 1px rgb(var(--mg-color-interactive) / 0.2);
8
8
  color: rgb(var(--mg-color-interactive));
9
- font-family: ui-monospace, SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
9
+ font-family: var(--mg-font-family-code);
10
10
  font-size: 0.875em;
11
11
  font-variant-ligatures: none;
12
12
  font-weight: 500;
@@ -63,7 +63,7 @@ pre:has(> code[class*='language-']) {
63
63
  position: absolute;
64
64
  top: var(--mg-spacing-75);
65
65
  right: var(--mg-spacing-100);
66
- font-family: $mg-font-family;
66
+ font-family: var(--mg-font-family-text);
67
67
  font-size: $mg-font-size-100;
68
68
  font-weight: 600;
69
69
  text-transform: uppercase;
@@ -94,7 +94,7 @@ figure.mg-code-block {
94
94
  background: rgb(var(--mg-color-neutral-700));
95
95
  color: rgb(var(--mg-color-neutral-200)); // #b3b3b3 — 6.03:1 on neutral-700
96
96
  padding: var(--mg-spacing-50) var(--mg-spacing-150);
97
- font-family: $mg-font-family;
97
+ font-family: var(--mg-font-family-text);
98
98
  font-size: $mg-font-size-200;
99
99
  font-style: normal;
100
100
  line-height: 1.6;
@@ -0,0 +1,117 @@
1
+ // Empty state — what a list, table, chart or dashboard tile shows when it has
2
+ // no content to show.
3
+ // -
4
+ // Sourced from the DELTA design system boards "Empty State – Indicators and
5
+ // Charts", "Empty State – Records List" and "Empty State – Analysis": a
6
+ // centred grey glyph above a short message, with a compact form for indicator
7
+ // tiles and chart wells.
8
+ // -
9
+ // Two deliberate departures from those boards, both for WCAG 2.2 AA:
10
+ // * the boards set "No data" in black at 25% opacity (1.6:1). The text token
11
+ // here is neutral-500 (5.74:1 on white).
12
+ // * the boards show only a message. This adds an optional action slot,
13
+ // because an empty state that cannot be acted on is a dead end.
14
+ // -
15
+ // Usage:
16
+ // <div class="mg-empty-state">
17
+ // <div class="mg-empty-state__media" aria-hidden="true"><svg …></svg></div>
18
+ // <h2 class="mg-empty-state__title">No records yet</h2>
19
+ // <p class="mg-empty-state__description">…</p>
20
+ // <div class="mg-empty-state__actions"><a class="mg-button" …>Add</a></div>
21
+ // </div>
22
+
23
+ .mg-empty-state {
24
+ display: flex;
25
+ flex-direction: column;
26
+ align-items: center;
27
+ gap: var(--mg-empty-state-gap);
28
+ padding: var(--mg-empty-state-padding);
29
+ font-family: var(--mg-font-family-text);
30
+ text-align: center;
31
+
32
+ &__media {
33
+ display: flex;
34
+ align-items: center;
35
+ justify-content: center;
36
+ inline-size: var(--mg-empty-state-media-size);
37
+ block-size: var(--mg-empty-state-media-size);
38
+
39
+ // Inline SVGs drawn with currentColor pick this up; so does an icon font.
40
+ color: var(--mg-empty-state-media-color);
41
+
42
+ > svg,
43
+ > img {
44
+ inline-size: 100%;
45
+ block-size: auto;
46
+ }
47
+ }
48
+
49
+ // Class, not a tag: the heading level belongs to the page, and inside a
50
+ // table cell a <p> is often the honest choice.
51
+ &__title {
52
+ margin: 0;
53
+ font-family: var(--mg-font-family-ui);
54
+ font-size: var(--mg-empty-state-title-font-size);
55
+ font-weight: 700;
56
+ line-height: 1.3;
57
+ color: var(--mg-empty-state-title-color);
58
+ }
59
+
60
+ &__description {
61
+ max-inline-size: var(--mg-empty-state-max-inline-size);
62
+ margin: 0;
63
+ font-size: var(--mg-empty-state-text-font-size);
64
+ line-height: 1.5;
65
+ color: var(--mg-empty-state-text-color);
66
+ text-wrap: pretty;
67
+ }
68
+
69
+ &__actions {
70
+ display: flex;
71
+ flex-wrap: wrap;
72
+ gap: var(--mg-empty-state-actions-gap);
73
+ align-items: center;
74
+ justify-content: center;
75
+ margin-block-start: var(--mg-spacing-50);
76
+ }
77
+ }
78
+
79
+ // --panel: a tinted well, for a dashboard tile or a chart that has no series.
80
+ .mg-empty-state--panel {
81
+ background-color: var(--mg-empty-state-panel-background);
82
+ border-radius: var(--mg-empty-state-panel-radius);
83
+ }
84
+
85
+ // --compact: indicator tiles and small chart wells, where the message is a
86
+ // bare "No data" and there is no room for a heading.
87
+ .mg-empty-state--compact {
88
+ gap: var(--mg-spacing-50);
89
+ padding: var(--mg-empty-state-compact-padding);
90
+
91
+ .mg-empty-state__media {
92
+ inline-size: var(--mg-empty-state-compact-media-size);
93
+ block-size: var(--mg-empty-state-compact-media-size);
94
+ }
95
+
96
+ .mg-empty-state__title,
97
+ .mg-empty-state__description {
98
+ font-size: var(--mg-empty-state-compact-font-size);
99
+ }
100
+ }
101
+
102
+ // --start: left-aligned in LTR, right-aligned in RTL.
103
+ .mg-empty-state--start {
104
+ align-items: flex-start;
105
+ text-align: start;
106
+
107
+ .mg-empty-state__actions {
108
+ justify-content: flex-start;
109
+ }
110
+ }
111
+
112
+ // Inside a table, the empty state lives in a full-width cell so the table's
113
+ // row/column semantics stay intact.
114
+ .mg-empty-state-cell {
115
+ padding: 0;
116
+ text-align: center;
117
+ }
@@ -52,7 +52,7 @@ details.mg-details {
52
52
  border-radius: 50%;
53
53
  content: "+";
54
54
  display: flex;
55
- font-family: $mg-font-family;
55
+ font-family: var(--mg-font-family-text);
56
56
  font-size: $mg-font-size-400;
57
57
  font-weight: 400;
58
58
  height: mg-rem(30);
@@ -0,0 +1,64 @@
1
+ // Status label — a workflow status shown as a coloured indicator plus its name.
2
+ // -
3
+ // Sourced from the DELTA design system board "Status Labels for Records and
4
+ // Events": a 14px dot, an 8px gap, and the status name at 16px. The four
5
+ // statuses and their colours are DELTA's editorial workflow; the pattern
6
+ // itself (a record has a state, and a list has to show it) is general to
7
+ // UNDRR content products, so the base class is status-agnostic and the four
8
+ // DELTA states are modifiers.
9
+ // -
10
+ // The name is always present, so the colour is never the only cue (SC 1.4.1).
11
+ // -
12
+ // Usage:
13
+ // <span class="mg-status-label mg-status-label--published">
14
+ // <span class="mg-status-label__indicator"></span>
15
+ // Published
16
+ // </span>
17
+
18
+ .mg-status-label {
19
+ display: inline-flex;
20
+ align-items: center;
21
+ gap: var(--mg-status-label-gap);
22
+ font-family: var(--mg-font-family-text);
23
+ font-size: var(--mg-status-label-font-size);
24
+ line-height: 1.5;
25
+ color: var(--mg-status-label-color);
26
+
27
+ // The dot is decoration; the label text carries the meaning.
28
+ &__indicator {
29
+ flex: 0 0 auto;
30
+ inline-size: var(--mg-status-label-indicator-size);
31
+ block-size: var(--mg-status-label-indicator-size);
32
+ background-color: var(--mg-status-label-indicator);
33
+ border: var(--mg-status-label-indicator-border-width) solid
34
+ var(--mg-status-label-indicator-border-color);
35
+ border-radius: var(--mg-status-label-indicator-radius);
36
+ }
37
+ }
38
+
39
+ // DELTA record/event workflow states.
40
+ .mg-status-label--draft .mg-status-label__indicator {
41
+ background-color: var(--mg-status-label-indicator--draft);
42
+ }
43
+
44
+ .mg-status-label--waiting-validation .mg-status-label__indicator {
45
+ background-color: var(--mg-status-label-indicator--waiting-validation);
46
+ }
47
+
48
+ .mg-status-label--waiting-information .mg-status-label__indicator {
49
+ background-color: var(--mg-status-label-indicator--waiting-information);
50
+ }
51
+
52
+ .mg-status-label--published .mg-status-label__indicator {
53
+ background-color: var(--mg-status-label-indicator--published);
54
+ }
55
+
56
+ // A list of statuses — a legend, or a filter summary.
57
+ .mg-status-label-group {
58
+ display: flex;
59
+ flex-wrap: wrap;
60
+ gap: var(--mg-spacing-100) var(--mg-spacing-200);
61
+ padding: 0;
62
+ margin: 0;
63
+ list-style: none;
64
+ }
@@ -15,7 +15,7 @@
15
15
  .mg-tag {
16
16
  display: inline-block;
17
17
  padding: var(--mg-spacing-25) var(--mg-spacing-50);
18
- font-family: $mg-font-family-headings;
18
+ font-family: var(--mg-font-family-ui);
19
19
  font-size: $mg-font-size-250;
20
20
  font-weight: 500;
21
21
  line-height: 1.4;
@@ -114,10 +114,3 @@
114
114
  }
115
115
  }
116
116
  }
117
-
118
- // Arabic font override for tags.
119
- :lang(ar) {
120
- .mg-tag {
121
- font-family: $mg-font-family-arabic-headings;
122
- }
123
- }
@@ -22,8 +22,7 @@
22
22
  }
23
23
 
24
24
  &:focus-visible {
25
- outline: 2px solid rgb(var(--mg-color-interactive));
26
- outline-offset: 2px;
25
+ @include mg-focus-ring;
27
26
  }
28
27
  }
29
28
  }
@@ -1,5 +1,5 @@
1
1
  .mg-breadcrumb {
2
- font-family: $mg-font-family-condensed;
2
+ font-family: var(--mg-font-family-ui);
3
3
  font-weight: 600;
4
4
  margin: mg-rem(10) 0 mg-rem(5);
5
5
  align-items: baseline;
@@ -120,13 +120,6 @@
120
120
  }
121
121
  }
122
122
 
123
- // Arabic
124
- :lang(ar) {
125
- .mg-breadcrumb {
126
- font-family: $mg-font-family-arabic-body;
127
- }
128
- }
129
-
130
123
  @media (prefers-reduced-motion: no-preference) {
131
124
  .mg-breadcrumb li a {
132
125
  transition: opacity 0.2s ease;
@@ -8,7 +8,7 @@
8
8
  color: rgb(var(--mg-color-text));
9
9
  cursor: pointer;
10
10
  display: inline-flex;
11
- font-family: $mg-font-family;
11
+ font-family: var(--mg-font-family-text);
12
12
  font-size: $mg-font-size-250;
13
13
  font-weight: 500;
14
14
  justify-content: center;
@@ -39,16 +39,17 @@
39
39
 
40
40
  &:focus-visible {
41
41
  border-radius: 999px;
42
- box-shadow:
43
- 0 0 0 var(--mg-focus-ring-offset) rgb(var(--mg-color-neutral-0)),
44
- 0 0 0 calc(var(--mg-focus-ring-offset) + var(--mg-focus-ring-width))
45
- rgb(var(--mg-color-focus-ring));
46
- outline: 0;
42
+
43
+ @include mg-focus-ring;
47
44
  }
48
45
 
49
46
  @media (forced-colors: active) {
50
47
  border: 1px solid ButtonText;
51
48
 
49
+ // Deliberately does NOT read --mg-color-focus-ring. In forced-colors
50
+ // mode the UA discards author colours, so a token would be dropped and
51
+ // the ring lost; `Highlight` is the system keyword the OS substitutes
52
+ // with the user's own chosen focus colour. Leave as-is.
52
53
  &:focus-visible {
53
54
  outline: 2px solid Highlight;
54
55
  outline-offset: 2px;
@@ -69,7 +70,3 @@
69
70
  margin-inline-start: var(--mg-spacing-50);
70
71
  }
71
72
  }
72
-
73
- :lang(ar) .mg-chip {
74
- font-family: $mg-font-family-arabic-body;
75
- }
@@ -17,7 +17,7 @@
17
17
  align-items: center;
18
18
  background: transparent;
19
19
  display: flex;
20
- font-family: $mg-font-family;
20
+ font-family: var(--mg-font-family-text);
21
21
  font-size: var(--mg-font-size-button);
22
22
  font-weight: 600;
23
23
  line-height: 1;
@@ -45,11 +45,7 @@
45
45
  // same-colour glow), follows the button's border-radius, and is not clipped
46
46
  // by overflow like an outline can be.
47
47
  &:focus-visible {
48
- box-shadow:
49
- 0 0 0 var(--mg-focus-ring-offset) rgb(var(--mg-color-neutral-0)),
50
- 0 0 0 calc(var(--mg-focus-ring-offset) + var(--mg-focus-ring-width))
51
- rgb(var(--mg-color-focus-ring));
52
- outline: 0;
48
+ @include mg-focus-ring;
53
49
  }
54
50
 
55
51
  @include devicebreak(medium) {
@@ -64,19 +60,27 @@
64
60
  gap: var(--mg-spacing-75);
65
61
  }
66
62
 
67
- button {
68
- &:focus-visible {
69
- box-shadow: 0 0 4px rgb(var(--mg-color-button-background));
70
- outline: 0;
71
- }
72
- }
63
+ // Removed: a bare `button:focus-visible { box-shadow: 0 0 4px
64
+ // var(--mg-color-button-background); outline: 0; }` rule used to live here.
65
+
66
+ // Two things were wrong with it. It was an unscoped element selector, so it
67
+ // stripped the user-agent focus ring from every <button> in a consuming page,
68
+ // including buttons Mangrove does not own and cannot style back. And what it
69
+ // put in place was a glow in the button's own fill colour -- invisible against
70
+ // the thing it surrounds -- which is the exact pattern the comment above
71
+ // argues against.
72
+
73
+ // It is not replaced with a scoped equivalent because none is needed:
74
+ // .mg-button-primary/-secondary/-outline are only ever used alongside
75
+ // .mg-button, which already takes the two-band ring above. Deleting the rule
76
+ // hands unowned buttons back their UA outline, which is the correct default.
73
77
 
74
78
  .mg-button-primary {
75
- background-color: rgb(var(--mg-color-button-background));
79
+ background-color: var(--mg-color-button-background);
76
80
 
77
81
  &:hover {
78
82
  color: rgb(var(--mg-color-button));
79
- background-color: rgb(var(--mg-color-button-background--hover));
83
+ background-color: var(--mg-color-button-background--hover);
80
84
  }
81
85
  }
82
86
 
@@ -154,7 +158,7 @@ button {
154
158
  content: "›";
155
159
  display: inline-flex;
156
160
  flex: 0 0 mg-rem(22);
157
- font-family: $mg-font-family;
161
+ font-family: var(--mg-font-family-text);
158
162
  font-size: mg-rem(18);
159
163
  font-weight: 700;
160
164
  height: mg-rem(22);
@@ -213,10 +217,3 @@ button {
213
217
  // }
214
218
  // }
215
219
  // }
216
-
217
- // Arabic font override
218
- :lang(ar) {
219
- .mg-button {
220
- font-family: $mg-font-family-arabic-body;
221
- }
222
- }
@@ -6,7 +6,7 @@
6
6
  }
7
7
 
8
8
  .mg-share__header {
9
- font-family: $mg-font-family;
9
+ font-family: var(--mg-font-family-text);
10
10
  color: rgb(var(--mg-color-text));
11
11
  font-weight: 600;
12
12
  font-size: $mg-font-size-300;
@@ -28,7 +28,7 @@
28
28
  height: mg-rem(40);
29
29
  padding: var(--mg-spacing-100);
30
30
  border-radius: var(--mg-radius-button);
31
- background-color: rgb(var(--mg-color-button-background));
31
+ background-color: var(--mg-color-button-background);
32
32
  color: rgb(var(--mg-color-button));
33
33
  display: flex;
34
34
  justify-content: center;
@@ -40,9 +40,13 @@
40
40
  background-color: rgb(var(--mg-color-blue-700) / 0.8);
41
41
  }
42
42
 
43
+ // Was a 4px glow in --mg-color-button-background--hover, painted directly on
44
+ // a button whose own fill is --mg-color-button-background: a near-same-colour
45
+ // halo on a filled surface, so effectively no indicator. The two-band ring
46
+ // is judged against its own white separator, so it reads on the filled
47
+ // button regardless of which theme is painting it.
43
48
  &:focus-visible {
44
- box-shadow: 0 0 4px rgb(var(--mg-color-button-background--hover));
45
- outline: 0;
49
+ @include mg-focus-ring;
46
50
  }
47
51
  }
48
52
 
@@ -54,7 +58,7 @@
54
58
  cursor: pointer;
55
59
  border: 0 solid var(--mg-border-color-button);
56
60
  color: rgb(var(--mg-color-button));
57
- font-family: $mg-font-family;
61
+ font-family: var(--mg-font-family-text);
58
62
  padding: var(--mg-spacing-100);
59
63
  background-color: rgb(var(--mg-color-blue-900));
60
64
 
@@ -101,11 +105,3 @@
101
105
  width: 18px;
102
106
  }
103
107
  }
104
-
105
- // Arabic
106
- :lang(ar) {
107
- .mg-share__header,
108
- .mg-share__copy-button {
109
- font-family: $mg-font-family-arabic-body;
110
- }
111
- }
@@ -29,6 +29,11 @@
29
29
  aspect-ratio: 16/9;
30
30
  border-radius: calc(var(--mg-card-border-radius) / 2);
31
31
  overflow: hidden;
32
+
33
+ // Not a focus indicator: a decorative hairline that keeps a pale image
34
+ // from bleeding into the card surface. Deliberately does NOT read
35
+ // --mg-color-focus-ring; it is painted on the visual at rest, on every
36
+ // card, whether or not anything is focused.
32
37
  outline: 1px solid rgb(var(--mg-color-neutral-900) / 0.1);
33
38
  }
34
39
 
@@ -82,6 +87,11 @@
82
87
  .mg-card__visual {
83
88
  border-radius: calc(var(--mg-card-border-radius) / 2);
84
89
  overflow: hidden;
90
+
91
+ // Not a focus indicator: a decorative hairline that keeps a pale image
92
+ // from bleeding into the card surface. Deliberately does NOT read
93
+ // --mg-color-focus-ring; it is painted on the visual at rest, on every
94
+ // card, whether or not anything is focused.
85
95
  outline: 1px solid rgb(var(--mg-color-neutral-900) / 0.1);
86
96
  }
87
97
 
@@ -138,7 +148,7 @@
138
148
  }
139
149
 
140
150
  &__title {
141
- font-family: $mg-font-family-headings;
151
+ font-family: var(--mg-font-family-ui);
142
152
  font-size: $mg-font-size-500;
143
153
  font-weight: bold;
144
154
  line-height: $mg-font-line-height-500;
@@ -265,7 +275,7 @@ $card-variant-colours: (
265
275
  }
266
276
 
267
277
  .mg-card__label {
268
- font-family: $mg-font-family-headings;
278
+ font-family: var(--mg-font-family-ui);
269
279
  font-weight: 700;
270
280
  }
271
281
 
@@ -570,7 +580,7 @@ $card-variant-colours: (
570
580
  color: rgb(var(--mg-color-white));
571
581
 
572
582
  &:focus-visible {
573
- outline-color: rgb(var(--mg-color-white));
583
+ outline-color: rgb(var(--mg-color-focus-ring-inverse));
574
584
  }
575
585
  }
576
586
  }
@@ -594,14 +604,4 @@ $card-variant-colours: (
594
604
  }
595
605
  }
596
606
 
597
- // Arabic font override for card titles and labels. Covers all card variants
598
- // (Vertical, Horizontal, Book, Icon) since they share .mg-card__title.
599
- :lang(ar) {
600
- .mg-card__title,
601
- .mg-card__title a,
602
- .mg-card__label {
603
- font-family: $mg-font-family-arabic-headings;
604
- }
605
- }
606
-
607
607
  /* content-card end */
@@ -31,7 +31,7 @@
31
31
  }
32
32
 
33
33
  &__label {
34
- font-family: $mg-font-family-headings;
34
+ font-family: var(--mg-font-family-ui);
35
35
  font-size: $mg-font-size-200;
36
36
  font-weight: 600;
37
37
  color: rgb(var(--mg-color-tag));
@@ -41,7 +41,7 @@
41
41
  }
42
42
 
43
43
  &__value {
44
- font-family: $mg-font-family-headings;
44
+ font-family: var(--mg-font-family-ui);
45
45
 
46
46
  // Tabular lining figures: "1,200" and "1,777" align column-wise when stacked
47
47
  // and disambiguate condensed digits at display scale.
@@ -81,7 +81,7 @@
81
81
  }
82
82
 
83
83
  &__bottom-label {
84
- font-family: $mg-font-family-headings;
84
+ font-family: var(--mg-font-family-ui);
85
85
  font-size: $mg-font-size-500;
86
86
  font-weight: 600;
87
87
  color: rgb(var(--mg-color-text));
@@ -207,7 +207,7 @@
207
207
  color: rgb(var(--mg-color-white));
208
208
 
209
209
  &:focus {
210
- outline-color: rgb(var(--mg-color-white));
210
+ outline-color: rgb(var(--mg-color-focus-ring-inverse));
211
211
  }
212
212
  }
213
213
  }
@@ -215,7 +215,7 @@
215
215
 
216
216
  // Focus styles for linked cards
217
217
  .mg-stats-card-item a.mg-stats-card-item__value:focus-visible::after {
218
- outline-color: rgb(var(--mg-color-white));
218
+ outline-color: rgb(var(--mg-color-focus-ring-inverse));
219
219
  }
220
220
  }
221
221
 
@@ -228,12 +228,3 @@
228
228
  }
229
229
  }
230
230
  }
231
-
232
- // Arabic font override for stat labels and values.
233
- :lang(ar) {
234
- .mg-stats-card-item__value,
235
- .mg-stats-card-item__bottom-label,
236
- .mg-stats-card-item__label {
237
- font-family: $mg-font-family-arabic-headings;
238
- }
239
- }
@@ -26,7 +26,7 @@
26
26
  --cc-cookie-table-border: rgb(var(--mg-color-neutral-200)) !important;
27
27
  --cc-separator-border-color: rgb(var(--mg-color-neutral-200)) !important;
28
28
  --cc-overlay-bg: rgb(var(--mg-color-neutral-900) / 0.82) !important;
29
- --cc-font-family: #{$mg-font-family} !important;
29
+ --cc-font-family: var(--mg-font-family-text) !important;
30
30
  --cc-modal-border-radius: var(--mg-card-border-radius) !important;
31
31
  --cc-btn-border-radius: var(--mg-radius-button) !important;
32
32
 
@@ -44,7 +44,7 @@
44
44
  .c-bn,
45
45
  .cm__btn,
46
46
  .pm__btn {
47
- font-family: $mg-font-family;
47
+ font-family: var(--mg-font-family-text);
48
48
  font-weight: 600;
49
49
 
50
50
  @media (prefers-reduced-motion: no-preference) {
@@ -72,11 +72,3 @@
72
72
  box-shadow: 0 -8px 24px rgb(var(--mg-color-neutral-900) / 0.08);
73
73
  }
74
74
  }
75
-
76
- :lang(ar) #cc-main {
77
- .c-bn,
78
- .cm__btn,
79
- .pm__btn {
80
- font-family: $mg-font-family-arabic-body;
81
- }
82
- }
@@ -19,20 +19,13 @@
19
19
  }
20
20
 
21
21
  .mg-footer--about-footer--links {
22
- font-family: $mg-font-family-headings;
22
+ font-family: var(--mg-font-family-ui);
23
23
  font-size: $mg-font-size-500;
24
24
  display: inline-flex;
25
25
  flex-wrap: wrap;
26
26
  gap: mg-rem(7.5) mg-rem(20);
27
27
  }
28
28
 
29
- // Arabic font override for about-footer links.
30
- :lang(ar) {
31
- .mg-footer--about-footer--links {
32
- font-family: $mg-font-family-arabic-headings;
33
- }
34
- }
35
-
36
29
  .mg-footer--about-footer--description {
37
30
  font-size: $mg-font-size-400;
38
31
  }