@smwb/ui-styles 2.0.0 → 2.1.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.
|
@@ -51,6 +51,14 @@
|
|
|
51
51
|
background-color: var(--smui-primaryColor);
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
+
&_warning {
|
|
55
|
+
background-color: var(--smui-warningColor);
|
|
56
|
+
// The amber fill is too light for the white the other colors use; see
|
|
57
|
+
// @badgeWarningColor. An app that retunes --smui-warningColor at runtime
|
|
58
|
+
// retunes this ink to match, through --smui-badgeWarningColor.
|
|
59
|
+
color: var(--smui-badgeWarningColor, @badgeWarningColor);
|
|
60
|
+
}
|
|
61
|
+
|
|
54
62
|
&_no-content {
|
|
55
63
|
padding: 0;
|
|
56
64
|
width: 8px;
|
|
@@ -200,9 +200,13 @@
|
|
|
200
200
|
}
|
|
201
201
|
}
|
|
202
202
|
|
|
203
|
-
// Compact tabs (Tabs dense): labels as written — no capitals, no letter spacing —
|
|
204
|
-
// and less padding, so more tabs fit in a row.
|
|
203
|
+
// Compact tabs (Tabs dense): a shorter row, labels as written — no capitals, no letter spacing —
|
|
204
|
+
// and less padding, so more tabs fit in a row. The height is a token, not a literal, and min-height
|
|
205
|
+
// alone holds the row: the tab is a flex container and its label sets its own line box, so the plain
|
|
206
|
+
// tab's line-height already fits it. A dense row keeps its scroll buttons, its indicator and a
|
|
207
|
+
// closable tab's controls inside that height.
|
|
205
208
|
.smwb-tabs--dense .smwb-tab {
|
|
209
|
+
min-height: var(--smui-tabDenseHeight, @tabDenseHeight);
|
|
206
210
|
padding: 0 @tabDensePaddingX;
|
|
207
211
|
font-weight: 500;
|
|
208
212
|
letter-spacing: normal;
|
|
@@ -127,6 +127,10 @@
|
|
|
127
127
|
@appBarWindowControlsRight: 138px;
|
|
128
128
|
|
|
129
129
|
@badgePaddingX: 6px; // off-grid
|
|
130
|
+
// The `warning` badge fills with the theme's amber, which is light: white text on
|
|
131
|
+
// it measures 3.1:1, under the 4.5:1 WCAG AA needs at the badge's 12px label, so
|
|
132
|
+
// this one carries dark ink instead of @onWarningColor. 5.5:1 on @warningColor.
|
|
133
|
+
@badgeWarningColor: #1c1b1f;
|
|
130
134
|
|
|
131
135
|
@buttonGap: @smui-space-sm;
|
|
132
136
|
@buttonPaddingSmall: @smui-space-xs 10px; // 10 off-grid
|
|
@@ -256,6 +260,7 @@
|
|
|
256
260
|
@tabIconPaddingBottom: @smui-space-xs;
|
|
257
261
|
@tabLabelPaddingLeft: @smui-space-sm;
|
|
258
262
|
@tabDensePaddingX: @smui-space-md;
|
|
263
|
+
@tabDenseHeight: 36px; // off-grid; the row height of Tabs dense, the height of the compact onreel strips
|
|
259
264
|
@tabCloseSize: @smui-space-6; // the close button of a closable tab
|
|
260
265
|
@tabControlsGap: @smui-space-xs; // between a tab's close button, its actions and the row's next tab
|
|
261
266
|
@tabsFadeWidth: 2.5rem; // scrollable row: the fading edge beyond which tabs are hidden
|
package/less/variables.less
CHANGED
|
@@ -57,6 +57,10 @@
|
|
|
57
57
|
|
|
58
58
|
--smui-dividerColor: @dividerColor;
|
|
59
59
|
|
|
60
|
+
// Mode-independent (the amber is the same in dark), so light-only, like --smui-control-h-*:
|
|
61
|
+
// a dark-mixin copy would reset a consumer's :root override in dark mode.
|
|
62
|
+
--smui-badgeWarningColor: @badgeWarningColor;
|
|
63
|
+
|
|
60
64
|
--smui-buttonOutlinedHoverBg: @buttonOutlinedHoverBg;
|
|
61
65
|
--smui-buttonOutlinedActiveBg: @buttonOutlinedActiveBg;
|
|
62
66
|
--smui-buttonOutlinedFocusBg: @buttonOutlinedFocusBg;
|
|
@@ -88,6 +92,7 @@
|
|
|
88
92
|
|
|
89
93
|
--smui-tabIconColor: @tabIconColor;
|
|
90
94
|
--smui-tabColorDefault: @tabColorDefault;
|
|
95
|
+
--smui-tabDenseHeight: @tabDenseHeight;
|
|
91
96
|
|
|
92
97
|
--smui-sliderColor: @sliderColor;
|
|
93
98
|
--smui-sliderDisabledColor: @sliderDisabledColor;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smwb/ui-styles",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "Framework-agnostic LESS design tokens and component styles (smwb-*) shared by the @smwb UI libraries. Prebuilt aggregate CSS lives in @smwb/ui-css.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"sideEffects": [
|