Skip to content

Commit be590b9

Browse files
committed
refactor(chip): use spacing for margin and padding
1 parent e2abcbf commit be590b9

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

Diff for: projects/igniteui-angular/src/lib/core/styles/components/chip/_chip-theme.scss

+10-10
Original file line numberDiff line numberDiff line change
@@ -270,9 +270,9 @@
270270
), $variant);
271271

272272
$chip-padding: (
273-
comfortable: 0 rem(8px),
274-
cosy: 0 rem(4px),
275-
compact: 0 rem(2px)
273+
comfortable: 0 spacing(8px, 'comfortable'),
274+
cosy: 0 spacing(4px, 'cosy'),
275+
compact: 0 spacing(2px, 'compact')
276276
);
277277

278278
$box-shadow: map.get((
@@ -282,12 +282,12 @@
282282
indigo-design: null
283283
), $variant);
284284

285-
$item-padding: 4px;
286-
$chip-item-padding: 0 rem($item-padding);
285+
$item-padding: spacing(4px);
286+
$chip-item-padding: 0 $item-padding;
287287

288288
$chip-avatar-inset: map.get((
289289
material: 0,
290-
fluent: -$item-padding,
290+
fluent: calc($item-padding * -1),
291291
bootstrap: 0,
292292
indigo-design: 0
293293
), $variant);
@@ -415,14 +415,14 @@
415415
+ igx-suffix,
416416
+ [igxSuffix],
417417
+ %igx-chip__remove {
418-
margin-inline-start: rem(4px);
418+
margin-inline-start: spacing(4px);
419419
}
420420
}
421421

422422
%igx-chip__prefix {
423423
+ igx-prefix,
424424
+ [igxPrefix] {
425-
margin-inline-start: rem(4px);
425+
margin-inline-start: spacing(4px);
426426

427427
igx-avatar {
428428
max-height: 100%;
@@ -452,7 +452,7 @@
452452

453453
%igx-chip__remove {
454454
display: inline-flex;
455-
margin-inline-end: rem(4px);
455+
margin-inline-end: spacing(4px);
456456
color: var-get($theme, 'remove-icon-color', currentColor);
457457

458458
&:empty {
@@ -491,7 +491,7 @@
491491

492492
+ igx-prefix,
493493
+ [igxPrefix] {
494-
margin-inline-start: rem(4px);
494+
margin-inline-start: spacing(4px);
495495
}
496496
}
497497

0 commit comments

Comments
 (0)