maverick-wave 5.6.0 → 5.8.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.
@@ -42,6 +42,19 @@
42
42
  --mw-elevation-3: none;
43
43
  }
44
44
 
45
+ // Cards, panels and the footer give up their own tone and sit flush on the
46
+ // page, told apart by their line alone. That line then has to carry them:
47
+ // --mw-border is a neighbouring shade of the surface and reads as nothing once
48
+ // the surface *is* the page, so it is redrawn from the ink instead.
49
+ //
50
+ // Theme-bound tokens, so both selectors - see the note above.
51
+ :root.mw-surfaces-flush,
52
+ :root.mw-surfaces-flush .mw-theme-light {
53
+ --mw-card-background: var(--mw-page-background);
54
+ --mw-footer-background: var(--mw-page-background);
55
+ --mw-border: color-mix(in srgb, var(--mw-text-color) 20%, transparent);
56
+ }
57
+
45
58
  // The diagonal hatch behind an alternating section, dropped. Written on the
46
59
  // section and not as a token on :root: --mw-page-background is a theme alias
47
60
  // that only becomes the light one further down the tree, so a copy taken up
@@ -57,25 +70,84 @@
57
70
  border-radius: 999px;
58
71
  }
59
72
 
60
- // Photos drained of colour until pointed at - the palette then comes only from
61
- // the brand tones. Avatars stay out: a greyed-out face reads as disabled, and
62
- // so does mw-media, which is the audio player and holds no picture at all.
63
- :root.mw-media-mono {
64
- .mw-card-img img,
65
- .mw-card-img-contain img,
66
- .mw-tile-img img,
67
- .mw-gallery img,
68
- .mw-image-slider img,
69
- img.mw-blog-post-featured-image {
70
- filter: grayscale(1);
71
- transition: filter var(--mw-duration-zoom) var(--mw-ease-out);
73
+ // The other end of the same axis. Not --mw-radius-scale, which squares off the
74
+ // whole page - a page can want its cards round and its buttons cut.
75
+ :root.mw-btn-square .mw-btn {
76
+ border-radius: 0;
77
+ }
78
+
79
+ // A raised edge under the fill that the button sinks onto when pressed. The
80
+ // four solid variants only: outline, ghost and link have no fill to darken.
81
+ //
82
+ // Mixed toward black rather than taken from --mw-*-color-hover, which moves
83
+ // toward the light in one theme and away from it in the other - an edge has to
84
+ // be darker than its face in both.
85
+ :root.mw-btn-tactile {
86
+ @each $name in ('primary', 'secondary', 'danger', 'success') {
87
+ .mw-btn-#{$name} {
88
+ box-shadow: 0
89
+ 3px
90
+ 0
91
+ color-mix(in srgb, var(--mw-#{$name}-color) 72%, #000);
92
+
93
+ // Travels the full height of the edge, where the base button moves 1px
94
+ &:active:not(:disabled) {
95
+ transform: translateY(3px);
96
+ box-shadow: none;
97
+ }
98
+ }
72
99
  }
100
+ }
73
101
 
74
- // The blog image carries the class itself rather than sitting in a wrapper,
75
- // so it is the one that has to answer for its own hover
76
- :is(.mw-card, .mw-tile, .mw-gallery, .mw-image-slider):hover img,
77
- img.mw-blog-post-featured-image:hover {
78
- filter: none;
102
+ // Tinted glass: a translucent wash with a vertical ramp and a specular line
103
+ // along the top edge, which is what gives the button its thickness.
104
+ //
105
+ // Deliberately without `backdrop-filter`, and that omission has to stay. The
106
+ // filter makes the button a containing block for its own fixed-position
107
+ // descendants, which drops a [data-tooltip] bubble inside the button instead
108
+ // of above it; and nested inside the header's own blur it flickers while the
109
+ // page scrolls. At the tint below there was next to nothing to see through.
110
+ //
111
+ // The tint stays heavy on purpose, and that is the other trade-off: a 20%
112
+ // wash reads as real glass, but the label then rides on whatever is behind
113
+ // it, and over a light card that contrast is gone. At 88/70 the label keeps
114
+ // roughly the fill's contrast.
115
+ //
116
+ // Hover and active are restated rather than inherited: this sits in
117
+ // mw.utilities, which outranks every rule in mw.components whatever its
118
+ // specificity, so the states would otherwise be flattened along with the fill.
119
+ :root.mw-btn-glass {
120
+ @each $name in ('primary', 'secondary', 'danger', 'success') {
121
+ .mw-btn-#{$name} {
122
+ background: linear-gradient(
123
+ to bottom,
124
+ color-mix(in srgb, var(--mw-#{$name}-color) 88%, transparent),
125
+ color-mix(in srgb, var(--mw-#{$name}-color) 70%, transparent)
126
+ );
127
+ border-color: color-mix(
128
+ in srgb,
129
+ var(--mw-#{$name}-color) 70%,
130
+ transparent
131
+ );
132
+ box-shadow:
133
+ inset 0 1px 0 rgb(255 255 255 / 28%),
134
+ 0 1px 3px rgb(0 0 0 / 14%);
135
+
136
+ &:hover:not(:disabled),
137
+ &.mw-active:not(:disabled),
138
+ &.active:not(:disabled) {
139
+ background: linear-gradient(
140
+ to bottom,
141
+ color-mix(in srgb, var(--mw-#{$name}-color) 97%, transparent),
142
+ color-mix(in srgb, var(--mw-#{$name}-color) 82%, transparent)
143
+ );
144
+ border-color: color-mix(
145
+ in srgb,
146
+ var(--mw-#{$name}-color) 85%,
147
+ transparent
148
+ );
149
+ }
150
+ }
79
151
  }
80
152
  }
81
153