@expressivecss/expressive 0.3.0 → 0.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/CHANGELOG.md +96 -0
- package/README.md +4 -9
- package/dist/css/expressive.css +3183 -2150
- package/dist/css/expressive.css.map +1 -1
- package/dist/css/expressive.min.css +1 -1
- package/dist/css/expressive.min.css.map +1 -1
- package/dist/js/expressive.cjs +1254 -1567
- package/dist/js/expressive.cjs.map +4 -4
- package/dist/js/expressive.js +1254 -1567
- package/dist/js/expressive.js.map +4 -4
- package/dist/js/expressive.min.js +12 -22
- package/dist/js/expressive.min.js.map +4 -4
- package/dist/js/expressive.mjs +1254 -1568
- package/dist/js/expressive.mjs.map +4 -4
- package/dist/types/behaviors/bottomSheets.d.ts +18 -0
- package/dist/types/behaviors/sideSheets.d.ts +18 -0
- package/dist/types/components/autocomplete.d.ts +13 -20
- package/dist/types/components/buttons.d.ts +2 -2
- package/dist/types/components/cards.d.ts +3 -6
- package/dist/types/components/carousel.d.ts +3 -3
- package/dist/types/components/characterCounter.d.ts +3 -5
- package/dist/types/components/chips.d.ts +2 -2
- package/dist/types/components/datepicker.d.ts +2 -8
- package/dist/types/components/index.d.ts +3 -6
- package/dist/types/components/lightbox.d.ts +2 -2
- package/dist/types/components/{dropdown.d.ts → menu.d.ts} +48 -38
- package/dist/types/components/navigationRail.d.ts +53 -0
- package/dist/types/components/parallax.d.ts +2 -8
- package/dist/types/components/range.d.ts +5 -2
- package/dist/types/components/registry.d.ts +7 -19
- package/dist/types/components/scrollspy.d.ts +26 -50
- package/dist/types/components/select.d.ts +28 -14
- package/dist/types/components/sidenav.d.ts +40 -55
- package/dist/types/components/slider.d.ts +2 -2
- package/dist/types/components/{toasts.d.ts → snackbar.d.ts} +28 -25
- package/dist/types/components/tabs.d.ts +2 -2
- package/dist/types/components/timepicker.d.ts +2 -4
- package/dist/types/components/tooltip.d.ts +2 -2
- package/dist/types/core/component.d.ts +4 -4
- package/dist/types/index.d.ts +3 -1
- package/package.json +4 -3
- package/src/sass/README.md +13 -15
- package/src/sass/abstracts/_breakpoints.scss +14 -19
- package/src/sass/abstracts/_mixins.scss +3 -3
- package/src/sass/abstracts/_variables.scss +27 -23
- package/src/sass/base/_global.scss +1 -1
- package/src/sass/base/_grid.scss +64 -133
- package/src/sass/base/_index.scss +1 -1
- package/src/sass/components/_badges.scss +76 -61
- package/src/sass/components/_bottom-sheet.scss +137 -0
- package/src/sass/components/_buttons.scss +22 -54
- package/src/sass/components/_cards.scss +54 -127
- package/src/sass/components/_carousel.scss +4 -6
- package/src/sass/components/_chips.scss +6 -5
- package/src/sass/components/_datepicker.scss +1 -15
- package/src/sass/components/_dialog.scss +268 -0
- package/src/sass/components/_index.scss +9 -7
- package/src/sass/components/_list.scss +253 -0
- package/src/sass/components/_menu.scss +341 -0
- package/src/sass/components/_navbar.scss +68 -117
- package/src/sass/components/_navigation-bar.scss +165 -0
- package/src/sass/components/_navigation-rail.scss +308 -0
- package/src/sass/components/_page-footer.scss +138 -15
- package/src/sass/components/_parallax.scss +7 -28
- package/src/sass/components/_preloader.scss +145 -300
- package/src/sass/components/_scrollspy.scss +18 -0
- package/src/sass/components/_side-sheet.scss +193 -0
- package/src/sass/components/_sidenav.scss +281 -146
- package/src/sass/components/{_toast.scss → _snackbar.scss} +43 -43
- package/src/sass/components/_table_of_contents.scss +30 -14
- package/src/sass/components/_tabs.scss +43 -50
- package/src/sass/components/_toolbar.scss +93 -27
- package/src/sass/components/_tooltip.scss +5 -10
- package/src/sass/components/_transitions.scss +0 -5
- package/src/sass/components/forms/_fieldset.scss +1 -1
- package/src/sass/components/forms/_index.scss +0 -5
- package/src/sass/components/forms/_input-fields.scss +52 -55
- package/src/sass/components/forms/_range.scss +423 -98
- package/src/sass/components/forms/_select.scss +177 -60
- package/src/sass/components/forms/_switches.scss +21 -8
- package/src/sass/tokens/_reference.scss +37 -13
- package/src/sass/tokens/_theme.scss +5 -13
- package/src/sass/utilities/_colors.scss +16 -74
- package/src/sass/utilities/_helpers.scss +1 -3
- package/src/sass/utilities/_typescale.scss +0 -5
- package/src/sass/utilities/_visibility.scss +10 -2
- package/dist/types/components/collapsible.d.ts +0 -96
- package/dist/types/components/modal.d.ts +0 -45
- package/dist/types/components/pushpin.d.ts +0 -51
- package/dist/types/components/tapTarget.d.ts +0 -57
- package/src/sass/components/_collapsible.scss +0 -181
- package/src/sass/components/_collection.scss +0 -198
- package/src/sass/components/_dropdown.scss +0 -129
- package/src/sass/components/_modal.scss +0 -208
- package/src/sass/components/_pushpin.scss +0 -11
- package/src/sass/components/_tapTarget.scss +0 -191
|
@@ -1,7 +1,21 @@
|
|
|
1
1
|
@use "../abstracts" as *;
|
|
2
2
|
|
|
3
|
+
// Table of contents. Paired with .scrollspy sections. The current link
|
|
4
|
+
// is .active and aria-current="true".
|
|
5
|
+
//
|
|
6
|
+
// Tokens:
|
|
7
|
+
// --md-comp-toc-label-color
|
|
8
|
+
// --md-comp-toc-active-color
|
|
9
|
+
// --md-comp-toc-indicator
|
|
10
|
+
|
|
3
11
|
.table-of-contents {
|
|
12
|
+
--md-comp-toc-label-color: var(--md-sys-color-on-surface-variant);
|
|
13
|
+
--md-comp-toc-active-color: var(--md-sys-color-primary);
|
|
14
|
+
--md-comp-toc-indicator: 2px;
|
|
15
|
+
|
|
4
16
|
list-style: none;
|
|
17
|
+
margin: 0;
|
|
18
|
+
padding: 0;
|
|
5
19
|
|
|
6
20
|
&.fixed {
|
|
7
21
|
position: fixed;
|
|
@@ -12,23 +26,25 @@
|
|
|
12
26
|
}
|
|
13
27
|
|
|
14
28
|
a {
|
|
15
|
-
display: inline-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
29
|
+
display: inline-flex;
|
|
30
|
+
align-items: center;
|
|
31
|
+
box-sizing: border-box;
|
|
32
|
+
min-height: 2rem;
|
|
33
|
+
padding-inline-start: 16px;
|
|
34
|
+
border-inline-start: var(--md-comp-toc-indicator) solid transparent;
|
|
35
|
+
color: var(--md-comp-toc-label-color);
|
|
36
|
+
text-decoration: none;
|
|
37
|
+
@include typescale("label-large");
|
|
38
|
+
@include focus-visible;
|
|
39
|
+
|
|
23
40
|
&:hover {
|
|
24
|
-
color: var(--md-
|
|
25
|
-
padding-left: 15px;
|
|
41
|
+
color: var(--md-comp-toc-active-color);
|
|
26
42
|
}
|
|
27
|
-
|
|
28
|
-
|
|
43
|
+
|
|
44
|
+
&:is(.active, [aria-current="true"]) {
|
|
45
|
+
color: var(--md-comp-toc-active-color);
|
|
29
46
|
font-weight: 500;
|
|
30
|
-
|
|
31
|
-
border-left: 2px solid var(--md-sys-color-primary);
|
|
47
|
+
border-inline-start-color: var(--md-comp-toc-active-color);
|
|
32
48
|
}
|
|
33
49
|
}
|
|
34
50
|
}
|
|
@@ -4,9 +4,8 @@
|
|
|
4
4
|
//
|
|
5
5
|
// Anatomy is the HTML. A <nav class="tabs"> of <a href="#panel"> is the
|
|
6
6
|
// bar. A heading or <span> is the label; a leading <i> is the icon.
|
|
7
|
-
// .active is the selected tab.
|
|
8
|
-
//
|
|
9
|
-
// .tabs-fixed-width, .transparent / .tabs-transparent.
|
|
7
|
+
// .active is the selected tab. Helpers: .tabs-secondary, .horizontal,
|
|
8
|
+
// .max.
|
|
10
9
|
//
|
|
11
10
|
// Tokens follow https://m3.material.io/components/tabs/specs
|
|
12
11
|
// primary surface, 48dp (64 with stacked icon), title-small
|
|
@@ -18,7 +17,13 @@
|
|
|
18
17
|
// divider 1dp outline-variant
|
|
19
18
|
// disabled 38%
|
|
20
19
|
|
|
21
|
-
|
|
20
|
+
// Comma list of tab-link selectors. Always nest suffixes inside
|
|
21
|
+
// `#{$_tab} { &.foo {} }` — interpolating `#{$_tab}.foo` only
|
|
22
|
+
// attaches `.foo` to the last alternative and leaves `> a` bare
|
|
23
|
+
// (same bug as the icon size classes). That compiled the disabled
|
|
24
|
+
// rule as `.tabs > a, .tabs > .tab > a.disabled`, so every
|
|
25
|
+
// `nav.tabs > a` got pointer-events:none and could not switch panels.
|
|
26
|
+
$_tab: "> a, > .tab > a";
|
|
22
27
|
|
|
23
28
|
.tabs {
|
|
24
29
|
--md-comp-primary-tab-container-color: var(--md-sys-color-surface);
|
|
@@ -49,7 +54,7 @@ $_tab: "> :is(a, .tab > a, li.tab > a)";
|
|
|
49
54
|
display: none;
|
|
50
55
|
}
|
|
51
56
|
|
|
52
|
-
>
|
|
57
|
+
> .tab {
|
|
53
58
|
display: flex;
|
|
54
59
|
flex: 0 0 auto;
|
|
55
60
|
list-style: none;
|
|
@@ -115,22 +120,40 @@ $_tab: "> :is(a, .tab > a, li.tab > a)";
|
|
|
115
120
|
&.active:focus {
|
|
116
121
|
background-color: color-mix(in oklab, var(--md-sys-color-primary) 10%, transparent);
|
|
117
122
|
}
|
|
123
|
+
|
|
124
|
+
// Disabled — on the <a>. The wrapping `.tab.disabled` case is
|
|
125
|
+
// below; it cannot live in this block.
|
|
126
|
+
&.disabled,
|
|
127
|
+
&[aria-disabled="true"] {
|
|
128
|
+
color: color-mix(in oklab, var(--md-sys-color-on-surface) 38%, transparent);
|
|
129
|
+
background-color: transparent;
|
|
130
|
+
cursor: default;
|
|
131
|
+
pointer-events: none;
|
|
132
|
+
}
|
|
118
133
|
}
|
|
119
134
|
|
|
120
135
|
// Stacked icon + label is 64dp (primary).
|
|
121
|
-
&:not(.horizontal
|
|
122
|
-
|
|
123
|
-
|
|
136
|
+
&:not(.horizontal) {
|
|
137
|
+
#{$_tab} {
|
|
138
|
+
&:has(> i) {
|
|
139
|
+
min-height: var(--md-comp-primary-tab-with-icon-container-height);
|
|
140
|
+
padding-block: 8px;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
124
143
|
}
|
|
125
144
|
|
|
126
145
|
// CSS indicator when the JS sliding bar is not present.
|
|
127
|
-
&:not(:has(> .indicator))
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
146
|
+
&:not(:has(> .indicator)) {
|
|
147
|
+
#{$_tab} {
|
|
148
|
+
&.active::after {
|
|
149
|
+
content: "";
|
|
150
|
+
position: absolute;
|
|
151
|
+
inset: auto 0 0 0;
|
|
152
|
+
height: var(--md-comp-primary-tab-active-indicator-height);
|
|
153
|
+
background-color: var(--md-comp-primary-tab-active-indicator-color);
|
|
154
|
+
border-radius: var(--md-comp-primary-tab-active-indicator-shape);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
134
157
|
}
|
|
135
158
|
|
|
136
159
|
> .indicator {
|
|
@@ -145,10 +168,7 @@ $_tab: "> :is(a, .tab > a, li.tab > a)";
|
|
|
145
168
|
margin: 0;
|
|
146
169
|
}
|
|
147
170
|
|
|
148
|
-
|
|
149
|
-
#{$_tab}.disabled,
|
|
150
|
-
#{$_tab}[aria-disabled="true"],
|
|
151
|
-
> :is(.tab, li.tab).disabled > a {
|
|
171
|
+
> .tab.disabled > a {
|
|
152
172
|
color: color-mix(in oklab, var(--md-sys-color-on-surface) 38%, transparent);
|
|
153
173
|
background-color: transparent;
|
|
154
174
|
cursor: default;
|
|
@@ -169,8 +189,7 @@ $_tab: "> :is(a, .tab > a, li.tab > a)";
|
|
|
169
189
|
}
|
|
170
190
|
|
|
171
191
|
// Inline icon + label (primary can do this too).
|
|
172
|
-
.tabs.horizontal
|
|
173
|
-
.tabs.tabs-horizontal {
|
|
192
|
+
.tabs.horizontal {
|
|
174
193
|
#{$_tab} {
|
|
175
194
|
flex-direction: row;
|
|
176
195
|
gap: 8px;
|
|
@@ -180,9 +199,8 @@ $_tab: "> :is(a, .tab > a, li.tab > a)";
|
|
|
180
199
|
}
|
|
181
200
|
|
|
182
201
|
// Equal-width tabs. Default on compact so a few destinations still fill.
|
|
183
|
-
.tabs.max
|
|
184
|
-
.
|
|
185
|
-
> :is(a, .tab, li.tab) {
|
|
202
|
+
.tabs.max {
|
|
203
|
+
> :is(a, .tab) {
|
|
186
204
|
flex: 1 1 0;
|
|
187
205
|
min-width: 0;
|
|
188
206
|
}
|
|
@@ -194,7 +212,7 @@ $_tab: "> :is(a, .tab > a, li.tab > a)";
|
|
|
194
212
|
|
|
195
213
|
@include bp-down("large") {
|
|
196
214
|
.tabs {
|
|
197
|
-
> :is(a, .tab
|
|
215
|
+
> :is(a, .tab) {
|
|
198
216
|
flex: 1 1 0;
|
|
199
217
|
min-width: 0;
|
|
200
218
|
}
|
|
@@ -205,28 +223,3 @@ $_tab: "> :is(a, .tab > a, li.tab > a)";
|
|
|
205
223
|
}
|
|
206
224
|
}
|
|
207
225
|
}
|
|
208
|
-
|
|
209
|
-
// On a colored app bar (header.primary > .tabs).
|
|
210
|
-
.tabs.transparent,
|
|
211
|
-
.tabs.tabs-transparent {
|
|
212
|
-
--md-comp-primary-tab-container-color: transparent;
|
|
213
|
-
--md-comp-primary-tab-label-text-color: color-mix(
|
|
214
|
-
in oklab,
|
|
215
|
-
var(--md-sys-color-on-primary) 74%,
|
|
216
|
-
transparent
|
|
217
|
-
);
|
|
218
|
-
--md-comp-primary-tab-active-label-text-color: var(--md-sys-color-on-primary);
|
|
219
|
-
--md-comp-primary-tab-active-indicator-color: var(--md-sys-color-on-primary);
|
|
220
|
-
border-block-end-color: color-mix(in oklab, var(--md-sys-color-on-primary) 20%, transparent);
|
|
221
|
-
|
|
222
|
-
#{$_tab}:hover,
|
|
223
|
-
#{$_tab}:focus {
|
|
224
|
-
color: var(--md-sys-color-on-primary);
|
|
225
|
-
background-color: color-mix(in oklab, var(--md-sys-color-on-primary) 8%, transparent);
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
#{$_tab}.active:hover,
|
|
229
|
-
#{$_tab}.active:focus {
|
|
230
|
-
background-color: color-mix(in oklab, var(--md-sys-color-on-primary) 10%, transparent);
|
|
231
|
-
}
|
|
232
|
-
}
|
|
@@ -1,32 +1,41 @@
|
|
|
1
1
|
@use "../abstracts" as *;
|
|
2
2
|
|
|
3
|
-
// Toolbars.
|
|
3
|
+
// Toolbars (M3 Expressive).
|
|
4
4
|
//
|
|
5
5
|
// Anatomy is the HTML. A <nav class="toolbar"> is the bar. Direct
|
|
6
6
|
// <button> / <a> children are the actions. An <i> is the icon; wrap a
|
|
7
|
-
// label in <span>. .active marks the selected action.
|
|
8
|
-
//
|
|
9
|
-
// .
|
|
7
|
+
// label in <span>. .active marks the selected action. A .filled action
|
|
8
|
+
// is the emphasized control (the in-bar FAB). Helpers are only for
|
|
9
|
+
// variants markup cannot express: .docked, .vibrant / .filled (on the
|
|
10
|
+
// nav), .vertical, .fixed, .top, .bottom.
|
|
11
|
+
//
|
|
12
|
+
// Two variants:
|
|
13
|
+
// floating default. Hugs its actions, 64dp, 32dp stadium,
|
|
14
|
+
// surface-container, elevation 2. Horizontal or .vertical.
|
|
15
|
+
// docked .docked (or .max). Full width, 64dp, square, no
|
|
16
|
+
// elevation. Replaces the bottom app bar.
|
|
17
|
+
//
|
|
18
|
+
// Color: standard (surface-container) or .vibrant (primary-container).
|
|
19
|
+
// Pair a floating bar with a FAB via .toolbar-group. Do not show a
|
|
20
|
+
// toolbar at the same time as nav.navigation-bar.
|
|
10
21
|
//
|
|
11
22
|
// Tokens follow https://m3.material.io/components/toolbars/specs
|
|
12
|
-
// floating hug, 64dp, 32dp stadium, surface-variant, elevation 2
|
|
13
|
-
// docked full width, 64dp, 0 radius, surface-variant, no elevation
|
|
14
|
-
// (M3 replacement for the bottom app bar)
|
|
15
|
-
// vibrant primary-container / on-primary-container (.filled)
|
|
16
23
|
// action 48dp target, 24dp icon, transparent at rest
|
|
17
|
-
// selected secondary-container /
|
|
24
|
+
// selected secondary-container (standard) / surface (vibrant)
|
|
25
|
+
// emphasized 48dp, 16dp corners, primary / on-primary
|
|
18
26
|
//
|
|
19
|
-
// nav.toolbar only — do not style every <nav
|
|
20
|
-
//
|
|
21
|
-
// transition, not this component.
|
|
27
|
+
// nav.toolbar only — do not style every <nav>. div.fixed-action-btn.toolbar
|
|
28
|
+
// is the FAB-to-toolbar transition, not this component.
|
|
22
29
|
|
|
23
30
|
nav.toolbar {
|
|
24
|
-
--md-comp-toolbar-container-color: var(--md-sys-color-surface-
|
|
31
|
+
--md-comp-toolbar-container-color: var(--md-sys-color-surface-container);
|
|
25
32
|
--md-comp-toolbar-container-shape: 32px;
|
|
26
33
|
--md-comp-toolbar-container-height: 64px;
|
|
27
34
|
--md-comp-toolbar-leading-space: 12px;
|
|
28
35
|
--md-comp-toolbar-action-size: 48px;
|
|
29
36
|
--md-comp-toolbar-icon-size: 24px;
|
|
37
|
+
--md-comp-toolbar-selected-container-color: var(--md-sys-color-secondary-container);
|
|
38
|
+
--md-comp-toolbar-selected-color: var(--md-sys-color-on-secondary-container);
|
|
30
39
|
|
|
31
40
|
box-sizing: border-box;
|
|
32
41
|
display: inline-flex;
|
|
@@ -48,8 +57,8 @@ nav.toolbar {
|
|
|
48
57
|
}
|
|
49
58
|
|
|
50
59
|
// Actions — transparent at rest so they sit on the container, not filled.
|
|
51
|
-
// .extra is the 56dp FAB; leave it alone
|
|
52
|
-
> :is(a, button):not(.
|
|
60
|
+
// .extra is the 56dp companion FAB; leave it alone.
|
|
61
|
+
> :is(a, button):not(.extra) {
|
|
53
62
|
box-sizing: border-box;
|
|
54
63
|
display: inline-flex;
|
|
55
64
|
flex: 0 0 auto;
|
|
@@ -81,17 +90,17 @@ nav.toolbar {
|
|
|
81
90
|
line-height: var(--md-comp-toolbar-icon-size);
|
|
82
91
|
}
|
|
83
92
|
|
|
84
|
-
&:hover:not(.active) {
|
|
93
|
+
&:hover:not(.active, .filled) {
|
|
85
94
|
background-color: color-mix(in oklab, currentColor 8%, transparent);
|
|
86
95
|
}
|
|
87
96
|
|
|
88
|
-
&:active:not(.active) {
|
|
97
|
+
&:active:not(.active, .filled) {
|
|
89
98
|
background-color: color-mix(in oklab, currentColor 10%, transparent);
|
|
90
99
|
}
|
|
91
100
|
|
|
92
101
|
&.active {
|
|
93
|
-
background-color: var(--md-
|
|
94
|
-
color: var(--md-
|
|
102
|
+
background-color: var(--md-comp-toolbar-selected-container-color);
|
|
103
|
+
color: var(--md-comp-toolbar-selected-color);
|
|
95
104
|
}
|
|
96
105
|
|
|
97
106
|
&:disabled {
|
|
@@ -103,12 +112,52 @@ nav.toolbar {
|
|
|
103
112
|
}
|
|
104
113
|
|
|
105
114
|
// Icon-only — .circle, or an <i> with no <span> sibling.
|
|
106
|
-
> :is(a, button):not(.
|
|
115
|
+
> :is(a, button):not(.extra):is(.circle, :has(> i):not(:has(> span))) {
|
|
107
116
|
width: var(--md-comp-toolbar-action-size);
|
|
108
117
|
padding: 0;
|
|
109
118
|
border-radius: 50%;
|
|
110
119
|
}
|
|
111
120
|
|
|
121
|
+
// Emphasized action (the in-bar FAB). 48dp, 16dp corners, primary.
|
|
122
|
+
> :is(a, button).filled:not(.extra) {
|
|
123
|
+
background-color: var(--md-sys-color-primary);
|
|
124
|
+
color: var(--md-sys-color-on-primary);
|
|
125
|
+
border-radius: 16px;
|
|
126
|
+
box-shadow: none;
|
|
127
|
+
|
|
128
|
+
&:hover {
|
|
129
|
+
background-color: color-mix(
|
|
130
|
+
in oklab,
|
|
131
|
+
var(--md-sys-color-on-primary) 8%,
|
|
132
|
+
var(--md-sys-color-primary)
|
|
133
|
+
);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
&:active {
|
|
137
|
+
background-color: color-mix(
|
|
138
|
+
in oklab,
|
|
139
|
+
var(--md-sys-color-on-primary) 10%,
|
|
140
|
+
var(--md-sys-color-primary)
|
|
141
|
+
);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
> :is(a, button).filled:not(.extra):has(> span) {
|
|
146
|
+
height: 40px;
|
|
147
|
+
min-height: 40px;
|
|
148
|
+
padding: 0 24px;
|
|
149
|
+
border-radius: 20px;
|
|
150
|
+
width: auto;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
// Text field or other control stretching between leading and trailing.
|
|
154
|
+
> .field {
|
|
155
|
+
flex: 1 1 auto;
|
|
156
|
+
align-self: center;
|
|
157
|
+
min-width: 0;
|
|
158
|
+
margin: 0;
|
|
159
|
+
}
|
|
160
|
+
|
|
112
161
|
// Spacer between leading and trailing actions.
|
|
113
162
|
> .max {
|
|
114
163
|
flex: 1 1 auto;
|
|
@@ -118,15 +167,13 @@ nav.toolbar {
|
|
|
118
167
|
}
|
|
119
168
|
}
|
|
120
169
|
|
|
121
|
-
// Vibrant. Pair
|
|
170
|
+
// Vibrant color style. Pair .active with surface so it still contrasts.
|
|
171
|
+
nav.toolbar.vibrant,
|
|
122
172
|
nav.toolbar.filled {
|
|
123
173
|
--md-comp-toolbar-container-color: var(--md-sys-color-primary-container);
|
|
174
|
+
--md-comp-toolbar-selected-container-color: var(--md-sys-color-surface);
|
|
175
|
+
--md-comp-toolbar-selected-color: var(--md-sys-color-on-surface);
|
|
124
176
|
color: var(--md-sys-color-on-primary-container);
|
|
125
|
-
|
|
126
|
-
> :is(a, button).active {
|
|
127
|
-
background-color: var(--md-sys-color-surface-variant);
|
|
128
|
-
color: var(--md-sys-color-on-surface);
|
|
129
|
-
}
|
|
130
177
|
}
|
|
131
178
|
|
|
132
179
|
// Vertical floating bar.
|
|
@@ -144,7 +191,8 @@ nav.toolbar.vertical {
|
|
|
144
191
|
}
|
|
145
192
|
|
|
146
193
|
// Docked — full width, square, no lift. M3's replacement for the bottom
|
|
147
|
-
// app bar.
|
|
194
|
+
// app bar. Shorter than that bar (64dp, not 80). .max is the BeerCSS
|
|
195
|
+
// name; .docked is the M3 name.
|
|
148
196
|
nav.toolbar.max,
|
|
149
197
|
nav.toolbar.docked {
|
|
150
198
|
display: flex;
|
|
@@ -154,6 +202,22 @@ nav.toolbar.docked {
|
|
|
154
202
|
@include z-depth("0");
|
|
155
203
|
}
|
|
156
204
|
|
|
205
|
+
// Pair a floating toolbar with a companion FAB. The FAB is a sibling,
|
|
206
|
+
// not a child — typically .extra.circle.
|
|
207
|
+
.toolbar-group {
|
|
208
|
+
display: inline-flex;
|
|
209
|
+
align-items: center;
|
|
210
|
+
gap: 8px;
|
|
211
|
+
|
|
212
|
+
&.vertical {
|
|
213
|
+
flex-direction: column;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
> nav.toolbar {
|
|
217
|
+
margin: 0;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
157
221
|
// Pin to the viewport. Floating defaults to bottom-center; docked
|
|
158
222
|
// defaults to the bottom edge.
|
|
159
223
|
nav.toolbar.fixed {
|
|
@@ -184,9 +248,11 @@ nav.toolbar:is(.max, .docked).fixed,
|
|
|
184
248
|
nav.toolbar:is(.max, .docked).fixed.bottom {
|
|
185
249
|
inset: auto 0 0 0;
|
|
186
250
|
transform: none;
|
|
251
|
+
padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
|
|
187
252
|
}
|
|
188
253
|
|
|
189
254
|
nav.toolbar:is(.max, .docked).fixed.top {
|
|
190
255
|
inset: 0 0 auto 0;
|
|
191
256
|
transform: none;
|
|
257
|
+
padding-bottom: 8px;
|
|
192
258
|
}
|
|
@@ -14,11 +14,9 @@
|
|
|
14
14
|
// gap 4dp from the activator
|
|
15
15
|
//
|
|
16
16
|
// The JS plugin still exists: .tooltipped + data-tooltip, AutoInit,
|
|
17
|
-
// class .tooltip
|
|
18
|
-
// is an alias. There is no data-html / unsafeHTML.
|
|
17
|
+
// class .tooltip appended to <body>. There is no data-html / unsafeHTML.
|
|
19
18
|
|
|
20
|
-
.tooltip
|
|
21
|
-
.material-tooltip {
|
|
19
|
+
.tooltip {
|
|
22
20
|
--md-comp-plain-tooltip-container-color: var(--md-sys-color-inverse-surface);
|
|
23
21
|
--md-comp-plain-tooltip-supporting-text-color: var(--md-sys-color-inverse-on-surface);
|
|
24
22
|
--md-comp-plain-tooltip-container-shape: 4px;
|
|
@@ -109,8 +107,7 @@
|
|
|
109
107
|
|
|
110
108
|
// JS plugin: appended to <body>, top/left set in script. Do not use the
|
|
111
109
|
// child-positioning rules; they would fight the inline transform.
|
|
112
|
-
body > .tooltip
|
|
113
|
-
.material-tooltip {
|
|
110
|
+
body > .tooltip {
|
|
114
111
|
position: absolute;
|
|
115
112
|
left: 0;
|
|
116
113
|
top: 0;
|
|
@@ -121,10 +118,8 @@ body > .tooltip,
|
|
|
121
118
|
|
|
122
119
|
// Rich tooltip — title, supporting text, optional action.
|
|
123
120
|
.tooltip.rich,
|
|
124
|
-
.tooltip.max
|
|
125
|
-
|
|
126
|
-
.material-tooltip.max {
|
|
127
|
-
--md-comp-rich-tooltip-container-color: var(--md-sys-color-surface);
|
|
121
|
+
.tooltip.max {
|
|
122
|
+
--md-comp-rich-tooltip-container-color: var(--md-sys-color-surface-container);
|
|
128
123
|
--md-comp-rich-tooltip-container-shape: 12px;
|
|
129
124
|
|
|
130
125
|
display: flex;
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
@use "../abstracts" as *;
|
|
2
2
|
|
|
3
|
-
// Starting states for JS-driven animations: Sidenav staggers its list items in,
|
|
4
|
-
// and .fade-in is applied before an element is animated into view.
|
|
5
|
-
ul.staggered-list li { opacity: 0; }
|
|
6
|
-
.fade-in { opacity: 0; transform-origin: 0 50%; }
|
|
7
|
-
|
|
8
3
|
.scale-transition {
|
|
9
4
|
transition: transform .3s cubic-bezier(0.53, 0.01, 0.36, 1.63) !important;
|
|
10
5
|
|