mirror of
https://github.com/tabler/tabler.git
synced 2026-10-12 05:06:55 +04:00
Fix dangling --tblr-*-text tokens and raise the tabler-props.min.css size budget
Emit `--{color}-text` only for theme and palette colors, use the plain color for social buttons and `.bg-white-lt`, and raise the `tabler-props.min.css` limit from 3.7 kB to 3.8 kB for the new tokens.
This commit is contained in:
1 parent
1d9d9af77b
commit
809eb331a3
4 files changed
+7
-5
No files matched your search
+2
-2
@@ -152,7 +152,7 @@
|
||||
},
|
||||
{
|
||||
"path": "./dist/css/tabler-props.min.css",
|
||||
"maxSize": "3.7 kB"
|
||||
"maxSize": "3.8 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/css/tabler-props.rtl.css",
|
||||
@@ -160,7 +160,7 @@
|
||||
},
|
||||
{
|
||||
"path": "./dist/css/tabler-props.rtl.min.css",
|
||||
"maxSize": "3.7 kB"
|
||||
"maxSize": "3.8 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/css/tabler-socials.css",
|
||||
|
||||
@@ -45,7 +45,9 @@
|
||||
@each $name, $color in map.merge($theme-colors, $social-colors) {
|
||||
--#{$name}: #{$color};
|
||||
--#{$name}-fg: #{if(sass(contrast-ratio($color) >= $min-contrast-ratio): var(--light); else: var(--dark))};
|
||||
--#{$name}-text: #{if(sass($name == 'light'): $color; else: text-color-on($color, $text-surface, $text-min-contrast-ratio))};
|
||||
@if not map.has-key($social-colors, $name) {
|
||||
--#{$name}-text: #{if(sass($name == 'light'): $color; else: text-color-on($color, $text-surface, $text-min-contrast-ratio))};
|
||||
}
|
||||
--#{$name}-darken: #{adjust-lightness-css(var(--#{$name}), -6%)};
|
||||
--#{$name}-lt: color-mix(in oklab, var(--#{$name}) 10%, transparent);
|
||||
--#{$name}-200: color-mix(in oklab, var(--#{$name}) 20%, transparent);
|
||||
|
||||
@@ -116,7 +116,7 @@ $btn-colors: map.keys(map.merge($theme-colors, $social-colors));
|
||||
.btn-ghost-#{$color} {
|
||||
--btn-variant: var(--#{$color});
|
||||
--btn-variant-fg: var(--#{$color}-fg);
|
||||
--btn-variant-text: var(--#{$color}-text);
|
||||
--btn-variant-text: var(--#{$color}#{if(sass(map.has-key($social-colors, $color)): ''; else: '-text')});
|
||||
--btn-variant-darken: var(--#{$color}-darken);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
}
|
||||
|
||||
.bg-#{'' + $color}-lt {
|
||||
color: color-transparent(var(--#{$color}-text), calc(var(--text-opacity, 1) * 100%)) !important;
|
||||
color: color-transparent(var(--#{$color}#{if(sass('#{$color}' == 'white'): ''; else: '-text')}), calc(var(--text-opacity, 1) * 100%)) !important;
|
||||
background-color: color-transparent(var(--#{$color}-lt), calc(var(--bg-opacity, 1) * 100%)) !important;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user