Skip to content

Commit 8d09187

Browse files
didimmovasimeonoff
andauthored
fix(chips): update chip padding to contain text padding (#17187)
* fix(chips): update chip padding to contain text padding * fix(chip): indigo padding * fix(chips): apply fixes on paddings * fix(chips): fix start/end gaps * spec(filtering-row): change view expectation Chips are now wider (have bigger padding on both sides), hence fewer chips are visible in the tests compared to before. * lint(themes): fix chip linting errors --------- Co-authored-by: Simeon Simeonoff <sim.simeonoff@gmail.com>
1 parent bc46392 commit 8d09187

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

projects/igniteui-angular/core/src/core/styles/components/chip/_chip-theme.scss

Lines changed: 6 additions & 2 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 '../../base' as *;
34
@use 'igniteui-theming/sass/animations/easings' as *;
@@ -115,7 +116,6 @@
115116
)
116117
);
117118

118-
gap: sizable(rem(3px), rem(6px), rem(8px));
119119
color: var-get($theme, 'text-color');
120120
background: var-get($theme, 'background');
121121
border: $border-size solid var-get($theme, 'border-color');
@@ -410,6 +410,8 @@
410410
}
411411

412412
%igx-chip__start {
413+
gap: sizable(rem(3px), rem(6px), rem(8px));
414+
413415
> igx-avatar,
414416
> igx-circular-bar {
415417
&:first-child {
@@ -437,6 +439,8 @@
437439
}
438440

439441
%igx-chip__end {
442+
gap: sizable(rem(3px), rem(6px), rem(8px));
443+
440444
> igx-avatar,
441445
> igx-circular-bar {
442446
&:last-child {
@@ -490,6 +494,7 @@
490494
%igx-chip__content {
491495
@include ellipsis();
492496

497+
padding-inline: pad-inline(rem(3px), rem(6px), rem(8px));
493498
max-width: $chip-max-width;
494499

495500
&:empty {
@@ -578,7 +583,6 @@
578583

579584
&%igx-chip--primary {
580585
%igx-chip__item {
581-
/* stylelint-disable max-nesting-depth */
582586
@if $theme-variant == 'light' {
583587
color: contrast-color($color: 'primary', $variant: 900, $opacity: .4);
584588
} @else {

projects/igniteui-angular/grids/grid/src/grid-filtering-ui.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1995,7 +1995,8 @@ describe('IgxGrid - Filtering Row UI actions #grid', () => {
19951995
GridFunctions.clickFilterCellChip(fix, 'ProductName');
19961996
await wait(300);
19971997

1998-
verifyMultipleChipsVisibility(fix, [true, true, false, false]);
1998+
// NOTE: This test is very sensitive to the width of the grid and the chips.
1999+
verifyMultipleChipsVisibility(fix, [true, false, false, false]);
19992000

20002001
const filterUIRow = fix.debugElement.query(By.css(FILTER_UI_ROW));
20012002
GridFunctions.removeFilterChipByIndex(1, filterUIRow);

0 commit comments

Comments
 (0)