Skip to content

Commit ac1ff16

Browse files
author
MPopov
committed
fix(grid): Fix flex child padding issue in IE11
Signed-off-by: MPopov <desig9stein@gmail.com>
1 parent ebd7315 commit ac1ff16

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@
8585

8686
@include scale-in-out($start-scale: .9);
8787

88+
// If updating the WIDTH of the checkbox here, please update it in the grid theme as well.
89+
// It is under the name of $cbx-size
8890
$size: em(20px);
8991
$checkbox-radius: $size / 2;
9092

projects/igniteui-angular/src/lib/core/styles/components/grid/_grid-theme.scss

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@
503503
@include igx-root-css-vars($theme);
504504

505505
$palette: map-get($theme, 'palette');
506-
506+
$cbx-size: rem(20px);
507507
$grid-shadow: --var($theme, 'grid-shadow');
508508

509509
$grid-caption-fs: rem(20px);
@@ -534,6 +534,16 @@
534534
compact: 0 rem(12px)
535535
);
536536

537+
$grid-cbx-padding: (
538+
comfortable: rem(24px),
539+
cosy: rem(16px),
540+
compact: rem(12px)
541+
);
542+
543+
$cbx-padding: map-get($grid-cbx-padding, 'comfortable');
544+
$cbx-padding-cosy: map-get($grid-cbx-padding, 'cosy');
545+
$cbx-padding-compact: map-get($grid-cbx-padding, 'compact');
546+
537547
$grid-header-height: (
538548
comfortable: rem(50px),
539549
cosy: rem(40px),
@@ -1390,15 +1400,16 @@
13901400
display: flex;
13911401
align-items: center;
13921402
justify-content: center;
1393-
padding: map-get($grid-header-padding, 'comfortable');
1403+
// The min-width here plays the role of padding because of IE11
1404+
min-width: calc(#{$cbx-size} + (#{$cbx-padding} * 2));
13941405
}
13951406

13961407
%cbx-padding--cosy {
1397-
padding: map-get($grid-header-padding, 'cosy');
1408+
min-width: calc(#{$cbx-size} + (#{$cbx-padding-cosy} * 2));
13981409
}
13991410

14001411
%cbx-padding--compact {
1401-
padding: map-get($grid-header-padding, 'compact');
1412+
min-width: calc(#{$cbx-size} + (#{$cbx-padding-compact} * 2));
14021413
}
14031414

14041415
%grid__resize-handle {

0 commit comments

Comments
 (0)