mirror of
https://github.com/material-components/material-web.git
synced 2024-08-17 09:30:27 +03:00
refactor(divider): reduce CSS size
Reduces the size by removing private (`--_*`) custom properties. These are not needed since the component does not share styles across variants. Size before: 523b / 308b gzip Size after: 469b (-10%) / 292b gzip (-5%) PiperOrigin-RevId: 600904594
This commit is contained in:
parent
a3b2be80fb
commit
7f6dda58b5
@ -5,6 +5,7 @@
|
||||
|
||||
// go/keep-sorted start
|
||||
@use 'sass:list';
|
||||
@use 'sass:map';
|
||||
// go/keep-sorted end
|
||||
// go/keep-sorted start
|
||||
@use '../../tokens';
|
||||
@ -26,16 +27,15 @@
|
||||
|
||||
@mixin styles() {
|
||||
$tokens: tokens.md-comp-divider-values();
|
||||
@each $token, $value in $tokens {
|
||||
$tokens: map.set($tokens, $token, var(--md-divider-#{$token}, #{$value}));
|
||||
}
|
||||
|
||||
:host {
|
||||
@each $token, $value in $tokens {
|
||||
--_#{$token}: var(--md-divider-#{$token}, #{$value});
|
||||
}
|
||||
|
||||
box-sizing: border-box;
|
||||
color: var(--_color);
|
||||
color: map.get($tokens, 'color');
|
||||
display: flex;
|
||||
height: var(--_thickness);
|
||||
height: map.get($tokens, 'thickness');
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user