@undrr/undrr-mangrove 1.4.0 → 1.5.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/README.md +5 -8
- package/components/BarChart.js +1 -1
- package/components/BookCard.js +2 -2
- package/components/Breadcrumbs.js +2 -2
- package/components/Checkbox.js +1 -1
- package/components/Chips.js +1 -1
- package/components/CtaButton.js +2 -2
- package/components/EmbedContainer.js +1 -1
- package/components/Fetcher.js +1 -1
- package/components/Footer.js +1 -1
- package/components/FormErrorSummary.js +1 -1
- package/components/FormGroup.js +1 -1
- package/components/FullWidth.js +1 -1
- package/components/Gallery.js +1 -1
- package/components/Hero.js +2 -2
- package/components/HighlightBox.js +1 -1
- package/components/HorizontalBookCard.js +2 -2
- package/components/HorizontalCard.js +2 -2
- package/components/IconCard.js +2 -2
- package/components/Loader.js +1 -1
- package/components/MapComponent.js +1 -1
- package/components/MegaMenu.js +2 -2
- package/components/PageHeader.js +1 -1
- package/components/Pager.js +1 -1
- package/components/QuoteHighlight.js +1 -1
- package/components/Radio.js +1 -1
- package/components/ScrollContainer.js +1 -1
- package/components/Select.js +1 -1
- package/components/ShareButtons.js +2 -2
- package/components/ShowMore.js +2 -2
- package/components/StatsCard.js +1 -1
- package/components/SyndicationSearchWidget.js +2 -2
- package/components/Tab.js +2 -2
- package/components/TextCta.js +1 -1
- package/components/TextInput.js +1 -1
- package/components/Textarea.js +1 -1
- package/components/VerticalCard.js +2 -2
- package/components/hydrate.js +1 -1
- package/css/style-delta.css +15 -12
- package/css/style-delta.css.map +1 -1
- package/css/style-gutenberg.css +6 -3
- package/css/style-gutenberg.css.map +1 -1
- package/css/style-irp-legacy.css +14 -11
- package/css/style-irp-legacy.css.map +1 -1
- package/css/style-irp.css +14 -11
- package/css/style-irp.css.map +1 -1
- package/css/style-legacy.css +14 -11
- package/css/style-legacy.css.map +1 -1
- package/css/style-mcr-legacy.css +14 -11
- package/css/style-mcr-legacy.css.map +1 -1
- package/css/style-mcr.css +14 -11
- package/css/style-mcr.css.map +1 -1
- package/css/style-preventionweb-legacy.css +14 -11
- package/css/style-preventionweb-legacy.css.map +1 -1
- package/css/style-preventionweb.css +14 -11
- package/css/style-preventionweb.css.map +1 -1
- package/css/style.css +14 -11
- package/css/style.css.map +1 -1
- package/error-pages/401.html +1 -1
- package/error-pages/403.html +1 -1
- package/error-pages/404.html +1 -1
- package/error-pages/429.html +1 -1
- package/error-pages/500.html +1 -1
- package/error-pages/502.html +1 -1
- package/error-pages/503.html +1 -1
- package/error-pages/504.html +1 -1
- package/error-pages/5xx.html +1 -1
- package/error-pages/challenge.html +1 -1
- package/error-pages/managed-challenge.html +1 -1
- package/js/README.md +57 -0
- package/js/__tests__/show-more.test.js +76 -0
- package/js/__tests__/table-of-contents.test.js +198 -0
- package/js/on-this-page-nav.js +571 -0
- package/js/show-more.js +24 -3
- package/js/table-of-contents.js +168 -0
- package/js/tabs.js +18 -2
- package/package.json +1 -1
- package/scss/Atom/Icons/_icon-definitions.scss +319 -0
- package/scss/Atom/Icons/icons.scss +153 -232
- package/scss/Atom/Table/table.scss +1 -1
- package/scss/Components/Breadcrumbs/breadcrumbs.scss +25 -9
- package/scss/Components/Buttons/CtaButton/cta-button.scss +4 -29
- package/scss/Components/Buttons/ShareButtons/share-buttons.scss +0 -6
- package/scss/Components/Cards/Card/card.scss +7 -7
- package/scss/Components/Cards/StatsCard/stats-card.scss +2 -2
- package/scss/Components/Gallery/gallery.scss +3 -3
- package/scss/Components/Hero/hero.scss +25 -6
- package/scss/Components/MegaMenu/mega-menu.scss +26 -13
- package/scss/Components/OnThisPageNav/on-this-page-nav.scss +206 -0
- package/scss/Components/PageHeader/page-header.scss +1 -1
- package/scss/Components/ScrollContainer/scroll-container.scss +1 -1
- package/scss/Components/Snackbar/snackbar.scss +1 -1
- package/scss/Components/SyndicationSearchWidget/syndication-search-widget.scss +4 -4
- package/scss/Components/Tab/tab.scss +2 -2
- package/scss/Components/TableOfContents/TableOfContents.scss +3 -0
- package/scss/Components/TextCta/text-cta.scss +16 -6
- package/scss/Utilities/FullWidth/full-width.scss +1 -1
- package/scss/Utilities/ShowMore/show-more.scss +1 -1
- package/scss/assets/scss/_components.scss +4 -0
- package/scss/assets/scss/_variables-delta.scss +6 -1
- package/scss/assets/scss/_variables.scss +35 -2
|
@@ -27,18 +27,28 @@
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
// Button overrides
|
|
30
|
+
a.mg-button,
|
|
31
|
+
a.mg-button:hover,
|
|
32
|
+
a.mg-button:visited {
|
|
33
|
+
color: $mg-color-hero;
|
|
34
|
+
}
|
|
35
|
+
|
|
30
36
|
a.mg-button-primary {
|
|
31
37
|
background-color: $mg-color-neutral-0;
|
|
32
38
|
}
|
|
33
39
|
|
|
34
|
-
a.mg-button-secondary
|
|
35
|
-
|
|
40
|
+
a.mg-button-secondary,
|
|
41
|
+
a.mg-button-secondary:hover,
|
|
42
|
+
a.mg-button-secondary:visited {
|
|
43
|
+
background-color: $mg-color-hero-button-secondary-background;
|
|
44
|
+
color: $mg-color-hero-button-secondary-color;
|
|
45
|
+
border-color: $mg-border-color-hero-button-secondary;
|
|
36
46
|
}
|
|
37
47
|
|
|
38
|
-
a.mg-button
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
48
|
+
a.mg-button:focus-visible {
|
|
49
|
+
box-shadow: 0 0 0 2px $mg-color-neutral-0;
|
|
50
|
+
outline: 2px solid $mg-color-neutral-0;
|
|
51
|
+
outline-offset: 2px;
|
|
42
52
|
}
|
|
43
53
|
|
|
44
54
|
&__overlay {
|
|
@@ -182,6 +192,15 @@ $variant-colours: (
|
|
|
182
192
|
a.mg-button:visited {
|
|
183
193
|
color: #{$color};
|
|
184
194
|
}
|
|
195
|
+
|
|
196
|
+
// Preserve secondary button's dedicated tokens over the generic color above
|
|
197
|
+
a.mg-button-secondary,
|
|
198
|
+
a.mg-button-secondary:hover,
|
|
199
|
+
a.mg-button-secondary:visited {
|
|
200
|
+
background-color: $mg-color-hero-button-secondary-background;
|
|
201
|
+
color: $mg-color-hero-button-secondary-color;
|
|
202
|
+
border-color: $mg-border-color-hero-button-secondary;
|
|
203
|
+
}
|
|
185
204
|
}
|
|
186
205
|
}
|
|
187
206
|
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
position: relative;
|
|
3
3
|
background: $mg-color-white;
|
|
4
4
|
box-shadow: 0 2px 3px 0 rgb(51 51 51 / 0.31);
|
|
5
|
-
z-index:
|
|
5
|
+
z-index: $mg-z-index-nav;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
.mg-mega-topbar {
|
|
9
9
|
width: 100%;
|
|
10
10
|
display: flex;
|
|
11
11
|
align-items: flex-start;
|
|
12
|
-
z-index:
|
|
12
|
+
z-index: $mg-z-index-nav;
|
|
13
13
|
padding: 0;
|
|
14
14
|
max-width: $mg-breakpoint-desktop;
|
|
15
15
|
margin: 0 auto;
|
|
@@ -89,10 +89,10 @@
|
|
|
89
89
|
margin: 0;
|
|
90
90
|
list-style: none;
|
|
91
91
|
|
|
92
|
-
//
|
|
92
|
+
// Clip overflow on mobile so the scrolling content hint works correctly.
|
|
93
|
+
// pointer-events is left as auto here — it is restricted only when JS has
|
|
94
|
+
// initialised the full mega menu (see .mg-mega-wrapper--js-active below).
|
|
93
95
|
@media screen and (max-width: $mg-breakpoint-tablet) {
|
|
94
|
-
// Items are there but non-interactive on mobile (hamburger opens sidebar)
|
|
95
|
-
pointer-events: none;
|
|
96
96
|
overflow: hidden;
|
|
97
97
|
flex: 1;
|
|
98
98
|
min-width: 0;
|
|
@@ -101,11 +101,8 @@
|
|
|
101
101
|
|
|
102
102
|
// Hide desktop menu items on mobile/tablet, show on desktop
|
|
103
103
|
&__item {
|
|
104
|
-
pointer-events: none; // on mobile we only advertise the buttons, but not clickable
|
|
105
|
-
|
|
106
104
|
@media screen and (min-width: $mg-breakpoint-tablet) {
|
|
107
105
|
display: block;
|
|
108
|
-
pointer-events: unset;
|
|
109
106
|
}
|
|
110
107
|
|
|
111
108
|
.mg-mega-content {
|
|
@@ -197,7 +194,7 @@
|
|
|
197
194
|
border-radius: $mg-radius-tab;
|
|
198
195
|
box-shadow: -1px 5px 10px -1px rgb(0 0 0 / 0.25);
|
|
199
196
|
inset-inline-start: 0;
|
|
200
|
-
z-index: 1;
|
|
197
|
+
z-index: 1; // submenu floats above page content within mega-menu stacking context
|
|
201
198
|
width: 100%;
|
|
202
199
|
|
|
203
200
|
// Desktop: Float over content with horizontal layout
|
|
@@ -593,7 +590,7 @@
|
|
|
593
590
|
position: absolute;
|
|
594
591
|
overflow: auto;
|
|
595
592
|
background-color: $mg-color-interactive-active;
|
|
596
|
-
z-index:
|
|
593
|
+
z-index: $mg-z-index-nav;
|
|
597
594
|
|
|
598
595
|
// Mobile-first: Full-width mobile sidebar
|
|
599
596
|
width: 100%;
|
|
@@ -664,7 +661,7 @@
|
|
|
664
661
|
cursor: pointer;
|
|
665
662
|
align-items: start;
|
|
666
663
|
justify-content: start;
|
|
667
|
-
z-index:
|
|
664
|
+
z-index: $mg-z-index-nav-toggle;
|
|
668
665
|
display: flex;
|
|
669
666
|
|
|
670
667
|
// Hide mobile button on desktop
|
|
@@ -695,7 +692,7 @@
|
|
|
695
692
|
position: absolute;
|
|
696
693
|
top: 0;
|
|
697
694
|
inset-inline-start: 0; // RTL-friendly
|
|
698
|
-
z-index:
|
|
695
|
+
z-index: $mg-z-index-nav - 1;
|
|
699
696
|
display: block;
|
|
700
697
|
overflow: auto;
|
|
701
698
|
background-color: $mg-color-interactive;
|
|
@@ -725,7 +722,7 @@
|
|
|
725
722
|
border: none;
|
|
726
723
|
padding: 0;
|
|
727
724
|
cursor: pointer;
|
|
728
|
-
z-index:
|
|
725
|
+
z-index: $mg-z-index-nav - 1;
|
|
729
726
|
|
|
730
727
|
// Desktop: Hide
|
|
731
728
|
@media screen and (min-width: $mg-breakpoint-tablet) {
|
|
@@ -748,3 +745,19 @@
|
|
|
748
745
|
font-family: $mg-font-family-arabic-body;
|
|
749
746
|
}
|
|
750
747
|
}
|
|
748
|
+
|
|
749
|
+
// Full JS mega menu — sidebar handles mobile nav, so topbar items must NOT be
|
|
750
|
+
// interactive on small screens. This class is added by the React component on
|
|
751
|
+
// mount (useEffect), so it is absent when JS fails or has not yet hydrated,
|
|
752
|
+
// preserving a clickable fallback for server-rendered nav markup.
|
|
753
|
+
.mg-mega-wrapper--js-active {
|
|
754
|
+
@media screen and (max-width: $mg-breakpoint-tablet) {
|
|
755
|
+
.mg-mega-topbar__nav {
|
|
756
|
+
pointer-events: none;
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
.mg-mega-topbar__item {
|
|
760
|
+
pointer-events: none;
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
}
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
// On this page nav
|
|
2
|
+
// https://gitlab.com/undrr/web-backlog/-/issues/337
|
|
3
|
+
// A sticky horizontal navigation bar that links to page sections.
|
|
4
|
+
// Supports auto-detected headings or explicit author-provided links,
|
|
5
|
+
// with optional CTA button and scroll-spy active state.
|
|
6
|
+
|
|
7
|
+
.mg-on-this-page-nav {
|
|
8
|
+
// --mg-on-this-page-nav-offset: docking offset for fixed headers (default: 0px).
|
|
9
|
+
// Set this in your theme CSS to dock below a sticky MegaMenu or header.
|
|
10
|
+
position: sticky;
|
|
11
|
+
top: var(--mg-on-this-page-nav-offset, 0);
|
|
12
|
+
z-index: $mg-z-index-sticky; // above MegaMenu, below PageHeader
|
|
13
|
+
display: flex;
|
|
14
|
+
align-items: center;
|
|
15
|
+
background: $mg-color-neutral-0;
|
|
16
|
+
box-shadow: 0 2px 3px 0 rgb(51 51 51 / 0.31);
|
|
17
|
+
padding: 0 $mg-container-spacer;
|
|
18
|
+
|
|
19
|
+
// Full-bleed: break out of any parent container to span the viewport.
|
|
20
|
+
// Works even when nested inside an mg-container or Drupal content column.
|
|
21
|
+
width: 100vw;
|
|
22
|
+
margin-inline-start: calc(50% - 50vw);
|
|
23
|
+
|
|
24
|
+
// Un-stick on short viewports so the bar doesn't dominate the screen.
|
|
25
|
+
// GOV.UK accessibility research found sticky elements at 400% zoom consumed
|
|
26
|
+
// 30%+ of viewport — this prevents that. (technology.blog.gov.uk/2018/05/21)
|
|
27
|
+
@media screen and (height <= 400px) {
|
|
28
|
+
position: static;
|
|
29
|
+
box-shadow: none;
|
|
30
|
+
border-bottom: 1px solid $mg-color-neutral-50;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@media screen and (min-width: $mg-breakpoint-tablet) {
|
|
34
|
+
padding: 0 $mg-spacing-200;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&--hidden {
|
|
38
|
+
display: none;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&__list {
|
|
42
|
+
display: flex;
|
|
43
|
+
align-items: center;
|
|
44
|
+
list-style: none;
|
|
45
|
+
margin: 0;
|
|
46
|
+
padding: 0;
|
|
47
|
+
overflow-x: auto;
|
|
48
|
+
overscroll-behavior-x: contain;
|
|
49
|
+
flex: 1 1 auto;
|
|
50
|
+
|
|
51
|
+
// Fade gradient on the trailing edge signals more content is scrollable.
|
|
52
|
+
// Uses mask-image so the fade is transparent (works on any background).
|
|
53
|
+
// padding-inline-end gives the fade space so text isn't masked mid-character.
|
|
54
|
+
padding-inline-end: $mg-spacing-300;
|
|
55
|
+
-webkit-mask-image: linear-gradient(to right, #000 calc(100% - #{$mg-spacing-500}), transparent);
|
|
56
|
+
mask-image: linear-gradient(to right, #000 calc(100% - #{$mg-spacing-500}), transparent);
|
|
57
|
+
|
|
58
|
+
// Hide scrollbar but keep functional
|
|
59
|
+
scrollbar-width: none;
|
|
60
|
+
|
|
61
|
+
&::-webkit-scrollbar {
|
|
62
|
+
display: none;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// When content is scrolled left, also fade the leading edge so users know
|
|
66
|
+
// items are hidden behind the scroll button on that side.
|
|
67
|
+
.mg-on-this-page-nav--has-left-overflow & {
|
|
68
|
+
padding-inline-start: $mg-spacing-300;
|
|
69
|
+
-webkit-mask-image: linear-gradient(to right, transparent, #000 #{$mg-spacing-500}, #000 calc(100% - #{$mg-spacing-500}), transparent);
|
|
70
|
+
mask-image: linear-gradient(to right, transparent, #000 #{$mg-spacing-500}, #000 calc(100% - #{$mg-spacing-500}), transparent);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
&__item {
|
|
75
|
+
flex-shrink: 0;
|
|
76
|
+
display: flex;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
&__link {
|
|
80
|
+
display: block;
|
|
81
|
+
padding: $mg-spacing-150 $mg-spacing-150;
|
|
82
|
+
font-family: $mg-font-family-condensed;
|
|
83
|
+
font-size: $mg-font-size-250;
|
|
84
|
+
font-weight: 600;
|
|
85
|
+
color: $mg-color-neutral-600;
|
|
86
|
+
text-decoration: none;
|
|
87
|
+
white-space: nowrap;
|
|
88
|
+
border-bottom: 3px solid transparent;
|
|
89
|
+
transition: color 0.2s ease, border-color 0.2s ease;
|
|
90
|
+
|
|
91
|
+
@media (prefers-reduced-motion: reduce) {
|
|
92
|
+
transition: none;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
&:hover {
|
|
96
|
+
color: $mg-color-interactive-active;
|
|
97
|
+
border-bottom-color: $mg-color-interactive-active;
|
|
98
|
+
text-decoration: none;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
&:focus-visible {
|
|
102
|
+
outline: 2px solid $mg-color-interactive;
|
|
103
|
+
outline-offset: -2px;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// Active state and active+hover — active wins over hover
|
|
107
|
+
&--active,
|
|
108
|
+
&--active:hover {
|
|
109
|
+
color: $mg-color-interactive;
|
|
110
|
+
border-bottom-color: $mg-color-interactive;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
&__cta {
|
|
115
|
+
flex-shrink: 0;
|
|
116
|
+
margin-inline-start: auto;
|
|
117
|
+
padding: $mg-spacing-150 $mg-spacing-150;
|
|
118
|
+
font-family: $mg-font-family-condensed;
|
|
119
|
+
font-size: $mg-font-size-250;
|
|
120
|
+
font-weight: 600;
|
|
121
|
+
color: $mg-color-neutral-0;
|
|
122
|
+
background: $mg-color-interactive;
|
|
123
|
+
text-decoration: none;
|
|
124
|
+
white-space: nowrap;
|
|
125
|
+
border: 0;
|
|
126
|
+
cursor: pointer;
|
|
127
|
+
transition: background-color 0.2s ease;
|
|
128
|
+
|
|
129
|
+
@media (prefers-reduced-motion: reduce) {
|
|
130
|
+
transition: none;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
&:hover {
|
|
134
|
+
background: $mg-color-interactive-active;
|
|
135
|
+
text-decoration: none;
|
|
136
|
+
color: $mg-color-neutral-0;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
&:focus-visible {
|
|
140
|
+
outline: 2px solid $mg-color-interactive;
|
|
141
|
+
outline-offset: 2px;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
// Scroll arrow buttons — injected by JS when the list overflows.
|
|
146
|
+
// hidden attribute is toggled by JS based on scroll position.
|
|
147
|
+
&__scroll-btn {
|
|
148
|
+
flex-shrink: 0;
|
|
149
|
+
align-self: stretch;
|
|
150
|
+
display: flex;
|
|
151
|
+
align-items: center;
|
|
152
|
+
justify-content: center;
|
|
153
|
+
min-width: $mg-spacing-250; // WCAG 2.5.8 minimum touch target (24px)
|
|
154
|
+
padding: 0 $mg-spacing-150;
|
|
155
|
+
border: 0;
|
|
156
|
+
background: $mg-color-neutral-0;
|
|
157
|
+
cursor: pointer;
|
|
158
|
+
color: $mg-color-neutral-600;
|
|
159
|
+
transition: color 0.2s ease;
|
|
160
|
+
|
|
161
|
+
// display:flex above would otherwise override the UA [hidden]{display:none} rule
|
|
162
|
+
// since author styles always beat the user-agent stylesheet.
|
|
163
|
+
&[hidden] {
|
|
164
|
+
display: none;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
@media (prefers-reduced-motion: reduce) {
|
|
168
|
+
transition: none;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
&:hover {
|
|
172
|
+
color: $mg-color-interactive-active;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
&:focus-visible {
|
|
176
|
+
outline: 2px solid $mg-color-interactive;
|
|
177
|
+
outline-offset: -2px;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
svg {
|
|
181
|
+
display: block;
|
|
182
|
+
pointer-events: none;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
// In RTL, flex reversal places prevBtn on the right and nextBtn on the left,
|
|
186
|
+
// so the chevron icons point in the opposite physical direction from the scroll.
|
|
187
|
+
// Flip them so each icon still points toward its scroll destination.
|
|
188
|
+
[dir="rtl"] & {
|
|
189
|
+
svg { transform: scaleX(-1); }
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
// RTL: flex layout places prevBtn at the right (visual-start) edge and nextBtn
|
|
195
|
+
// at the left (visual-end) edge. The JS scrollBy direction, button visibility,
|
|
196
|
+
// and chevron icon direction are all RTL-aware. The mask-image gradient uses
|
|
197
|
+
// physical `to right` which fades the correct edge in LTR; RTL gradient
|
|
198
|
+
// correction is a known open item.
|
|
199
|
+
|
|
200
|
+
// Arabic font override
|
|
201
|
+
:lang(ar) {
|
|
202
|
+
.mg-on-this-page-nav__link,
|
|
203
|
+
.mg-on-this-page-nav__cta {
|
|
204
|
+
font-family: $mg-font-family-arabic-headings;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
url(//www.undrr.org/themes/custom/undrr_common/images/toolbar-background.png)
|
|
13
13
|
no-repeat center center;
|
|
14
14
|
box-shadow: 0 2px 4px 0 rgb(0 0 0 / 0.3);
|
|
15
|
-
z-index:
|
|
15
|
+
z-index: $mg-z-index-header;
|
|
16
16
|
|
|
17
17
|
@media (width >= $mg-breakpoint-tablet) {
|
|
18
18
|
.mg-page-header__container {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
justify-content: center;
|
|
9
9
|
transform: translate(-50%, -300%);
|
|
10
10
|
transition: transform 0.3s ease-in-out;
|
|
11
|
-
z-index:
|
|
11
|
+
z-index: $mg-z-index-toast; // above modals and all page chrome
|
|
12
12
|
width: calc(100% - 32px); // Ensure it works on small screens
|
|
13
13
|
max-width: 600px; // Limit width on large screens
|
|
14
14
|
|
|
@@ -999,7 +999,7 @@ $search-input-padding-x: $mg-spacing-250;
|
|
|
999
999
|
.mg-select__backdrop {
|
|
1000
1000
|
position: fixed;
|
|
1001
1001
|
inset: 0;
|
|
1002
|
-
z-index:
|
|
1002
|
+
z-index: $mg-z-index-modal - 1; // portaled select backdrop — uses modal layer to clear all page chrome
|
|
1003
1003
|
background: transparent;
|
|
1004
1004
|
cursor: default;
|
|
1005
1005
|
}
|
|
@@ -1009,7 +1009,7 @@ $search-input-padding-x: $mg-spacing-250;
|
|
|
1009
1009
|
top: 100%;
|
|
1010
1010
|
left: 0;
|
|
1011
1011
|
right: 0;
|
|
1012
|
-
z-index:
|
|
1012
|
+
z-index: $mg-z-index-modal; // portaled select dropdown — uses modal layer to clear all page chrome
|
|
1013
1013
|
background: #fff;
|
|
1014
1014
|
border: 1px solid $search-primary;
|
|
1015
1015
|
border-top: none;
|
|
@@ -1227,7 +1227,7 @@ $search-input-padding-x: $mg-spacing-250;
|
|
|
1227
1227
|
position: fixed;
|
|
1228
1228
|
inset: 0;
|
|
1229
1229
|
background: rgb(0 0 0 / 0.5);
|
|
1230
|
-
z-index:
|
|
1230
|
+
z-index: $mg-z-index-drawer - 1; // backdrop behind drawer panel
|
|
1231
1231
|
animation: mg-search-fade-in 0.2s ease-out;
|
|
1232
1232
|
cursor: pointer; // Indicate clickable to close
|
|
1233
1233
|
}
|
|
@@ -1252,7 +1252,7 @@ $search-input-padding-x: $mg-spacing-250;
|
|
|
1252
1252
|
display: flex;
|
|
1253
1253
|
flex-direction: column;
|
|
1254
1254
|
animation: mg-search-slide-in-left 0.3s ease-out;
|
|
1255
|
-
z-index:
|
|
1255
|
+
z-index: $mg-z-index-drawer;
|
|
1256
1256
|
cursor: default; // Reset cursor inside drawer
|
|
1257
1257
|
}
|
|
1258
1258
|
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
top: -$mg-spacing-25;
|
|
19
19
|
margin-bottom: -$mg-spacing-25;
|
|
20
20
|
position: relative;
|
|
21
|
-
z-index: 1;
|
|
21
|
+
z-index: 1; // border indicator floats above the tab list background — local to tabbar
|
|
22
22
|
border-bottom: $mg-spacing-25 solid $mg-color-tab-border;
|
|
23
23
|
}
|
|
24
24
|
}
|
|
@@ -167,7 +167,7 @@
|
|
|
167
167
|
background: $mg-color-tab-background--hover;
|
|
168
168
|
border-bottom: $mg-spacing-25 solid $mg-color-tab-border--hover;
|
|
169
169
|
color: $mg-color-text-tab--hover;
|
|
170
|
-
z-index:
|
|
170
|
+
z-index: 2; // border-overlap micro-fix within tabbar stacking context
|
|
171
171
|
text-decoration: none;
|
|
172
172
|
}
|
|
173
173
|
|
|
@@ -111,18 +111,28 @@
|
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
// Button overrides for dark backgrounds (matches Hero pattern)
|
|
114
|
+
a.mg-button,
|
|
115
|
+
a.mg-button:hover,
|
|
116
|
+
a.mg-button:visited {
|
|
117
|
+
color: $mg-color-hero;
|
|
118
|
+
}
|
|
119
|
+
|
|
114
120
|
a.mg-button-primary {
|
|
115
121
|
background-color: $mg-color-neutral-0;
|
|
116
122
|
}
|
|
117
123
|
|
|
118
|
-
a.mg-button-secondary
|
|
119
|
-
|
|
124
|
+
a.mg-button-secondary,
|
|
125
|
+
a.mg-button-secondary:hover,
|
|
126
|
+
a.mg-button-secondary:visited {
|
|
127
|
+
background-color: $mg-color-hero-button-secondary-background;
|
|
128
|
+
color: $mg-color-hero-button-secondary-color;
|
|
129
|
+
border-color: $mg-border-color-hero-button-secondary;
|
|
120
130
|
}
|
|
121
131
|
|
|
122
|
-
a.mg-button
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
132
|
+
a.mg-button:focus-visible {
|
|
133
|
+
box-shadow: 0 0 0 2px $mg-color-neutral-0;
|
|
134
|
+
outline: 2px solid $mg-color-neutral-0;
|
|
135
|
+
outline-offset: 2px;
|
|
126
136
|
}
|
|
127
137
|
}
|
|
128
138
|
|
|
@@ -12,6 +12,9 @@
|
|
|
12
12
|
@import "../../Atom/BaseTypography/Quotation/quotation";
|
|
13
13
|
@import "../../Atom/BaseTypography/Small/small";
|
|
14
14
|
@import "../../Atom/Colors/color";
|
|
15
|
+
|
|
16
|
+
// Icon definitions — included here so every theme CSS file contains icons.
|
|
17
|
+
// See: https://github.com/unisdr/undrr-mangrove/issues/906
|
|
15
18
|
@import "../../Atom/Icons/icons";
|
|
16
19
|
@import "../../Atom/Images/AuthorImage/author-image";
|
|
17
20
|
@import "../../Atom/Images/Image/image";
|
|
@@ -62,6 +65,7 @@
|
|
|
62
65
|
|
|
63
66
|
// CSS+vanilla-JS component — Drupal integration via Gutenberg block, not a React export.
|
|
64
67
|
@import "../../Components/TableOfContents/table-of-contents";
|
|
68
|
+
@import "../../Components/OnThisPageNav/on-this-page-nav";
|
|
65
69
|
@import "../../Components/SyndicationSearchWidget/syndication-search-widget";
|
|
66
70
|
|
|
67
71
|
// CSS+static-HTML component — not a React export. Static pages in dist/assets/error-pages/.
|
|
@@ -52,10 +52,12 @@ $mg-color-button: $delta-color-primary;
|
|
|
52
52
|
$mg-color-button--hover: $delta-color-primary-800;
|
|
53
53
|
$mg-color-button-background: transparent;
|
|
54
54
|
$mg-color-button-background--hover: rgba($delta-color-primary, 0.06);
|
|
55
|
+
$mg-color-button-secondary-background: transparent;
|
|
56
|
+
$mg-color-button-secondary-background--hover: rgba($delta-color-primary, 0.06);
|
|
55
57
|
$mg-color-text-button: $delta-color-primary;
|
|
56
58
|
$mg-border-color-button: $delta-color-primary;
|
|
57
59
|
$mg-radius-button: $mg-spacing-50;
|
|
58
|
-
$mg-border-width-button:
|
|
60
|
+
$mg-border-width-button: 1px;
|
|
59
61
|
$mg-padding-button: $mg-spacing-100 $mg-spacing-200;
|
|
60
62
|
$mg-font-size-button: $mg-font-size-250;
|
|
61
63
|
|
|
@@ -82,6 +84,9 @@ $mg-hero-overlay-max-width: $mg-width-600;
|
|
|
82
84
|
$mg-hero-overlay-padding: $mg-spacing-400;
|
|
83
85
|
$mg-color-hero-title: oklch(68.5% 0.169 237.323);
|
|
84
86
|
$mg-color-hero--tertiary: $delta-color-dark; // Dark CTA banner sections
|
|
87
|
+
$mg-color-hero-button-secondary-background: $delta-color-primary;
|
|
88
|
+
$mg-color-hero-button-secondary-color: $mg-color-white;
|
|
89
|
+
$mg-border-color-hero-button-secondary: $mg-color-white;
|
|
85
90
|
$mg-spacing-hero-overlay: mg-rem(20) 0;
|
|
86
91
|
|
|
87
92
|
// Tabs — TODO: underline vs boxed style needs confirmation from Delta design team
|
|
@@ -310,6 +310,8 @@ $mg-color-button: $mg-color-white !default;
|
|
|
310
310
|
$mg-color-button--hover: $mg-color-white !default;
|
|
311
311
|
$mg-color-button-background: $mg-color-interactive !default;
|
|
312
312
|
$mg-color-button-background--hover: $mg-color-interactive-active !default;
|
|
313
|
+
$mg-color-button-secondary-background: $mg-color-blue-800 !default;
|
|
314
|
+
$mg-color-button-secondary-background--hover: $mg-color-blue-700 !default;
|
|
313
315
|
$mg-radius-button: $mg-spacing-0 !default;
|
|
314
316
|
$mg-border-width-button: 1px !default;
|
|
315
317
|
$mg-color-text-button: $mg-color-white !default;
|
|
@@ -328,9 +330,9 @@ $mg-radius-form-input: $mg-spacing-0 !default;
|
|
|
328
330
|
|
|
329
331
|
// card
|
|
330
332
|
$mg-card-background: none !default;
|
|
331
|
-
$mg-card-padding:
|
|
333
|
+
$mg-card-padding: 0rem !default;
|
|
332
334
|
$mg-card-border-radius: 0 !default;
|
|
333
|
-
$mg-card-icon-badge-radius:
|
|
335
|
+
$mg-card-icon-badge-radius: 20% !default;
|
|
334
336
|
|
|
335
337
|
// CTA banner
|
|
336
338
|
$mg-cta-padding: $mg-spacing-400 0 !default;
|
|
@@ -350,6 +352,9 @@ $mg-color-hero-title: $mg-color-neutral-0 !default;
|
|
|
350
352
|
$mg-spacing-hero-overlay: 0 !default;
|
|
351
353
|
$mg-hero-overlay-max-width: $mg-width-400 !default;
|
|
352
354
|
$mg-hero-overlay-padding: $mg-spacing-200 !default;
|
|
355
|
+
$mg-color-hero-button-secondary-background: rgba($mg-color-neutral-0, 0.9) !default;
|
|
356
|
+
$mg-color-hero-button-secondary-color: $mg-color-hero !default;
|
|
357
|
+
$mg-border-color-hero-button-secondary: $mg-color-neutral-0 !default;
|
|
353
358
|
|
|
354
359
|
// mega menu
|
|
355
360
|
$mg-color-mega-content-bg: $mg-color-button !default;
|
|
@@ -381,6 +386,34 @@ $mg-tabs-border-bottom: true !default;
|
|
|
381
386
|
|
|
382
387
|
$author-image-radius: 50%;
|
|
383
388
|
|
|
389
|
+
// Z-index layers: use these named tokens for global stacking contexts
|
|
390
|
+
// (fixed, sticky, or portaled elements). One token per UI concept — backdrops
|
|
391
|
+
// and sub-layers use $token - 1 / $token + 1 arithmetic within the component
|
|
392
|
+
// SCSS rather than separate variables. Local stacking within a component's own
|
|
393
|
+
// isolated context uses raw values with an explanatory comment.
|
|
394
|
+
// Pick the nearest existing layer; open a GitHub discussion before adding one.
|
|
395
|
+
|
|
396
|
+
/**
|
|
397
|
+
* @tokens Z-index layers
|
|
398
|
+
*/
|
|
399
|
+
|
|
400
|
+
// Background utility — pseudo-element placed behind all sibling content
|
|
401
|
+
$mg-z-index-behind: -1; // ::before backgrounds (e.g. mg-container-full-width)
|
|
402
|
+
|
|
403
|
+
// Navigation zone — ⚠ FROZEN: Drupal themes depend on these exact values
|
|
404
|
+
$mg-z-index-nav: 10; // MegaMenu (mobile sidebar/overlay uses nav - 1 = 9)
|
|
405
|
+
$mg-z-index-sticky: 11; // Secondary sticky bars, e.g. OnThisPageNav
|
|
406
|
+
$mg-z-index-nav-toggle: 14; // Mobile nav hamburger toggle (above all nav layers)
|
|
407
|
+
$mg-z-index-header: 22; // PageHeader (above nav and sticky bar)
|
|
408
|
+
|
|
409
|
+
// Overlay zone — floats above page content
|
|
410
|
+
$mg-z-index-drawer: 2000; // Drawer / side panel (backdrop uses drawer - 1 = 1999)
|
|
411
|
+
$mg-z-index-dropdown: 2500; // Dropdowns and inline menus (above drawers)
|
|
412
|
+
|
|
413
|
+
// Modal zone — portaled to <body>, must clear all page chrome
|
|
414
|
+
$mg-z-index-modal: 5000; // Modal and dialog (backdrop uses modal - 1 = 4999)
|
|
415
|
+
$mg-z-index-toast: 5500; // Toast notifications (Snackbar), above modals
|
|
416
|
+
|
|
384
417
|
/**
|
|
385
418
|
* @tokens-end
|
|
386
419
|
*/
|