Skip to content

Commit 34538c0

Browse files
committed
refactor(checkbox): remove redundant mark-stroke declaratioin
The $mark-stroke has been defined as tick-width as token in the Ignite UI Theming package, thus it's no longer needed.
1 parent 266c310 commit 34538c0

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

projects/igniteui-angular/src/lib/core/styles/components/checkbox/_checkbox-theme.scss

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* stylelint-disable max-nesting-depth */
12
@use 'sass:map';
23
@use 'sass:math';
34
@use '../../base' as *;
@@ -49,13 +50,6 @@
4950
'indigo': rem(8px),
5051
), $variant);
5152

52-
$mark-stroke: map.get((
53-
'material': 3,
54-
'fluent': 1.5,
55-
'bootstrap': 3,
56-
'indigo': 3,
57-
), $variant);
58-
5953
$mark-offset: map.get((
6054
'material': 0,
6155
'fluent': -1px,
@@ -64,7 +58,7 @@
6458
), $variant);
6559

6660
$mark-length: 24;
67-
$mark-x-factor: math.div($mark-stroke, $mark-length);
61+
$mark-x-factor: calc(#{var-get($theme, 'tick-width')} / $mark-length);
6862

6963
$ripple-size: rem(40px);
7064
$ripple-radius: math.div($ripple-size, 2);
@@ -366,7 +360,7 @@
366360
%cbx-composite-mark--in {
367361
stroke-dashoffset: 41; /* length of path - adjacent line length */
368362
opacity: 1;
369-
transform: rotate(45deg) translateX(-#{$mark-x-factor}em);
363+
transform: rotate(45deg) translateX(calc(#{$mark-x-factor} * -1em));
370364
}
371365

372366
%cbx-composite-mark--fluent {

0 commit comments

Comments
 (0)