@keenmate/pure-css 1.0.0-rc07 → 1.0.0-rc09
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 +513 -411
- package/README.md +40 -11
- package/dist/css/base.css +133 -67
- package/dist/css/component-reset.css +27 -0
- package/dist/css/pure-css.css +157 -79
- package/package.json +83 -81
- package/src/js/fit.js +5 -2
- package/src/scss/_base-css-variables.scss +429 -655
- package/src/scss/_fit-flyout.scss +1 -1
- package/src/scss/_layout-container.scss +168 -168
- package/src/scss/_navbar-elements.scss +11 -2
- package/src/scss/_resize-handle.scss +1 -1
- package/src/scss/_sidebar-states.scss +2 -2
- package/src/scss/_sidebar.scss +21 -6
- package/src/scss/component-reset.scss +65 -0
- package/src/scss/reboot.scss +134 -134
- package/src/scss/scrollbars.scss +48 -48
- package/src/scss/variables/_base.scss +150 -38
- package/src/scss/variables/_colors.scss +208 -237
- package/src/scss/variables/_index.scss +27 -23
- package/src/scss/variables/_system.scss +19 -23
- package/src/scss/variables/_components.scss +0 -840
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
min-width: 20rem;
|
|
61
61
|
max-width: 32rem;
|
|
62
62
|
padding: $spacing-sm;
|
|
63
|
-
background: var(--
|
|
63
|
+
background: var(--base-main-bg);
|
|
64
64
|
border: $border-width-base solid var(--pc-border-color);
|
|
65
65
|
border-radius: var(--pc-border-radius);
|
|
66
66
|
box-shadow: $shadow-lg;
|
|
@@ -1,168 +1,168 @@
|
|
|
1
|
-
@use 'variables/index' as *;
|
|
2
|
-
/* ========================================
|
|
3
|
-
Layout Container
|
|
4
|
-
Main layout wrapper, content areas, sticky/scroll modes
|
|
5
|
-
======================================== */
|
|
6
|
-
|
|
7
|
-
// Layout wrapper - applied to body for mode-specific classes
|
|
8
|
-
body.pc-layout--sticky {
|
|
9
|
-
height: 100vh;
|
|
10
|
-
overflow: hidden;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
// Layout Container - centered, starts below navbar
|
|
14
|
-
.pc-layout {
|
|
15
|
-
max-width: 100%;
|
|
16
|
-
margin: $navbar-height auto 0;
|
|
17
|
-
background-color: var(--pc-page-bg);
|
|
18
|
-
overflow: visible; // Allow tooltips to escape
|
|
19
|
-
display: flex;
|
|
20
|
-
flex-direction: column;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
// Constrained widths - controlled by body class
|
|
24
|
-
body.pc-container-sm .pc-layout {
|
|
25
|
-
max-width: $layout-container-sm;
|
|
26
|
-
box-shadow: $shadow-2xl;
|
|
27
|
-
border-left: $border-width-base solid var(--pc-border-color);
|
|
28
|
-
border-right: $border-width-base solid var(--pc-border-color);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
body.pc-container-md .pc-layout {
|
|
32
|
-
max-width: $layout-container-md;
|
|
33
|
-
box-shadow: $shadow-2xl;
|
|
34
|
-
border-left: $border-width-base solid var(--pc-border-color);
|
|
35
|
-
border-right: $border-width-base solid var(--pc-border-color);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
body.pc-container-lg .pc-layout {
|
|
39
|
-
max-width: $layout-container-lg;
|
|
40
|
-
box-shadow: $shadow-2xl;
|
|
41
|
-
border-left: $border-width-base solid var(--pc-border-color);
|
|
42
|
-
border-right: $border-width-base solid var(--pc-border-color);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
body.pc-container-xl .pc-layout {
|
|
46
|
-
max-width: $layout-container-xl;
|
|
47
|
-
box-shadow: $shadow-xl;
|
|
48
|
-
border-left: $border-width-base solid var(--pc-border-color);
|
|
49
|
-
border-right: $border-width-base solid var(--pc-border-color);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
body.pc-container-2xl .pc-layout {
|
|
53
|
-
max-width: $layout-container-2xl;
|
|
54
|
-
box-shadow: $shadow-xl;
|
|
55
|
-
border-left: $border-width-base solid var(--pc-border-color);
|
|
56
|
-
border-right: $border-width-base solid var(--pc-border-color);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
// Sticky mode - fixed height
|
|
60
|
-
body.pc-layout--sticky .pc-layout {
|
|
61
|
-
height: calc(100vh - #{$navbar-height}); // Full viewport minus top margin
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
// Scroll mode - minimum height
|
|
65
|
-
body:not(.pc-layout--sticky) .pc-layout {
|
|
66
|
-
min-height: calc(100vh - #{$navbar-height}); // Ensure footer reaches bottom
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
// Layout inner container - flex wrapper for sidebar + content
|
|
70
|
-
.pc-layout__inner {
|
|
71
|
-
display: flex;
|
|
72
|
-
width: 100%;
|
|
73
|
-
flex: 1; // Take available space, pushing footer to bottom
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
// Sticky mode - inner container takes full height minus footer
|
|
77
|
-
body.pc-layout--sticky .pc-layout__inner {
|
|
78
|
-
flex: 1;
|
|
79
|
-
overflow: hidden; // Prevent overflow, let content wrapper scroll
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
// Content wrapper - wraps main content only
|
|
83
|
-
.pc-layout__content {
|
|
84
|
-
flex: 1;
|
|
85
|
-
display: flex;
|
|
86
|
-
flex-direction: column;
|
|
87
|
-
overflow-y: auto; // Always scrollable
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
// Main content area
|
|
91
|
-
.pc-layout__main {
|
|
92
|
-
flex: 1;
|
|
93
|
-
padding: $spacing-base;
|
|
94
|
-
container-type: inline-size;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
// Footer - outside inner, sibling to inner
|
|
98
|
-
.pc-layout__footer {
|
|
99
|
-
min-height: $footer-height;
|
|
100
|
-
background-color: var(--pc-footer-bg, var(--base-main-bg));
|
|
101
|
-
border-top: $border-width-base solid var(--pc-footer-border-color, var(--base-border-color));
|
|
102
|
-
display: flex;
|
|
103
|
-
align-items: center;
|
|
104
|
-
padding: $spacing-xs $spacing-base;
|
|
105
|
-
flex-shrink: 0; // Don't shrink footer
|
|
106
|
-
gap: $spacing-base;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
// Footer sections - Start/Center/End layout (mirrors navbar structure)
|
|
110
|
-
.pc-footer__start {
|
|
111
|
-
display: flex;
|
|
112
|
-
align-items: center;
|
|
113
|
-
gap: $spacing-base;
|
|
114
|
-
flex-shrink: 0;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.pc-footer__center {
|
|
118
|
-
flex: 1;
|
|
119
|
-
min-width: 0; // Allow shrinking for ellipsis
|
|
120
|
-
display: flex;
|
|
121
|
-
align-items: center;
|
|
122
|
-
justify-content: center;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
.pc-footer__end {
|
|
126
|
-
display: flex;
|
|
127
|
-
align-items: center;
|
|
128
|
-
gap: $spacing-base;
|
|
129
|
-
flex-shrink: 0;
|
|
130
|
-
|
|
131
|
-
&--vertical {
|
|
132
|
-
flex-direction: column;
|
|
133
|
-
align-items: flex-end;
|
|
134
|
-
gap: $spacing-xs;
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
// Responsive footer - stack sections on mobile
|
|
139
|
-
@media (max-width: $mobile-breakpoint) {
|
|
140
|
-
.pc-layout__footer {
|
|
141
|
-
flex-wrap: wrap;
|
|
142
|
-
min-height: auto;
|
|
143
|
-
padding: $spacing-sm $spacing-base;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
.pc-footer__start,
|
|
147
|
-
.pc-footer__center,
|
|
148
|
-
.pc-footer__end {
|
|
149
|
-
flex-shrink: 1;
|
|
150
|
-
min-width: 0;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
.pc-footer__start {
|
|
154
|
-
flex: 1 1 auto;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
.pc-footer__center {
|
|
158
|
-
display: none; // Hide empty center on mobile
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
.pc-footer__end {
|
|
162
|
-
flex: 0 1 auto;
|
|
163
|
-
|
|
164
|
-
&--vertical {
|
|
165
|
-
align-items: flex-end;
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
}
|
|
1
|
+
@use 'variables/index' as *;
|
|
2
|
+
/* ========================================
|
|
3
|
+
Layout Container
|
|
4
|
+
Main layout wrapper, content areas, sticky/scroll modes
|
|
5
|
+
======================================== */
|
|
6
|
+
|
|
7
|
+
// Layout wrapper - applied to body for mode-specific classes
|
|
8
|
+
body.pc-layout--sticky {
|
|
9
|
+
height: 100vh;
|
|
10
|
+
overflow: hidden;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// Layout Container - centered, starts below navbar
|
|
14
|
+
.pc-layout {
|
|
15
|
+
max-width: 100%;
|
|
16
|
+
margin: $navbar-height auto 0;
|
|
17
|
+
background-color: var(--pc-page-bg);
|
|
18
|
+
overflow: visible; // Allow tooltips to escape
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// Constrained widths - controlled by body class
|
|
24
|
+
body.pc-container-sm .pc-layout {
|
|
25
|
+
max-width: $layout-container-sm;
|
|
26
|
+
box-shadow: $shadow-2xl;
|
|
27
|
+
border-left: $border-width-base solid var(--pc-border-color);
|
|
28
|
+
border-right: $border-width-base solid var(--pc-border-color);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
body.pc-container-md .pc-layout {
|
|
32
|
+
max-width: $layout-container-md;
|
|
33
|
+
box-shadow: $shadow-2xl;
|
|
34
|
+
border-left: $border-width-base solid var(--pc-border-color);
|
|
35
|
+
border-right: $border-width-base solid var(--pc-border-color);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
body.pc-container-lg .pc-layout {
|
|
39
|
+
max-width: $layout-container-lg;
|
|
40
|
+
box-shadow: $shadow-2xl;
|
|
41
|
+
border-left: $border-width-base solid var(--pc-border-color);
|
|
42
|
+
border-right: $border-width-base solid var(--pc-border-color);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
body.pc-container-xl .pc-layout {
|
|
46
|
+
max-width: $layout-container-xl;
|
|
47
|
+
box-shadow: $shadow-xl;
|
|
48
|
+
border-left: $border-width-base solid var(--pc-border-color);
|
|
49
|
+
border-right: $border-width-base solid var(--pc-border-color);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
body.pc-container-2xl .pc-layout {
|
|
53
|
+
max-width: $layout-container-2xl;
|
|
54
|
+
box-shadow: $shadow-xl;
|
|
55
|
+
border-left: $border-width-base solid var(--pc-border-color);
|
|
56
|
+
border-right: $border-width-base solid var(--pc-border-color);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// Sticky mode - fixed height
|
|
60
|
+
body.pc-layout--sticky .pc-layout {
|
|
61
|
+
height: calc(100vh - #{$navbar-height}); // Full viewport minus top margin
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// Scroll mode - minimum height
|
|
65
|
+
body:not(.pc-layout--sticky) .pc-layout {
|
|
66
|
+
min-height: calc(100vh - #{$navbar-height}); // Ensure footer reaches bottom
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// Layout inner container - flex wrapper for sidebar + content
|
|
70
|
+
.pc-layout__inner {
|
|
71
|
+
display: flex;
|
|
72
|
+
width: 100%;
|
|
73
|
+
flex: 1; // Take available space, pushing footer to bottom
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// Sticky mode - inner container takes full height minus footer
|
|
77
|
+
body.pc-layout--sticky .pc-layout__inner {
|
|
78
|
+
flex: 1;
|
|
79
|
+
overflow: hidden; // Prevent overflow, let content wrapper scroll
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// Content wrapper - wraps main content only
|
|
83
|
+
.pc-layout__content {
|
|
84
|
+
flex: 1;
|
|
85
|
+
display: flex;
|
|
86
|
+
flex-direction: column;
|
|
87
|
+
overflow-y: auto; // Always scrollable
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// Main content area
|
|
91
|
+
.pc-layout__main {
|
|
92
|
+
flex: 1;
|
|
93
|
+
padding: $spacing-base;
|
|
94
|
+
container-type: inline-size;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// Footer - outside inner, sibling to inner
|
|
98
|
+
.pc-layout__footer {
|
|
99
|
+
min-height: $footer-height;
|
|
100
|
+
background-color: var(--pc-footer-bg, var(--base-main-bg));
|
|
101
|
+
border-top: $border-width-base solid var(--pc-footer-border-color, var(--base-border-color));
|
|
102
|
+
display: flex;
|
|
103
|
+
align-items: center;
|
|
104
|
+
padding: $spacing-xs $spacing-base;
|
|
105
|
+
flex-shrink: 0; // Don't shrink footer
|
|
106
|
+
gap: $spacing-base;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// Footer sections - Start/Center/End layout (mirrors navbar structure)
|
|
110
|
+
.pc-footer__start {
|
|
111
|
+
display: flex;
|
|
112
|
+
align-items: center;
|
|
113
|
+
gap: $spacing-base;
|
|
114
|
+
flex-shrink: 0;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.pc-footer__center {
|
|
118
|
+
flex: 1;
|
|
119
|
+
min-width: 0; // Allow shrinking for ellipsis
|
|
120
|
+
display: flex;
|
|
121
|
+
align-items: center;
|
|
122
|
+
justify-content: center;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.pc-footer__end {
|
|
126
|
+
display: flex;
|
|
127
|
+
align-items: center;
|
|
128
|
+
gap: $spacing-base;
|
|
129
|
+
flex-shrink: 0;
|
|
130
|
+
|
|
131
|
+
&--vertical {
|
|
132
|
+
flex-direction: column;
|
|
133
|
+
align-items: flex-end;
|
|
134
|
+
gap: $spacing-xs;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
// Responsive footer - stack sections on mobile
|
|
139
|
+
@media (max-width: $mobile-breakpoint) {
|
|
140
|
+
.pc-layout__footer {
|
|
141
|
+
flex-wrap: wrap;
|
|
142
|
+
min-height: auto;
|
|
143
|
+
padding: $spacing-sm $spacing-base;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.pc-footer__start,
|
|
147
|
+
.pc-footer__center,
|
|
148
|
+
.pc-footer__end {
|
|
149
|
+
flex-shrink: 1;
|
|
150
|
+
min-width: 0;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.pc-footer__start {
|
|
154
|
+
flex: 1 1 auto;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.pc-footer__center {
|
|
158
|
+
display: none; // Hide empty center on mobile
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.pc-footer__end {
|
|
162
|
+
flex: 0 1 auto;
|
|
163
|
+
|
|
164
|
+
&--vertical {
|
|
165
|
+
align-items: flex-end;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
top: 100%;
|
|
143
143
|
inset-inline-start: 0; // RTL: flips to right: 0
|
|
144
144
|
min-width: 19.2rem;
|
|
145
|
-
background-color: var(--
|
|
145
|
+
background-color: var(--base-main-bg);
|
|
146
146
|
border: $border-width-base solid var(--pc-border-color);
|
|
147
147
|
border-radius: var(--pc-border-radius);
|
|
148
148
|
box-shadow: $shadow-lg;
|
|
@@ -256,10 +256,19 @@
|
|
|
256
256
|
position: relative;
|
|
257
257
|
}
|
|
258
258
|
|
|
259
|
+
// SVG mask chevron (was a "›" text glyph). Shares --base-icon-chevron with the
|
|
260
|
+
// sidebar + components; --pa-icon-chevron (core) overrides, #{$base-icon-chevron} is
|
|
261
|
+
// the standalone fallback. `font-size: 0` hides any legacy "›" in old markup.
|
|
259
262
|
&__more-chevron {
|
|
260
263
|
display: inline-block;
|
|
261
264
|
margin-inline-start: $spacing-xs;
|
|
262
|
-
|
|
265
|
+
inline-size: 1.4rem;
|
|
266
|
+
block-size: 1.4rem;
|
|
267
|
+
flex-shrink: 0;
|
|
268
|
+
font-size: 0;
|
|
269
|
+
background-color: currentColor;
|
|
270
|
+
-webkit-mask: var(--base-icon-chevron, #{$base-icon-chevron}) center / 1.1rem no-repeat;
|
|
271
|
+
mask: var(--base-icon-chevron, #{$base-icon-chevron}) center / 1.1rem no-repeat;
|
|
263
272
|
transition: transform $transition-fast $easing-snappy;
|
|
264
273
|
}
|
|
265
274
|
|
|
@@ -46,7 +46,7 @@ $resize-knob-radius-lg: 6px !default;
|
|
|
46
46
|
// themes (radius 0) stay square via min(). High-contrast fill / border / shadow
|
|
47
47
|
// so the knob stands out on both light and dark surfaces.
|
|
48
48
|
border-radius: min(var(--pc-border-radius-lg), #{$resize-knob-radius});
|
|
49
|
-
background-color: var(--
|
|
49
|
+
background-color: var(--base-main-bg);
|
|
50
50
|
border: $border-width-medium solid var(--pc-border-color);
|
|
51
51
|
color: var(--pc-text-color-2);
|
|
52
52
|
font-size: $font-size-lg;
|
|
@@ -120,11 +120,11 @@
|
|
|
120
120
|
width: 100%;
|
|
121
121
|
|
|
122
122
|
&:hover {
|
|
123
|
-
background-color: var(--pc-sidebar-submenu-hover-bg, var(--base-
|
|
123
|
+
background-color: var(--pc-sidebar-submenu-hover-bg, var(--base-hover-bg));
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
&--active {
|
|
127
|
-
background-color: var(--pc-sidebar-submenu-active-bg, var(--base-
|
|
127
|
+
background-color: var(--pc-sidebar-submenu-active-bg, var(--base-active-bg));
|
|
128
128
|
color: var(--pc-sidebar-submenu-active-text, var(--base-text-color-1));
|
|
129
129
|
}
|
|
130
130
|
}
|
package/src/scss/_sidebar.scss
CHANGED
|
@@ -199,7 +199,7 @@ body.pc-layout--sticky .pc-layout__sidebar {
|
|
|
199
199
|
height: #{$base-input-size-md-height}rem;
|
|
200
200
|
padding: 0 $spacing-base 0 $spacing-sm;
|
|
201
201
|
color: var(--pc-text-color-2);
|
|
202
|
-
background-color: var(--
|
|
202
|
+
background-color: var(--base-input-bg);
|
|
203
203
|
border: $border-width-base solid var(--pc-border-color);
|
|
204
204
|
border-radius: var(--pc-border-radius);
|
|
205
205
|
text-align: start; // RTL: flips to right
|
|
@@ -217,7 +217,10 @@ body.pc-layout--sticky .pc-layout__sidebar {
|
|
|
217
217
|
}
|
|
218
218
|
|
|
219
219
|
&:hover {
|
|
220
|
-
|
|
220
|
+
// $accent-color (foundation) — was $input-focus-border-color, an exact
|
|
221
|
+
// alias; inlined so the shell no longer depends on the component layer
|
|
222
|
+
// (variables/_components.scss now lives in pure-admin-core).
|
|
223
|
+
border-color: $accent-color;
|
|
221
224
|
color: var(--pc-sidebar-text, var(--base-text-color-1));
|
|
222
225
|
}
|
|
223
226
|
|
|
@@ -376,11 +379,11 @@ body.pc-layout--sticky .pc-layout__sidebar {
|
|
|
376
379
|
border-inline-end: $border-width-medium solid transparent; // RTL: flips to border-left
|
|
377
380
|
|
|
378
381
|
&:hover {
|
|
379
|
-
background-color: var(--pc-sidebar-submenu-hover-bg, var(--base-
|
|
382
|
+
background-color: var(--pc-sidebar-submenu-hover-bg, var(--base-hover-bg));
|
|
380
383
|
}
|
|
381
384
|
|
|
382
385
|
&--active {
|
|
383
|
-
background-color: var(--pc-sidebar-submenu-active-bg, var(--base-
|
|
386
|
+
background-color: var(--pc-sidebar-submenu-active-bg, var(--base-active-bg));
|
|
384
387
|
color: var(--pc-sidebar-submenu-active-text, var(--base-text-color-1));
|
|
385
388
|
border-inline-end-color: var(--pc-accent); // RTL: flips to border-left-color
|
|
386
389
|
}
|
|
@@ -403,10 +406,22 @@ body.pc-layout--sticky .pc-layout__sidebar {
|
|
|
403
406
|
}
|
|
404
407
|
}
|
|
405
408
|
|
|
406
|
-
// Chevron icon for toggle buttons
|
|
409
|
+
// Chevron icon for toggle buttons. Rendered as an SVG mask painted in
|
|
410
|
+
// currentColor (was a bare "›" text glyph, which rendered inconsistently
|
|
411
|
+
// across platforms/fonts). Reads the shared --base-icon-chevron so it aligns
|
|
412
|
+
// with pure-admin + the web components; --pa-icon-chevron (core) lets pure-admin
|
|
413
|
+
// override, and #{$base-icon-chevron} is the standalone literal fallback.
|
|
414
|
+
// `font-size: 0` collapses any legacy "›" still present in older markup so it
|
|
415
|
+
// never double-renders alongside the mask.
|
|
407
416
|
&__chevron {
|
|
408
417
|
margin-inline-start: auto; // RTL: flips to margin-right: auto
|
|
409
|
-
|
|
418
|
+
inline-size: 1.6rem;
|
|
419
|
+
block-size: 1.6rem;
|
|
420
|
+
flex-shrink: 0;
|
|
421
|
+
font-size: 0;
|
|
422
|
+
background-color: currentColor;
|
|
423
|
+
-webkit-mask: var(--base-icon-chevron, #{$base-icon-chevron}) center / 1.2rem no-repeat;
|
|
424
|
+
mask: var(--base-icon-chevron, #{$base-icon-chevron}) center / 1.2rem no-repeat;
|
|
410
425
|
|
|
411
426
|
body.loaded & {
|
|
412
427
|
transition: transform $transition-fast $easing-snappy;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
// @keenmate/pure-css — component reset (the Shadow-DOM counterpart to "reboot")
|
|
2
|
+
// ============================================================================
|
|
3
|
+
// reboot.scss normalises a whole DOCUMENT: it anchors on `html` (the 10px rem
|
|
4
|
+
// base), `body` (font / colour / line-height) and bare element selectors. NONE
|
|
5
|
+
// of that reaches inside a Shadow-DOM web component — there is no `html`/`body`
|
|
6
|
+
// in a shadow root, and the shadow boundary blocks selector-based styling.
|
|
7
|
+
//
|
|
8
|
+
// What the boundary does NOT block is inheritance: `font-family`, `line-height`,
|
|
9
|
+
// `letter-spacing`, `color`, `text-transform`, … inherit from the host page
|
|
10
|
+
// straight through into the component's shadow tree. This layer is the piece a
|
|
11
|
+
// component adopts INTO its own shadow root (import with `?inline`, wrap in a
|
|
12
|
+
// constructable stylesheet / Lit `css`) to:
|
|
13
|
+
// 1. normalise box-sizing, and
|
|
14
|
+
// 2. pin the inherited typography on `:host`, so an arbitrary host page can't
|
|
15
|
+
// bleed its font / spacing / colour into the component.
|
|
16
|
+
//
|
|
17
|
+
// It deliberately does NOT restyle p / ul / table / … — a component owns its own
|
|
18
|
+
// content styling; this only neutralises what crosses the boundary. Pair it with
|
|
19
|
+
// `base` (the --base-* token layer) which the tokens below resolve against.
|
|
20
|
+
//
|
|
21
|
+
// It sets NO `rem` base on purpose: `rem` is always root-relative (resolved
|
|
22
|
+
// against the document `<html>`, never the shadow host), so a component that must
|
|
23
|
+
// be independent of the host's root font-size should scale off its own token
|
|
24
|
+
// (e.g. --cm-rem in campaign-modal-lit), not `rem`.
|
|
25
|
+
// ============================================================================
|
|
26
|
+
|
|
27
|
+
@use 'variables/index' as *;
|
|
28
|
+
|
|
29
|
+
:host {
|
|
30
|
+
box-sizing: border-box;
|
|
31
|
+
|
|
32
|
+
// Inherited properties that would otherwise cross the shadow boundary from the host
|
|
33
|
+
// page. Each is pinned to its initial/neutral value (or the foundation token), so the
|
|
34
|
+
// component starts from a known baseline no matter what the host set on <body>.
|
|
35
|
+
color: var(--base-text-color-1);
|
|
36
|
+
font-family: var(--base-font-family);
|
|
37
|
+
font-size: medium; // host-independent 16px baseline; components set their own scale
|
|
38
|
+
font-style: normal;
|
|
39
|
+
font-weight: normal;
|
|
40
|
+
font-variant: normal;
|
|
41
|
+
line-height: $line-height-base;
|
|
42
|
+
letter-spacing: normal;
|
|
43
|
+
word-spacing: normal;
|
|
44
|
+
text-align: start;
|
|
45
|
+
text-indent: 0;
|
|
46
|
+
text-transform: none;
|
|
47
|
+
text-shadow: none;
|
|
48
|
+
white-space: normal;
|
|
49
|
+
word-break: normal;
|
|
50
|
+
overflow-wrap: normal;
|
|
51
|
+
writing-mode: horizontal-tb; // a host's vertical writing-mode would wreck the layout
|
|
52
|
+
accent-color: auto; // don't let the host tint the component's checkboxes / radios
|
|
53
|
+
|
|
54
|
+
// Deliberately LEFT inheriting from the host (resetting them would do harm):
|
|
55
|
+
// direction — respect the host's locale / RTL
|
|
56
|
+
// color-scheme — components' light-dark() tokens key off it (dark-mode support)
|
|
57
|
+
// And NOT pinned here because a component owns them as content styling, not chrome:
|
|
58
|
+
// list-style, tab-size, quotes, cursor, hyphens, caret-color, font-stretch
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
*,
|
|
62
|
+
*::before,
|
|
63
|
+
*::after {
|
|
64
|
+
box-sizing: inherit;
|
|
65
|
+
}
|