@undrr/undrr-mangrove 2.0.1 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/components/BookCard.js +1 -1
- package/components/Breadcrumbs.js +1 -1
- package/components/Checkbox.js +1 -1
- package/components/Chips.js +1 -1
- package/components/CopyButton.js +1 -1
- package/components/CtaButton.js +1 -1
- package/components/Drawer.js +2 -2
- package/components/EmbedContainer.js +1 -1
- package/components/Footer.js +1 -1
- package/components/FormAction.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 +2 -2
- package/components/Hero.js +2 -2
- package/components/HighlightBox.js +1 -1
- package/components/HorizontalBookCard.js +1 -1
- package/components/HorizontalCard.js +1 -1
- package/components/IconCard.js +1 -1
- package/components/Legend.js +1 -1
- package/components/Loader.js +2 -2
- package/components/MegaMenu.js +2 -2
- package/components/Notice.js +1 -1
- package/components/PageHeader.js +1 -1
- package/components/Pager.js +1 -1
- package/components/ProgressBar.js +2 -2
- package/components/QuoteHighlight.js +1 -1
- package/components/Radio.js +1 -1
- package/components/Range.js +1 -1
- package/components/ScrollContainer.js +1 -1
- package/components/SegmentedControl.js +1 -1
- package/components/Select.js +1 -1
- package/components/ServiceNotice.js +1 -1
- package/components/ShareButtons.js +1 -1
- package/components/ShowMore.js +2 -2
- package/components/SkipLink.js +1 -1
- package/components/StatsCard.js +1 -1
- package/components/SyndicationSearchWidget.js +2 -2
- package/components/Tab.js +1 -1
- package/components/TextCta.js +1 -1
- package/components/TextInput.js +1 -1
- package/components/Textarea.js +1 -1
- package/components/Tree.js +1 -1
- package/components/UserFeedback.js +1 -1
- package/components/VerticalCard.js +1 -1
- package/components/hydrate.js +2 -2
- package/css/style-all.css +41 -42
- package/css/style-all.css.map +1 -1
- package/css/style-delta.css +41 -42
- package/css/style-delta.css.map +1 -1
- package/css/style-gutenberg.css +4 -4
- package/css/style-gutenberg.css.map +1 -1
- package/css/style-irp.css +41 -42
- package/css/style-irp.css.map +1 -1
- package/css/style-mcr.css +41 -42
- package/css/style-mcr.css.map +1 -1
- package/css/style-preventionweb.css +41 -42
- package/css/style-preventionweb.css.map +1 -1
- package/css/style.css +41 -42
- package/css/style.css.map +1 -1
- package/docs/EDITORIAL-MANUAL.md +1 -1
- package/docs/llms-motion.txt +125 -0
- 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/cite-this.js +685 -43
- package/js/on-this-page-nav.js +80 -1
- package/js/show-more.js +149 -21
- package/package.json +1 -1
- package/scss/Atom/Images/AuthorImage/author-image.scss +9 -2
- package/scss/Atom/ReachElement/Details/details.scss +4 -2
- package/scss/Components/Cards/Card/card.scss +8 -2
- package/scss/Components/Cards/StatsCard/stats-card.scss +8 -1
- package/scss/Components/CiteThis/cite-this.scss +162 -9
- package/scss/Components/Gallery/gallery.scss +40 -15
- package/scss/Components/Hero/hero.scss +165 -0
- package/scss/Components/MegaMenu/mega-menu.scss +42 -121
- package/scss/Components/Navigation/Drawer/drawer.scss +10 -0
- package/scss/Components/OnThisPageNav/on-this-page-nav.scss +108 -3
- package/scss/Components/SyndicationSearchWidget/syndication-search-widget.scss +258 -127
- package/scss/Components/Tab/tab.scss +2 -1
- package/scss/Patterns/RichContent/rich-content.scss +177 -0
- package/scss/Patterns/_shared/pattern-demo.scss +5 -0
- package/scss/Utilities/Loader/loader.scss +89 -11
- package/scss/Utilities/ShowMore/show-more.scss +6 -0
- package/scss/assets/scss/_components.scss +3 -0
- package/scss/assets/scss/_foundational.scss +23 -8
- package/scss/assets/scss/_mixins.scss +5 -0
- package/scss/assets/scss/_variables.scss +1 -1
|
@@ -105,21 +105,27 @@
|
|
|
105
105
|
top: 50%;
|
|
106
106
|
left: 50%;
|
|
107
107
|
transform: translate(-50%, -50%);
|
|
108
|
+
color: rgb(var(--mg-color-interactive));
|
|
109
|
+
font-size: var(--mg-spacing-300);
|
|
108
110
|
z-index: 3; // loading spinner above nav buttons — local to gallery stacking context
|
|
109
|
-
}
|
|
110
111
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
border-top-color: rgb(var(--mg-color-interactive));
|
|
116
|
-
border-radius: 50%;
|
|
117
|
-
animation: mg-gallery-spin 0.8s linear infinite;
|
|
118
|
-
}
|
|
112
|
+
@media (prefers-reduced-motion: reduce) {
|
|
113
|
+
// The shared Loader reveals translated text. Keep it inside the stage
|
|
114
|
+
// and give the label a stable surface over arbitrary video/posters.
|
|
115
|
+
width: max-content;
|
|
119
116
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
117
|
+
// Reserve both 44px arrow targets, their largest inset, and a focus gap.
|
|
118
|
+
$navigation-space: calc(
|
|
119
|
+
#{mg-rem(44)} + var(--mg-spacing-100) + var(--mg-spacing-50)
|
|
120
|
+
);
|
|
121
|
+
|
|
122
|
+
max-width: calc(100% - 2 * $navigation-space);
|
|
123
|
+
box-sizing: border-box;
|
|
124
|
+
pointer-events: none;
|
|
125
|
+
padding: var(--mg-spacing-75);
|
|
126
|
+
background: rgb(var(--mg-color-neutral-0));
|
|
127
|
+
color: rgb(var(--mg-color-text));
|
|
128
|
+
font-size: var(--mg-font-size-300);
|
|
123
129
|
}
|
|
124
130
|
}
|
|
125
131
|
|
|
@@ -213,7 +219,10 @@
|
|
|
213
219
|
padding: 0;
|
|
214
220
|
position: relative;
|
|
215
221
|
|
|
216
|
-
@include transition(
|
|
222
|
+
@include transition(
|
|
223
|
+
border-color var(--mg-motion-duration-fast)
|
|
224
|
+
var(--mg-motion-easing-standard)
|
|
225
|
+
);
|
|
217
226
|
|
|
218
227
|
@include devicebreak(medium) {
|
|
219
228
|
width: 100%;
|
|
@@ -366,7 +375,11 @@
|
|
|
366
375
|
align-items: center;
|
|
367
376
|
justify-content: center;
|
|
368
377
|
|
|
369
|
-
@include transition(
|
|
378
|
+
@include transition(
|
|
379
|
+
background-color var(--mg-motion-duration-fast)
|
|
380
|
+
var(--mg-motion-easing-standard),
|
|
381
|
+
opacity var(--mg-motion-duration-fast) var(--mg-motion-easing-standard)
|
|
382
|
+
);
|
|
370
383
|
|
|
371
384
|
&:hover {
|
|
372
385
|
background: rgb(var(--mg-color-neutral-600));
|
|
@@ -436,7 +449,11 @@
|
|
|
436
449
|
align-items: center;
|
|
437
450
|
justify-content: center;
|
|
438
451
|
|
|
439
|
-
@include transition(
|
|
452
|
+
@include transition(
|
|
453
|
+
background-color var(--mg-motion-duration-fast)
|
|
454
|
+
var(--mg-motion-easing-standard),
|
|
455
|
+
opacity var(--mg-motion-duration-fast) var(--mg-motion-easing-standard)
|
|
456
|
+
);
|
|
440
457
|
|
|
441
458
|
&:hover {
|
|
442
459
|
background: rgb(var(--mg-color-neutral-600));
|
|
@@ -511,3 +528,11 @@
|
|
|
511
528
|
}
|
|
512
529
|
}
|
|
513
530
|
}
|
|
531
|
+
|
|
532
|
+
@media (prefers-reduced-motion: reduce) {
|
|
533
|
+
.mg-gallery__thumbnail,
|
|
534
|
+
.mg-gallery__arrow,
|
|
535
|
+
.mg-gallery__arrow-button {
|
|
536
|
+
transition: none;
|
|
537
|
+
}
|
|
538
|
+
}
|
|
@@ -748,3 +748,168 @@ $variant-colour-props: (
|
|
|
748
748
|
direction: rtl; // reverses grid item order (content stays first semantically)
|
|
749
749
|
}
|
|
750
750
|
}
|
|
751
|
+
|
|
752
|
+
// Tags below the summary and facts line: a list of outline tags in the
|
|
753
|
+
// hero's own ink, so they read on every surface. On the coloured variants the
|
|
754
|
+
// ink is white, the same pairing as the hero's copy; on the neutral variant it
|
|
755
|
+
// is the interactive colour. The plain fill a .mg-tag has elsewhere would be
|
|
756
|
+
// close to invisible on the theme's hero colour. Tags carrying a Tag modifier
|
|
757
|
+
// (mg-tag--secondary, --accent, …) keep that modifier's styling.
|
|
758
|
+
.mg-hero {
|
|
759
|
+
--mg-hero-tag-color: var(--mg-color-neutral-0);
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
.mg-hero__tags {
|
|
763
|
+
@include mg-list-unmarked;
|
|
764
|
+
|
|
765
|
+
display: flex;
|
|
766
|
+
flex-wrap: wrap;
|
|
767
|
+
gap: var(--mg-spacing-50);
|
|
768
|
+
margin: 0;
|
|
769
|
+
padding: var(--mg-spacing-50) 0;
|
|
770
|
+
|
|
771
|
+
> li {
|
|
772
|
+
margin: 0;
|
|
773
|
+
padding: 0;
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
.mg-tag:not([class*="mg-tag--"]) {
|
|
777
|
+
--mg-tag-foreground: rgb(var(--mg-hero-tag-color));
|
|
778
|
+
--mg-tag-background: transparent;
|
|
779
|
+
--mg-tag-background-hover: transparent;
|
|
780
|
+
|
|
781
|
+
background-color: transparent;
|
|
782
|
+
border-color: currentColor;
|
|
783
|
+
color: rgb(var(--mg-hero-tag-color));
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
// The hero's link colour rules are scoped to its copy; a tag is not copy.
|
|
787
|
+
a.mg-tag:not([class*="mg-tag--"]),
|
|
788
|
+
a.mg-tag:not([class*="mg-tag--"]):visited,
|
|
789
|
+
a.mg-tag:not([class*="mg-tag--"]):hover {
|
|
790
|
+
color: rgb(var(--mg-hero-tag-color));
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
a.mg-tag:hover {
|
|
794
|
+
text-decoration: underline;
|
|
795
|
+
text-underline-offset: 0.15em;
|
|
796
|
+
}
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
// Neutral variant: the page's own white surface, dark copy and the theme's
|
|
800
|
+
// interactive colour for links, for a page header that should not read as a
|
|
801
|
+
// coloured band. Every pairing is a published text token on white, so the
|
|
802
|
+
// contrast is solved rather than sampled: --mg-color-text and
|
|
803
|
+
// --mg-color-interactive both clear 4.5:1 on white in all five themes.
|
|
804
|
+
// --mg-color-hero-title is not used, because DELTA sets it to a light blue
|
|
805
|
+
// meant for a dark surface.
|
|
806
|
+
.mg-hero.mg-hero--neutral {
|
|
807
|
+
--mg-border-color-button-primary: transparent;
|
|
808
|
+
--mg-border-color-button-secondary: transparent;
|
|
809
|
+
--mg-hero-link-color: var(--mg-color-interactive);
|
|
810
|
+
|
|
811
|
+
background-color: rgb(var(--mg-color-neutral-0));
|
|
812
|
+
color: rgb(var(--mg-color-text));
|
|
813
|
+
|
|
814
|
+
// No photograph and no veil: dark copy cannot sit on either.
|
|
815
|
+
&::before {
|
|
816
|
+
content: none;
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
.mg-hero__title,
|
|
820
|
+
.mg-hero__title a,
|
|
821
|
+
.mg-hero__title a:hover,
|
|
822
|
+
.mg-hero__title a:visited {
|
|
823
|
+
color: rgb(var(--mg-color-text));
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
.mg-hero__overlay,
|
|
827
|
+
.mg-hero__content {
|
|
828
|
+
a:hover {
|
|
829
|
+
color: rgb(var(--mg-color-interactive-active));
|
|
830
|
+
}
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
// Outline tags in the interactive colour.
|
|
834
|
+
--mg-hero-tag-color: var(--mg-color-interactive);
|
|
835
|
+
|
|
836
|
+
// Links in the eyebrow, facts line and summary are underlined: colour alone
|
|
837
|
+
// separates them from the text around them by only about 2:1 (WCAG 1.4.1).
|
|
838
|
+
.mg-hero__label a,
|
|
839
|
+
.mg-hero__summaryText a {
|
|
840
|
+
text-decoration: underline;
|
|
841
|
+
text-underline-offset: 0.15em;
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
// Buttons go back to their ordinary page styling.
|
|
845
|
+
a.mg-button,
|
|
846
|
+
a.mg-button:hover,
|
|
847
|
+
a.mg-button:visited {
|
|
848
|
+
color: rgb(var(--mg-color-button));
|
|
849
|
+
}
|
|
850
|
+
|
|
851
|
+
a.mg-button-primary {
|
|
852
|
+
background-color: var(--mg-color-button-background);
|
|
853
|
+
|
|
854
|
+
&:hover {
|
|
855
|
+
background-color: var(--mg-color-button-background--hover);
|
|
856
|
+
}
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
a.mg-button-secondary:not(.mg-button-cta),
|
|
860
|
+
a.mg-button-secondary:not(.mg-button-cta):hover,
|
|
861
|
+
a.mg-button-secondary:not(.mg-button-cta):visited {
|
|
862
|
+
background-color: rgb(var(--mg-color-button-secondary-background));
|
|
863
|
+
border-color: var(--mg-border-color-button-secondary);
|
|
864
|
+
color: rgb(var(--mg-color-button));
|
|
865
|
+
}
|
|
866
|
+
|
|
867
|
+
a.mg-button.mg-button-cta,
|
|
868
|
+
a.mg-button.mg-button-cta:hover,
|
|
869
|
+
a.mg-button.mg-button-cta:visited {
|
|
870
|
+
background: transparent;
|
|
871
|
+
border-color: transparent;
|
|
872
|
+
color: rgb(var(--mg-color-interactive));
|
|
873
|
+
|
|
874
|
+
&::after {
|
|
875
|
+
background: rgb(var(--mg-color-interactive));
|
|
876
|
+
color: rgb(var(--mg-color-neutral-0));
|
|
877
|
+
}
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
a.mg-button:focus-visible {
|
|
881
|
+
@include mg-focus-ring;
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
// The split layout's padding was spacing for a coloured band. On the page
|
|
885
|
+
// surface the copy aligns with the content below, so it starts at the top.
|
|
886
|
+
&.mg-hero--split .mg-hero__content {
|
|
887
|
+
padding-block-start: 0;
|
|
888
|
+
}
|
|
889
|
+
}
|
|
890
|
+
|
|
891
|
+
// Neutral in the background layout drops the photograph even when the markup
|
|
892
|
+
// carries one inline, as Drupal or hand-written markup may: an inline
|
|
893
|
+
// background-image beats any selector, but background-size does not, so the
|
|
894
|
+
// image is sized away. The mobile banner (::after, which inherits the image)
|
|
895
|
+
// and the space reserved for it go too. Three classes, to beat both the
|
|
896
|
+
// mobile banner rules and .mg-hero--no-image.
|
|
897
|
+
.mg-hero.mg-hero--neutral:not(.mg-hero--split) {
|
|
898
|
+
--mg-hero-banner-block-size: 0px;
|
|
899
|
+
|
|
900
|
+
background-size: 0 0;
|
|
901
|
+
|
|
902
|
+
&::after {
|
|
903
|
+
content: none;
|
|
904
|
+
}
|
|
905
|
+
}
|
|
906
|
+
|
|
907
|
+
// On a phone the neutral split hero's image is a short banner above the copy
|
|
908
|
+
// rather than a 16:9 block below it, so the page's first screen keeps the
|
|
909
|
+
// title and summary. Visual order only; the copy stays first in the source.
|
|
910
|
+
.mg-hero.mg-hero--neutral.mg-hero--split .mg-hero__media {
|
|
911
|
+
@media (max-width: $mg-breakpoint-tablet) {
|
|
912
|
+
aspect-ratio: 3 / 1;
|
|
913
|
+
order: -1;
|
|
914
|
+
}
|
|
915
|
+
}
|
|
@@ -188,14 +188,6 @@
|
|
|
188
188
|
background: rgb(var(--mg-color-interactive));
|
|
189
189
|
opacity: 0;
|
|
190
190
|
transform: scaleX(0);
|
|
191
|
-
|
|
192
|
-
@media (prefers-reduced-motion: no-preference) {
|
|
193
|
-
transition:
|
|
194
|
-
transform var(--mg-motion-duration-fast)
|
|
195
|
-
var(--mg-motion-easing-standard),
|
|
196
|
-
opacity var(--mg-motion-duration-fast)
|
|
197
|
-
var(--mg-motion-easing-standard);
|
|
198
|
-
}
|
|
199
191
|
}
|
|
200
192
|
}
|
|
201
193
|
}
|
|
@@ -386,9 +378,9 @@
|
|
|
386
378
|
|
|
387
379
|
font-weight: 600;
|
|
388
380
|
transition:
|
|
389
|
-
background-color
|
|
390
|
-
|
|
391
|
-
|
|
381
|
+
background-color var(--mg-motion-duration-fast)
|
|
382
|
+
var(--mg-motion-easing-standard),
|
|
383
|
+
color var(--mg-motion-duration-fast) var(--mg-motion-easing-standard);
|
|
392
384
|
|
|
393
385
|
&:hover,
|
|
394
386
|
&:focus-visible {
|
|
@@ -405,11 +397,8 @@
|
|
|
405
397
|
inset-inline-end: auto;
|
|
406
398
|
padding-inline-start: var(--mg-spacing-150);
|
|
407
399
|
margin-inline-end: var(--mg-spacing-150);
|
|
408
|
-
transition:
|
|
409
|
-
|
|
410
|
-
inset-inline-start 200ms cubic-bezier(0.4, 0, 0.2, 1),
|
|
411
|
-
inset-inline-end 200ms cubic-bezier(0.4, 0, 0.2, 1),
|
|
412
|
-
opacity 150ms ease;
|
|
400
|
+
transition: opacity var(--mg-motion-duration-fast)
|
|
401
|
+
var(--mg-motion-easing-standard);
|
|
413
402
|
opacity: 0.55;
|
|
414
403
|
}
|
|
415
404
|
|
|
@@ -435,43 +424,9 @@
|
|
|
435
424
|
content: "‹";
|
|
436
425
|
}
|
|
437
426
|
|
|
438
|
-
|
|
439
|
-
@keyframes mg-mega-tab-pulse {
|
|
440
|
-
0% {
|
|
441
|
-
box-shadow:
|
|
442
|
-
inset 4px 0 0 0 rgb(var(--mg-color-button)),
|
|
443
|
-
0 0 0 0 rgb(var(--mg-color-blue-900) / 0);
|
|
444
|
-
}
|
|
445
|
-
60% {
|
|
446
|
-
box-shadow:
|
|
447
|
-
inset 4px 0 0 0 rgb(var(--mg-color-button)),
|
|
448
|
-
0 0 0 8px rgb(var(--mg-color-blue-900) / 0.12);
|
|
449
|
-
}
|
|
450
|
-
100% {
|
|
451
|
-
box-shadow:
|
|
452
|
-
inset 4px 0 0 0 rgb(var(--mg-color-button)),
|
|
453
|
-
0 0 0 0 rgb(var(--mg-color-blue-900) / 0);
|
|
454
|
-
}
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
.mg-mega-content__section-list-link--active {
|
|
458
|
-
animation: mg-mega-tab-pulse 700ms ease-out 1;
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
/* Slide motion for right content when tab changes */
|
|
462
|
-
@keyframes mg-mega-content-swap {
|
|
463
|
-
0% {
|
|
464
|
-
transform: translateX(8px);
|
|
465
|
-
opacity: 0.98;
|
|
466
|
-
}
|
|
467
|
-
100% {
|
|
468
|
-
transform: translateX(0);
|
|
469
|
-
opacity: 1;
|
|
470
|
-
}
|
|
471
|
-
}
|
|
472
|
-
|
|
427
|
+
// Public compatibility hook: content changes are immediate, without a slide.
|
|
473
428
|
.mg-mega-content__right--sliding {
|
|
474
|
-
animation:
|
|
429
|
+
animation: none;
|
|
475
430
|
}
|
|
476
431
|
|
|
477
432
|
/* Stronger keyboard focus ring for accessibility.
|
|
@@ -518,19 +473,7 @@
|
|
|
518
473
|
.mg-mega-content__menu--desktop {
|
|
519
474
|
display: block;
|
|
520
475
|
|
|
521
|
-
//
|
|
522
|
-
animation: mg-mega-right-flash 400ms ease-out;
|
|
523
|
-
|
|
524
|
-
// Staggered slide-in for menu items
|
|
525
|
-
li {
|
|
526
|
-
animation: mg-mega-item-slide-in 250ms ease-out both;
|
|
527
|
-
|
|
528
|
-
@for $i from 1 through 25 {
|
|
529
|
-
&:nth-child(#{$i}) {
|
|
530
|
-
animation-delay: #{($i - 1) * 30}ms;
|
|
531
|
-
}
|
|
532
|
-
}
|
|
533
|
-
}
|
|
476
|
+
// Every destination is available immediately, including long menus.
|
|
534
477
|
}
|
|
535
478
|
}
|
|
536
479
|
|
|
@@ -588,32 +531,6 @@
|
|
|
588
531
|
}
|
|
589
532
|
}
|
|
590
533
|
|
|
591
|
-
/* Subtle blue gradient flash that fades to transparent on right content area */
|
|
592
|
-
@keyframes mg-mega-right-flash {
|
|
593
|
-
0% {
|
|
594
|
-
background: linear-gradient(
|
|
595
|
-
to bottom,
|
|
596
|
-
rgb(var(--mg-color-blue-900) / 0.06) 0%,
|
|
597
|
-
transparent 100%
|
|
598
|
-
);
|
|
599
|
-
}
|
|
600
|
-
100% {
|
|
601
|
-
background: transparent;
|
|
602
|
-
}
|
|
603
|
-
}
|
|
604
|
-
|
|
605
|
-
/* Menu items slide in from the left */
|
|
606
|
-
@keyframes mg-mega-item-slide-in {
|
|
607
|
-
0% {
|
|
608
|
-
opacity: 0;
|
|
609
|
-
transform: translateX(-12px);
|
|
610
|
-
}
|
|
611
|
-
100% {
|
|
612
|
-
opacity: 1;
|
|
613
|
-
transform: translateX(0);
|
|
614
|
-
}
|
|
615
|
-
}
|
|
616
|
-
|
|
617
534
|
.mg-mega-sidebar-section {
|
|
618
535
|
// This is the <li> inside .mg-mega-sidebar__list. A bare `list-style: none`
|
|
619
536
|
// here overrides the empty-string marker the list sets, and the item's
|
|
@@ -684,13 +601,15 @@
|
|
|
684
601
|
&[aria-expanded="true"] {
|
|
685
602
|
.mg-icon-angle-circled-left {
|
|
686
603
|
transform: rotate(-90deg);
|
|
687
|
-
transition: transform
|
|
604
|
+
transition: transform var(--mg-motion-duration-medium)
|
|
605
|
+
var(--mg-motion-easing-standard);
|
|
688
606
|
}
|
|
689
607
|
}
|
|
690
608
|
|
|
691
609
|
// Ensure smooth transition for icon default state
|
|
692
610
|
.mg-icon-angle-circled-left {
|
|
693
|
-
transition: transform
|
|
611
|
+
transition: transform var(--mg-motion-duration-medium)
|
|
612
|
+
var(--mg-motion-easing-standard);
|
|
694
613
|
}
|
|
695
614
|
}
|
|
696
615
|
|
|
@@ -713,7 +632,8 @@
|
|
|
713
632
|
max-height: 80vh;
|
|
714
633
|
top: -100%;
|
|
715
634
|
inset-inline: 0; // RTL-friendly
|
|
716
|
-
transition: top
|
|
635
|
+
transition: top var(--mg-motion-duration-medium)
|
|
636
|
+
var(--mg-motion-easing-standard);
|
|
717
637
|
box-shadow: 0 5px 8px -4px rgb(0 0 0 / 0.25);
|
|
718
638
|
|
|
719
639
|
&.mg-sidebar-open {
|
|
@@ -827,7 +747,8 @@
|
|
|
827
747
|
max-height: 80vh;
|
|
828
748
|
height: 80vh;
|
|
829
749
|
transform: translateY(-100vh);
|
|
830
|
-
transition: transform
|
|
750
|
+
transition: transform var(--mg-motion-duration-medium)
|
|
751
|
+
var(--mg-motion-easing-standard);
|
|
831
752
|
box-shadow: 0 5px 8px -4px rgb(0 0 0 / 0.25);
|
|
832
753
|
|
|
833
754
|
&.mg-mega-mobile-sidebar--open {
|
|
@@ -910,8 +831,8 @@
|
|
|
910
831
|
opacity: 0;
|
|
911
832
|
transform: translateX(var(--mg-mega-enter-offset, 8px));
|
|
912
833
|
transition:
|
|
913
|
-
opacity
|
|
914
|
-
transform
|
|
834
|
+
opacity var(--mg-motion-duration-fast) var(--mg-motion-easing-standard),
|
|
835
|
+
transform var(--mg-motion-duration-fast) var(--mg-motion-easing-standard);
|
|
915
836
|
pointer-events: none;
|
|
916
837
|
|
|
917
838
|
&[hidden] {
|
|
@@ -922,7 +843,13 @@
|
|
|
922
843
|
opacity: 1;
|
|
923
844
|
transform: translateX(0);
|
|
924
845
|
pointer-events: auto;
|
|
925
|
-
|
|
846
|
+
|
|
847
|
+
// Establish the entry frame when the hidden surface becomes rendered.
|
|
848
|
+
// Transitions also reverse smoothly if a close is interrupted by reopening.
|
|
849
|
+
@starting-style {
|
|
850
|
+
opacity: 0;
|
|
851
|
+
transform: translateX(var(--mg-mega-enter-offset, 8px));
|
|
852
|
+
}
|
|
926
853
|
}
|
|
927
854
|
|
|
928
855
|
.mg-mega-mobile-sidebar__header {
|
|
@@ -967,7 +894,8 @@
|
|
|
967
894
|
.mg-mega-mobile-sidebar__page {
|
|
968
895
|
padding: var(--mg-spacing-250);
|
|
969
896
|
padding-bottom: max(var(--mg-spacing-300), env(safe-area-inset-bottom));
|
|
970
|
-
animation: mg-mega-progressive-enter
|
|
897
|
+
animation: mg-mega-progressive-enter var(--mg-motion-duration-fast)
|
|
898
|
+
var(--mg-motion-easing-standard);
|
|
971
899
|
}
|
|
972
900
|
|
|
973
901
|
.mg-mega-mobile-sidebar__title {
|
|
@@ -1099,36 +1027,20 @@
|
|
|
1099
1027
|
z-index: var(--mg-z-index-modal);
|
|
1100
1028
|
}
|
|
1101
1029
|
|
|
1102
|
-
@keyframes mg-mega-surface-enter {
|
|
1103
|
-
from {
|
|
1104
|
-
opacity: 0;
|
|
1105
|
-
transform: translateX(var(--mg-mega-enter-offset, 8px));
|
|
1106
|
-
}
|
|
1107
|
-
to {
|
|
1108
|
-
opacity: 1;
|
|
1109
|
-
transform: translateX(0);
|
|
1110
|
-
}
|
|
1111
|
-
}
|
|
1112
|
-
|
|
1113
1030
|
.mg-mega-mobile-sidebar-overlay {
|
|
1114
1031
|
opacity: 0;
|
|
1115
1032
|
pointer-events: none;
|
|
1116
|
-
transition: opacity
|
|
1033
|
+
transition: opacity var(--mg-motion-duration-fast)
|
|
1034
|
+
var(--mg-motion-easing-standard);
|
|
1117
1035
|
background: rgb(var(--mg-color-black) / 0.16);
|
|
1118
1036
|
|
|
1119
1037
|
&--open {
|
|
1120
1038
|
opacity: 1;
|
|
1121
1039
|
pointer-events: auto;
|
|
1122
|
-
animation: mg-mega-backdrop-enter 180ms ease-out;
|
|
1123
|
-
}
|
|
1124
|
-
}
|
|
1125
1040
|
|
|
1126
|
-
@
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
}
|
|
1130
|
-
to {
|
|
1131
|
-
opacity: 1;
|
|
1041
|
+
@starting-style {
|
|
1042
|
+
opacity: 0;
|
|
1043
|
+
}
|
|
1132
1044
|
}
|
|
1133
1045
|
}
|
|
1134
1046
|
|
|
@@ -1163,7 +1075,16 @@
|
|
|
1163
1075
|
}
|
|
1164
1076
|
|
|
1165
1077
|
// Reduced motion: keep states, remove transition animation.
|
|
1166
|
-
.mg-mega-content
|
|
1078
|
+
.mg-mega-topbar__item .mg-mega-content,
|
|
1079
|
+
.mg-mega-topbar__item--active .mg-mega-content,
|
|
1080
|
+
.mg-mega-content__section-list-item .mg-mega-content__section-list-link,
|
|
1081
|
+
.mg-mega-content__section-list-item
|
|
1082
|
+
.mg-mega-content__section-list-link::after,
|
|
1083
|
+
.mg-mega-sidebar,
|
|
1084
|
+
.mg-mega-mobile-sidebar,
|
|
1085
|
+
.mg-mega-sidebar-section__item .mg-icon-angle-circled-left,
|
|
1086
|
+
.mg-mega-sidebar-section__item[aria-expanded="true"]
|
|
1087
|
+
.mg-icon-angle-circled-left {
|
|
1167
1088
|
transition: none;
|
|
1168
1089
|
}
|
|
1169
1090
|
}
|
|
@@ -149,3 +149,13 @@
|
|
|
149
149
|
max-block-size: mg-rem(400);
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
|
+
|
|
153
|
+
// The global reduced-motion reset gives every element a tiny transition
|
|
154
|
+
// duration. With the initial `all` transition property, descendants briefly
|
|
155
|
+
// animate inherited visibility and cannot receive opening focus. Disable the
|
|
156
|
+
// properties themselves so an open drawer and its controls appear together.
|
|
157
|
+
@media (prefers-reduced-motion: reduce) {
|
|
158
|
+
.mg-drawer * {
|
|
159
|
+
transition-property: none !important;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
@@ -46,6 +46,39 @@
|
|
|
46
46
|
display: none;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
+
// Line the links up with an mg-container content column instead of the
|
|
50
|
+
// bar's own padding. The bar stays full-bleed; only its padding changes, to
|
|
51
|
+
// half the space outside the container plus the container's gutter. A
|
|
52
|
+
// container is 100% wide below the mobile breakpoint, so the padding is the
|
|
53
|
+
// gutter alone there.
|
|
54
|
+
&--align-container {
|
|
55
|
+
--mg-on-this-page-nav-container: 100vw;
|
|
56
|
+
|
|
57
|
+
padding-inline: calc(
|
|
58
|
+
(100vw - var(--mg-on-this-page-nav-container)) / 2 + #{mg-rem(10)}
|
|
59
|
+
);
|
|
60
|
+
|
|
61
|
+
@media (min-width: $mg-breakpoint-mobile) {
|
|
62
|
+
--mg-on-this-page-nav-container: #{$mg-breakpoint-mobile};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
@media screen and (min-width: $mg-breakpoint-tablet) {
|
|
66
|
+
--mg-on-this-page-nav-container: #{$mg-breakpoint-tablet};
|
|
67
|
+
|
|
68
|
+
padding-inline: calc(
|
|
69
|
+
(100vw - var(--mg-on-this-page-nav-container)) / 2 + #{mg-rem(10)}
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
@media (min-width: $mg-breakpoint-desktop) {
|
|
74
|
+
--mg-on-this-page-nav-container: #{$mg-breakpoint-desktop};
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
@media (min-width: $mg-breakpoint-desktop-wide) {
|
|
78
|
+
--mg-on-this-page-nav-container: #{$mg-breakpoint-desktop-wide};
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
49
82
|
&__list {
|
|
50
83
|
display: flex;
|
|
51
84
|
align-items: center;
|
|
@@ -227,6 +260,78 @@
|
|
|
227
260
|
|
|
228
261
|
// RTL: flex layout places prevBtn at the right (visual-start) edge and nextBtn
|
|
229
262
|
// at the left (visual-end) edge. The JS scrollBy direction, button visibility,
|
|
230
|
-
// and chevron icon direction are all RTL-aware. The
|
|
231
|
-
//
|
|
232
|
-
//
|
|
263
|
+
// and chevron icon direction are all RTL-aware. The fades are physical
|
|
264
|
+
// gradients, so RTL states each case: a fade only on a side with content
|
|
265
|
+
// hidden behind it, and the trailing (left) edge when nothing is hidden, to
|
|
266
|
+
// match LTR. has-left-overflow and has-right-overflow are set by the script.
|
|
267
|
+
// Each rule outranks the direction-neutral has-left-overflow rule above.
|
|
268
|
+
|
|
269
|
+
// Nothing hidden, or hidden only on the left (at the start of the list).
|
|
270
|
+
[dir="rtl"] .mg-on-this-page-nav__list,
|
|
271
|
+
[dir="rtl"] .mg-on-this-page-nav--has-left-overflow .mg-on-this-page-nav__list {
|
|
272
|
+
padding-inline-start: 0;
|
|
273
|
+
-webkit-mask-image: linear-gradient(
|
|
274
|
+
to left,
|
|
275
|
+
#000 calc(100% - var(--mg-spacing-500)),
|
|
276
|
+
transparent
|
|
277
|
+
);
|
|
278
|
+
mask-image: linear-gradient(
|
|
279
|
+
to left,
|
|
280
|
+
#000 calc(100% - var(--mg-spacing-500)),
|
|
281
|
+
transparent
|
|
282
|
+
);
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
// Hidden only on the right (scrolled to the end of the list).
|
|
286
|
+
[dir="rtl"]
|
|
287
|
+
.mg-on-this-page-nav--has-right-overflow
|
|
288
|
+
.mg-on-this-page-nav__list {
|
|
289
|
+
padding-inline-start: var(--mg-spacing-300);
|
|
290
|
+
-webkit-mask-image: linear-gradient(
|
|
291
|
+
to right,
|
|
292
|
+
#000 calc(100% - var(--mg-spacing-500)),
|
|
293
|
+
transparent
|
|
294
|
+
);
|
|
295
|
+
mask-image: linear-gradient(
|
|
296
|
+
to right,
|
|
297
|
+
#000 calc(100% - var(--mg-spacing-500)),
|
|
298
|
+
transparent
|
|
299
|
+
);
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
// Hidden on both sides (mid-scroll).
|
|
303
|
+
[dir="rtl"]
|
|
304
|
+
.mg-on-this-page-nav--has-left-overflow.mg-on-this-page-nav--has-right-overflow
|
|
305
|
+
.mg-on-this-page-nav__list {
|
|
306
|
+
padding-inline-start: var(--mg-spacing-300);
|
|
307
|
+
-webkit-mask-image: linear-gradient(
|
|
308
|
+
to right,
|
|
309
|
+
transparent,
|
|
310
|
+
#000 var(--mg-spacing-500),
|
|
311
|
+
#000 calc(100% - var(--mg-spacing-500)),
|
|
312
|
+
transparent
|
|
313
|
+
);
|
|
314
|
+
mask-image: linear-gradient(
|
|
315
|
+
to right,
|
|
316
|
+
transparent,
|
|
317
|
+
#000 var(--mg-spacing-500),
|
|
318
|
+
#000 calc(100% - var(--mg-spacing-500)),
|
|
319
|
+
transparent
|
|
320
|
+
);
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
// Anything the browser scrolls into view (keyboard focus, anchors, a pager's
|
|
324
|
+
// scrollIntoView) lands below the docked bar instead of under it (WCAG 2.4.11
|
|
325
|
+
// Focus Not Obscured). The script publishes the bar's height as
|
|
326
|
+
// --mg-on-this-page-nav-block-size while it is sticky, and 0px when it is not.
|
|
327
|
+
// --mg-on-this-page-nav-offset is read here from the root, so set it on :root
|
|
328
|
+
// for it to count.
|
|
329
|
+
// Zero specificity (:where), so a site's own `html { scroll-padding-top }`
|
|
330
|
+
// wins outright. A site that wants both sets --mg-on-this-page-nav-scroll-padding-base to its
|
|
331
|
+
// own value and lets this rule add the bar on top.
|
|
332
|
+
:where(html:has(.mg-on-this-page-nav:not(.mg-on-this-page-nav--hidden))) {
|
|
333
|
+
// prettier-ignore
|
|
334
|
+
--mg-on-this-page-nav-scroll-padding: calc(var(--mg-on-this-page-nav-scroll-padding-base, 0px) + var(--mg-on-this-page-nav-offset, 0px) + var(--mg-on-this-page-nav-block-size, 0px));
|
|
335
|
+
|
|
336
|
+
scroll-padding-top: var(--mg-on-this-page-nav-scroll-padding);
|
|
337
|
+
}
|