@shortfuse/materialdesignweb 0.7.1-0 → 0.7.1-2
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/bin/generate-css.js +1 -2
- package/components/Badge.js +40 -3
- package/components/Body.js +16 -2
- package/components/BottomAppBar.js +25 -2
- package/components/Box.js +33 -3
- package/components/Button.js +146 -9
- package/components/Card.js +111 -3
- package/components/Checkbox.js +91 -3
- package/components/CheckboxIcon.js +92 -4
- package/components/Chip.js +38 -2
- package/components/Dialog.js +237 -3
- package/components/DialogActions.js +3 -2
- package/components/Divider.js +44 -3
- package/components/ExtendedFab.js +27 -2
- package/components/Fab.js +26 -2
- package/components/FilterChip.js +83 -2
- package/components/Headline.js +16 -2
- package/components/Icon.js +80 -4
- package/components/IconButton.js +153 -2
- package/components/Label.js +16 -2
- package/components/Layout.js +21 -3
- package/components/List.js +15 -2
- package/components/ListItem.js +229 -3
- package/components/ListOption.js +37 -3
- package/components/ListSelect.js +12 -2
- package/components/Menu.js +173 -3
- package/components/MenuItem.js +55 -2
- package/components/Nav.js +19 -2
- package/components/NavBar.js +37 -2
- package/components/NavBarItem.js +44 -2
- package/components/NavDrawer.js +34 -2
- package/components/NavDrawerItem.js +44 -2
- package/components/NavItem.js +183 -3
- package/components/NavRail.js +50 -2
- package/components/NavRailItem.js +25 -2
- package/components/Pane.js +263 -3
- package/components/Progress.js +469 -10
- package/components/Radio.js +97 -3
- package/components/RadioIcon.js +77 -5
- package/components/Ripple.js +76 -3
- package/components/SegmentedButton.js +97 -2
- package/components/SegmentedButtonGroup.js +15 -2
- package/components/Select.js +54 -2
- package/components/Shape.js +55 -18
- package/components/Slider.js +309 -3
- package/components/Snackbar.js +82 -2
- package/components/Surface.js +13 -4
- package/components/Switch.js +67 -4
- package/components/SwitchIcon.js +272 -5
- package/components/Tab.js +87 -3
- package/components/TabContent.js +21 -21
- package/components/TabList.js +131 -2
- package/components/TextArea.js +97 -3
- package/components/Title.js +16 -2
- package/components/Tooltip.js +42 -2
- package/components/TopAppBar.js +212 -3
- package/core/template.js +36 -9
- package/mixins/ControlMixin.js +65 -2
- package/mixins/DensityMixin.js +17 -3
- package/mixins/FlexableMixin.js +81 -3
- package/mixins/RippleMixin.js +15 -4
- package/mixins/ShapeMixin.js +279 -8
- package/mixins/StateMixin.js +87 -5
- package/mixins/SurfaceMixin.js +152 -3
- package/mixins/TextFieldMixin.js +661 -3
- package/mixins/ThemableMixin.js +206 -3
- package/mixins/TooltipTriggerMixin.js +30 -4
- package/mixins/TouchTargetMixin.js +29 -4
- package/package.json +2 -1
- package/theming/loader.js +0 -2
- package/components/Badge.css +0 -38
- package/components/Body.css +0 -14
- package/components/BottomAppBar.css +0 -23
- package/components/Box.css +0 -31
- package/components/Button.css +0 -147
- package/components/Card.css +0 -109
- package/components/Checkbox.css +0 -89
- package/components/CheckboxIcon.css +0 -90
- package/components/Chip.css +0 -35
- package/components/Dialog.css +0 -235
- package/components/Divider.css +0 -41
- package/components/ExtendedFab.css +0 -24
- package/components/Fab.css +0 -23
- package/components/FilterChip.css +0 -80
- package/components/Headline.css +0 -14
- package/components/Icon.css +0 -76
- package/components/IconButton.css +0 -150
- package/components/Label.css +0 -14
- package/components/Layout.css +0 -19
- package/components/List.css +0 -12
- package/components/ListItem.css +0 -224
- package/components/ListOption.css +0 -34
- package/components/ListSelect.css +0 -9
- package/components/Menu.css +0 -171
- package/components/MenuItem.css +0 -53
- package/components/Nav.css +0 -17
- package/components/NavBar.css +0 -34
- package/components/NavBarItem.css +0 -41
- package/components/NavDrawer.css +0 -31
- package/components/NavDrawerItem.css +0 -42
- package/components/NavItem.css +0 -181
- package/components/NavRail.css +0 -47
- package/components/NavRailItem.css +0 -25
- package/components/Outline.css +0 -138
- package/components/Pane.css +0 -261
- package/components/Progress.css +0 -75
- package/components/ProgressCircle.css +0 -226
- package/components/ProgressLine.css +0 -155
- package/components/Radio.css +0 -95
- package/components/RadioIcon.css +0 -73
- package/components/Ripple.css +0 -74
- package/components/SegmentedButton.css +0 -94
- package/components/SegmentedButtonGroup.css +0 -12
- package/components/Select.css +0 -52
- package/components/Shape.css +0 -132
- package/components/Slider.css +0 -307
- package/components/Snackbar.css +0 -80
- package/components/Surface.css +0 -10
- package/components/Switch.css +0 -64
- package/components/SwitchIcon.css +0 -178
- package/components/SwitchIconAnimations.css +0 -89
- package/components/Tab.css +0 -85
- package/components/TabList.css +0 -129
- package/components/TextArea.css +0 -93
- package/components/Title.css +0 -14
- package/components/Tooltip.css +0 -40
- package/components/TopAppBar.css +0 -209
- package/mixins/ControlMixin.css +0 -57
- package/mixins/DensityMixin.css +0 -40
- package/mixins/FlexableMixin.css +0 -79
- package/mixins/RippleMixin.css +0 -12
- package/mixins/ShapeMixin.css +0 -135
- package/mixins/StateMixin.css +0 -82
- package/mixins/SurfaceMixin.css +0 -150
- package/mixins/TextFieldMixin.css +0 -657
- package/mixins/ThemableMixin.css +0 -204
- package/mixins/TooltipTriggerMixin.css +0 -27
- package/mixins/TouchTargetMixin.css +0 -26
package/components/NavRail.js
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import Nav from './Nav.js';
|
|
2
|
-
import styles from './NavRail.css' assert { type: 'css' };
|
|
3
2
|
|
|
4
3
|
export default Nav
|
|
5
4
|
.extend()
|
|
6
5
|
.observe({
|
|
7
6
|
align: { value: /** @type {'start'|'center'|'end'} */ (null) },
|
|
8
7
|
})
|
|
9
|
-
.css(styles)
|
|
10
8
|
.on({
|
|
11
9
|
composed({ html }) {
|
|
12
10
|
const { slot } = this.refs;
|
|
@@ -14,4 +12,54 @@ export default Nav
|
|
|
14
12
|
slot.setAttribute('align', '{align}');
|
|
15
13
|
},
|
|
16
14
|
})
|
|
15
|
+
.css`
|
|
16
|
+
/* https://m3.material.io/components/navigation-rail/specs */
|
|
17
|
+
|
|
18
|
+
:host{
|
|
19
|
+
display: grid;
|
|
20
|
+
align-content: flex-start;
|
|
21
|
+
flex-direction: column;
|
|
22
|
+
grid-template-rows: auto minmax(0,1fr);
|
|
23
|
+
grid-template-columns: 80px;
|
|
24
|
+
justify-items: stretch;
|
|
25
|
+
|
|
26
|
+
text-align: center;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
#start {
|
|
30
|
+
display: flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
flex-direction: column;
|
|
33
|
+
gap: 12px;
|
|
34
|
+
|
|
35
|
+
padding-block-start: 12px;
|
|
36
|
+
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
#slot {
|
|
40
|
+
align-self: center;
|
|
41
|
+
|
|
42
|
+
display: flex;
|
|
43
|
+
align-items: stretch;
|
|
44
|
+
flex-direction: column;
|
|
45
|
+
gap: 12px;
|
|
46
|
+
overflow-x: clip;
|
|
47
|
+
overflow-y: auto;
|
|
48
|
+
|
|
49
|
+
box-sizing: border-box;
|
|
50
|
+
|
|
51
|
+
inline-size: 100%;
|
|
52
|
+
|
|
53
|
+
padding-block: 12px;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
#slot[align="start"] {
|
|
57
|
+
align-self: flex-start;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
#slot[align="end"] {
|
|
61
|
+
align-self: flex-end;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
`
|
|
17
65
|
.autoRegister('mdw-nav-rail');
|
|
@@ -1,7 +1,30 @@
|
|
|
1
|
+
/* https://m3.material.io/components/navigation-rail/specs */
|
|
2
|
+
|
|
1
3
|
import NavItem from './NavItem.js';
|
|
2
|
-
import styles from './NavRailItem.css' assert { type: 'css' };
|
|
3
4
|
|
|
4
5
|
export default NavItem
|
|
5
6
|
.extend()
|
|
6
|
-
.css
|
|
7
|
+
.css`
|
|
8
|
+
:host {
|
|
9
|
+
grid-auto-flow: row;
|
|
10
|
+
grid-auto-rows: minmax(20px, min-content);
|
|
11
|
+
grid-template-rows: [icon] minmax(32px, 1fr);
|
|
12
|
+
grid-template-columns: [icon] minmax(56px, 1fr);
|
|
13
|
+
|
|
14
|
+
padding-inline: 12px;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
#slot {
|
|
18
|
+
display: contents;
|
|
19
|
+
overflow-wrap: anywhere;
|
|
20
|
+
|
|
21
|
+
word-break: break-all;
|
|
22
|
+
word-break: break-word;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
#badge {
|
|
26
|
+
max-inline-size:40px;
|
|
27
|
+
grid-column: 1 / 2;
|
|
28
|
+
}
|
|
29
|
+
`
|
|
7
30
|
.autoRegister('mdw-nav-rail-item');
|
package/components/Pane.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import CustomElement from '../core/CustomElement.js';
|
|
2
2
|
import ThemableMixin from '../mixins/ThemableMixin.js';
|
|
3
3
|
|
|
4
|
-
import styles from './Pane.css' assert {type:'css'};
|
|
5
|
-
|
|
6
4
|
export default CustomElement
|
|
7
5
|
.mixin(ThemableMixin)
|
|
8
6
|
.extend()
|
|
@@ -14,8 +12,270 @@ export default CustomElement
|
|
|
14
12
|
navDrawer: 'boolean',
|
|
15
13
|
navRail: 'boolean',
|
|
16
14
|
})
|
|
17
|
-
.css(styles)
|
|
18
15
|
.html/* html */`
|
|
19
16
|
<slot id=slot></slot>
|
|
20
17
|
`
|
|
18
|
+
.css`
|
|
19
|
+
/* https://m2.material.io/design/layout/responsive-layout-grid.html#columns-gutters-and-margins */
|
|
20
|
+
/*
|
|
21
|
+
* Window breakpoints
|
|
22
|
+
* Compact (0 <= width < 600px):
|
|
23
|
+
* * Single: 100vw - padding
|
|
24
|
+
* * Padding: 16px
|
|
25
|
+
* * Spacer: 0 (none)
|
|
26
|
+
* Medium (600px <= width < 840px)
|
|
27
|
+
* * Single: 100vw - padding - (?navrail)
|
|
28
|
+
* * [Fixed]: 360px
|
|
29
|
+
* * [Flexable]: 100vw - 360px - spacer - padding
|
|
30
|
+
* * [Split] 50vw - ((padding + spacer) / 2)
|
|
31
|
+
* * Padding: 24px
|
|
32
|
+
* * Spacer: 24px
|
|
33
|
+
* Expanded (840px <= width)
|
|
34
|
+
* * Single: 100vw - padding - (?navrail | ?navdrawer)
|
|
35
|
+
* * [Fixed] 360px
|
|
36
|
+
* * [Flexable] 100vw - 360px - spacer - padding - (?navrail | ?navdrawer)
|
|
37
|
+
* * [Split] 50vw - ((padding + spacer + (?navrail | ?navdrawer)) / 2)
|
|
38
|
+
* * Padding: 24px
|
|
39
|
+
* * Spacer: 24px
|
|
40
|
+
*
|
|
41
|
+
* | Screen size | Margin | Body | Layout columns |
|
|
42
|
+
* |---------------------|---------|---------|----------------|
|
|
43
|
+
* | Extra-small (phone) | | | |
|
|
44
|
+
* | 0-631dp | 16dp | Scaling | 4 |
|
|
45
|
+
* | 632 - 647 | Scaling | 600dp | 8 |
|
|
46
|
+
* | Small (tablet) | | | |
|
|
47
|
+
* | 648-887 | 24dp | Scaling | 8 |
|
|
48
|
+
* | 888-1239 | Scaling | 840dp | 12 |
|
|
49
|
+
* | Medium (laptop) | | | |
|
|
50
|
+
* | 1240-1439 | 200dp | Scaling | 12 |
|
|
51
|
+
* | Large (desktop) | | | |
|
|
52
|
+
* | 1440+ | Scaling | 1040 | 12 |
|
|
53
|
+
*
|
|
54
|
+
*
|
|
55
|
+
* Column count is pane-based, not window based requiring newly computed values.
|
|
56
|
+
* Gutters are irrelevant to pane sizing.
|
|
57
|
+
* Nav Rail is ~80px.
|
|
58
|
+
* Nav Drawer is ~360px.
|
|
59
|
+
* Padding and spacers are set by pane's parent.
|
|
60
|
+
* Avoid using CSS Variables because panes are at top of document tree. https://bugs.chromium.org/p/chromium/issues/detail?id=1056209
|
|
61
|
+
* Container queries would reduce code considerably.
|
|
62
|
+
*/
|
|
63
|
+
|
|
64
|
+
/* Compact */
|
|
65
|
+
:host {
|
|
66
|
+
display: grid;
|
|
67
|
+
align-content: flex-start;
|
|
68
|
+
gap: 16px;
|
|
69
|
+
grid-auto-flow: row;
|
|
70
|
+
grid-template-columns: repeat(4, 1fr);
|
|
71
|
+
|
|
72
|
+
max-inline-size: 600px;
|
|
73
|
+
|
|
74
|
+
flex: 1;
|
|
75
|
+
|
|
76
|
+
transition-duration: 200ms;
|
|
77
|
+
/* stylelint-disable-next-line liberty/use-logical-spec */
|
|
78
|
+
transition-property: visibility, width, max-inline-size;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/* Will set 8col when window is 600px + padding (2x16) */
|
|
82
|
+
/* Will set 12col when window is 840px + padding (2x24) */
|
|
83
|
+
@media screen and (min-width: 632px) { :host { grid-template-columns: repeat(8, 1fr); } }
|
|
84
|
+
@media screen and (min-width: 888px) { :host { grid-template-columns: repeat(12, 1fr); } }
|
|
85
|
+
|
|
86
|
+
/* Will cap to 840px when window is 600px + padding (2x24px) */
|
|
87
|
+
/* Will cap to 1040px when window is 840px + padding (2x200px) */
|
|
88
|
+
@media screen and (min-width: 648px) { :host { max-inline-size: 840px } }
|
|
89
|
+
@media screen and (min-width: 1240px) { :host { max-inline-size: 1040px; } }
|
|
90
|
+
|
|
91
|
+
/* NAVRAIL */
|
|
92
|
+
|
|
93
|
+
:host([nav-rail]) {
|
|
94
|
+
grid-template-columns: repeat(4, 1fr);
|
|
95
|
+
|
|
96
|
+
max-inline-size: 600px;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/* Will set 8col when window is 600px + padding (2x24) + navrail (80) */
|
|
100
|
+
/* Will set 12col when window is 840px + padding (2x24) + navrail (80) */
|
|
101
|
+
@media screen and (min-width: 728px) { :host([nav-rail]) { grid-template-columns: repeat(8, 1fr); } }
|
|
102
|
+
@media screen and (min-width: 968px) { :host([nav-rail]) { grid-template-columns: repeat(12, 1fr); } }
|
|
103
|
+
|
|
104
|
+
/* Will cap to 840px when window is 600px + padding (2x24px) + navrail (80) */
|
|
105
|
+
/* Will cap to 1040px when window is 840px + padding (2x200px) + navrail (80) */
|
|
106
|
+
@media screen and (min-width: 728px) { :host([nav-rail]) { max-inline-size: 840px } }
|
|
107
|
+
@media screen and (min-width: 1320px) { :host([nav-rail]) { max-inline-size: 1040px; } }
|
|
108
|
+
|
|
109
|
+
/* NAVDRAWER */
|
|
110
|
+
|
|
111
|
+
:host([nav-drawer]) {
|
|
112
|
+
grid-template-columns: repeat(4, 1fr);
|
|
113
|
+
|
|
114
|
+
max-inline-size: 600px;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/* Will set 8col when window is 600px + padding (2x24) + navdrawer (360) */
|
|
118
|
+
/* Will set 12col when window is 840px + padding (2x24) + navdrawer (360) */
|
|
119
|
+
@media screen and (min-width: 1008px) { :host([nav-rail]) { grid-template-columns: repeat(8, 1fr); } }
|
|
120
|
+
@media screen and (min-width: 1248px) { :host([nav-rail]) { grid-template-columns: repeat(12, 1fr); } }
|
|
121
|
+
|
|
122
|
+
/* Will cap to 840px when window is 600px + padding (2x24px) + navrail (360) */
|
|
123
|
+
/* Will cap to 1040px when window is 840px + padding (2x200px) + navrail (360) */
|
|
124
|
+
@media screen and (min-width: 1008px) { :host([nav-rail]) { max-inline-size: 840px } }
|
|
125
|
+
@media screen and (min-width: 1600px) { :host([nav-rail]) { max-inline-size: 1040px; } }
|
|
126
|
+
|
|
127
|
+
/* FLEXIBLE */
|
|
128
|
+
|
|
129
|
+
:host([flexible]) {
|
|
130
|
+
grid-template-columns: repeat(4, 1fr);
|
|
131
|
+
|
|
132
|
+
max-inline-size: 600px;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/* Will set 8col when window is 600px + padding (2x24) + spacer (24) + fixed (360) */
|
|
136
|
+
/* Will set 12col when window is 840px + padding (2x24) + spacer (24) + fixed (360) */
|
|
137
|
+
@media screen and (min-width: 1032px) { :host([flexible]) { grid-template-columns: repeat(8, 1fr); } }
|
|
138
|
+
@media screen and (min-width: 1272px) { :host([flexible]) { grid-template-columns: repeat(12, 1fr); } }
|
|
139
|
+
|
|
140
|
+
/* Will cap to 840px when window is 600px + padding (2x24px) + spacer (24) + fixed (360) */
|
|
141
|
+
/* Will cap to 1040px when window is 840px + padding (2x200px) + spacer (24) + fixed (360) */
|
|
142
|
+
@media screen and (min-width: 1032px) { :host([flexible]) { max-inline-size: 840px } }
|
|
143
|
+
@media screen and (min-width: 1624px) { :host([flexible]) { max-inline-size: 1040px; } }
|
|
144
|
+
|
|
145
|
+
/* FLEXIBLE + NAV RAIL */
|
|
146
|
+
|
|
147
|
+
:host([flexible]:where([nav-rail])) {
|
|
148
|
+
grid-template-columns: repeat(4, 1fr);
|
|
149
|
+
|
|
150
|
+
max-inline-size: 600px;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/* Will set 8col when window is 600px + padding (2x24) + spacer (24) + fixed (360) + navrail (80) */
|
|
154
|
+
/* Will set 12col when window is 840px + padding (2x24) + spacer (24) + fixed (360) + navrail (80) */
|
|
155
|
+
@media screen and (min-width: 1112px) { :host([flexible]:where([nav-rail])) { grid-template-columns: repeat(8, 1fr); } }
|
|
156
|
+
@media screen and (min-width: 1352px) { :host([flexible]:where([nav-rail])) { grid-template-columns: repeat(12, 1fr); } }
|
|
157
|
+
|
|
158
|
+
/* Will cap to 840px when window is 600px + padding (2x24px) + spacer (24) + fixed (360) + navrail (80) */
|
|
159
|
+
/* Will cap to 1040px when window is 840px + padding (2x200px) + spacer (24) + fixed (360) + navrail (80) */
|
|
160
|
+
@media screen and (min-width: 1112px) { :host([flexible]:where([nav-rail])) { max-inline-size: 840px } }
|
|
161
|
+
@media screen and (min-width: 1704px) { :host([flexible]:where([nav-rail])) { max-inline-size: 1040px; } }
|
|
162
|
+
|
|
163
|
+
/* FLEXIBLE + NAV DRAWER */
|
|
164
|
+
|
|
165
|
+
:host([flexible]:where([nav-drawer])) {
|
|
166
|
+
grid-template-columns: repeat(4, 1fr);
|
|
167
|
+
|
|
168
|
+
max-inline-size: 600px;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/* Will set 8col when window is 600px + padding (2x24) + spacer (24) + fixed (360) + navdrawer (360) */
|
|
172
|
+
/* Will set 12col when window is 840px + padding (2x24) + spacer (24) + fixed (360) + navdrawer (360) */
|
|
173
|
+
@media screen and (min-width: 1392px) { :host([flexible]:where([nav-drawer])) { grid-template-columns: repeat(8, 1fr); } }
|
|
174
|
+
@media screen and (min-width: 1632px) { :host([flexible]:where([nav-drawer])) { grid-template-columns: repeat(12, 1fr); } }
|
|
175
|
+
|
|
176
|
+
/* Will cap to 840px when window is 600px + padding (2x24px) + spacer (24) + fixed (360) + navdrawer (360) */
|
|
177
|
+
/* Will cap to 1040px when window is 840px + padding (2x200px) + spacer (24) + fixed (360) + navdrawer (360) */
|
|
178
|
+
@media screen and (min-width: 1392px) { :host([flexible]:where([nav-drawer])) { max-inline-size: 840px } }
|
|
179
|
+
@media screen and (min-width: 1984px) { :host([flexible]:where([nav-drawer])) { max-inline-size: 1040px; } }
|
|
180
|
+
|
|
181
|
+
/* SPLIT */
|
|
182
|
+
|
|
183
|
+
:host([split]) {
|
|
184
|
+
grid-template-columns: repeat(4, 1fr);
|
|
185
|
+
|
|
186
|
+
max-inline-size: 600px;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/* Will set 8col when window is 600px + padding (2x24) + spacer (24) + split (600) */
|
|
190
|
+
/* Will set 12col when window is 840px + padding (2x24) + spacer (24) + split (840) */
|
|
191
|
+
@media screen and (min-width: 1272px) { :host([split]) { grid-template-columns: repeat(8, 1fr); } }
|
|
192
|
+
@media screen and (min-width: 1752px) { :host([split]) { grid-template-columns: repeat(12, 1fr); } }
|
|
193
|
+
|
|
194
|
+
/* Will cap to 840px when window is 600px + padding (2x24px) + spacer (24) + split (600) */
|
|
195
|
+
/* Will cap to 1040px when window is 840px + padding (2x200px) + spacer (24) + split (840) */
|
|
196
|
+
@media screen and (min-width: 1272px) { :host([split]) { max-inline-size: 840px } }
|
|
197
|
+
@media screen and (min-width: 2104px) { :host([split]) { max-inline-size: 1040px; } }
|
|
198
|
+
|
|
199
|
+
/* SPLIT + NAVRAIL */
|
|
200
|
+
|
|
201
|
+
:host([split]:where([nav-rail])) {
|
|
202
|
+
grid-template-columns: repeat(4, 1fr);
|
|
203
|
+
|
|
204
|
+
max-inline-size: 600px;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/* Will set 8col when window is 600px + padding (2x24) + spacer (24) + split (600) + navrail (80) */
|
|
208
|
+
/* Will set 12col when window is 840px + padding (2x24) + spacer (24) + split (840) + navrail (80) */
|
|
209
|
+
@media screen and (min-width: 1352px) { :host([split]:where([nav-rail])) { grid-template-columns: repeat(8, 1fr); } }
|
|
210
|
+
@media screen and (min-width: 1832px) { :host([split]:where([nav-rail])) { grid-template-columns: repeat(12, 1fr); } }
|
|
211
|
+
|
|
212
|
+
/* Will cap to 840px when window is 600px + padding (2x24px) + spacer (24) + split (600) + navrail (80) */
|
|
213
|
+
/* Will cap to 1040px when window is 840px + padding (2x200px) + spacer (24) + split (840) + navrail (80) */
|
|
214
|
+
@media screen and (min-width: 1352px) { :host([split]:where([nav-rail])) { max-inline-size: 840px } }
|
|
215
|
+
@media screen and (min-width: 2184px) { :host([split]:where([nav-rail])) { max-inline-size: 1040px; } }
|
|
216
|
+
|
|
217
|
+
/* SPLIT + NAVDRAWER */
|
|
218
|
+
|
|
219
|
+
:host([split]:where([nav-drawer])) {
|
|
220
|
+
grid-template-columns: repeat(4, 1fr);
|
|
221
|
+
|
|
222
|
+
max-inline-size: 600px;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/* Will set 8col when window is 600px + padding (2x24) + spacer (24) + split (600) + navdrawer (360) */
|
|
226
|
+
/* Will set 12col when window is 840px + padding (2x24) + spacer (24) + split (840) + navdrawer (360) */
|
|
227
|
+
@media screen and (min-width: 1632px) { :host([split]:where([nav-drawer])) { grid-template-columns: repeat(8, 1fr); } }
|
|
228
|
+
@media screen and (min-width: 2112px) { :host([split]:where([nav-drawer])) { grid-template-columns: repeat(12, 1fr); } }
|
|
229
|
+
|
|
230
|
+
/* Will cap to 840px when window is 600px + padding (2x24px) + spacer (24) + split (600) + navdrawer (360) */
|
|
231
|
+
/* Will cap to 1040px when window is 840px + padding (2x200px) + spacer (24) + split (840) + navdrawer (360) */
|
|
232
|
+
@media screen and (min-width: 1632px) { :host([split]:where([nav-drawer])) { max-inline-size: 840px } }
|
|
233
|
+
@media screen and (min-width: 2464px) { :host([split]:where([nav-drawer])) { max-inline-size: 1040px; } }
|
|
234
|
+
|
|
235
|
+
:host([full-width]) {
|
|
236
|
+
max-inline-size: none;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/** FIXED **/
|
|
240
|
+
|
|
241
|
+
:host([fixed]) {
|
|
242
|
+
grid-template-columns: repeat(4, 1fr);
|
|
243
|
+
|
|
244
|
+
inline-size:360px;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
@media screen and (max-width: 600px) {
|
|
248
|
+
:host(:nth-of-type(2)) {
|
|
249
|
+
display: none;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
/* Will cap to 360px when window is 360px + padding (2x24px) + spacer (24) + 360px */
|
|
253
|
+
@media screen and (min-width: 792px) {
|
|
254
|
+
:host([fixed]) {
|
|
255
|
+
max-inline-size: 360px
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
#scrim {
|
|
260
|
+
position: absolute;
|
|
261
|
+
inset: 0;
|
|
262
|
+
|
|
263
|
+
grid-area: auto;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
#slot::slotted(*) { grid-column: 1 / none }
|
|
267
|
+
#slot::slotted([colspan="1"]) { grid-column-end: span 1; }
|
|
268
|
+
#slot::slotted([colspan="2"]) { grid-column-end: span 2; }
|
|
269
|
+
#slot::slotted([colspan="3"]) { grid-column-end: span 3; }
|
|
270
|
+
#slot::slotted([colspan="4"]) { grid-column-end: span 4; }
|
|
271
|
+
#slot::slotted([colspan="5"]) { grid-column-end: span 5; }
|
|
272
|
+
#slot::slotted([colspan="6"]) { grid-column-end: span 6; }
|
|
273
|
+
#slot::slotted([colspan="7"]) { grid-column-end: span 7; }
|
|
274
|
+
#slot::slotted([colspan="8"]) { grid-column-end: span 8; }
|
|
275
|
+
#slot::slotted([colspan="9"]) { grid-column-end: span 9; }
|
|
276
|
+
#slot::slotted([colspan="10"]) { grid-column-end: span 10; }
|
|
277
|
+
#slot::slotted([colspan="11"]) { grid-column-end: span 11; }
|
|
278
|
+
#slot::slotted([colspan="12"]) { grid-column-end: span 12; }
|
|
279
|
+
|
|
280
|
+
`
|
|
21
281
|
.autoRegister('mdw-pane');
|