Skip to content

Commit 9f52ac1

Browse files
authored
fix(checkbox): size and transitions (#14860)
1 parent f93c5c6 commit 9f52ac1

File tree

7 files changed

+95
-4
lines changed

7 files changed

+95
-4
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@
137137
), $variant);
138138

139139
$label-margin: map.get((
140-
'material': rem(12px),
140+
'material': rem(2px),
141141
'fluent': rem(8px),
142142
'bootstrap': rem(8px),
143143
'indigo': rem(8px),
@@ -191,6 +191,10 @@
191191
width: $size;
192192
height: $size;
193193

194+
@if $variant == 'material' {
195+
padding: rem(20px);
196+
}
197+
194198
//ripple color
195199
--color: #{var-get($theme, 'empty-color')};
196200
}
@@ -298,7 +302,6 @@
298302
fill: none;
299303
opacity: 0;
300304
z-index: 1;
301-
transition: opacity .1s $ease-out-quad;
302305

303306
@if $variant == 'material' {
304307
inset-inline-start: -.5px;

projects/igniteui-angular/src/lib/core/styles/components/column-actions/_column-actions-theme.scss

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
}
4040

4141
$theme: digest-schema($column-actions-schema);
42+
$meta: map.get($theme, '_meta');
4243

4344
@if not($title-color) and $background-color {
4445
$title-color: text-contrast($background-color);
@@ -48,7 +49,10 @@
4849
name: $name,
4950
elevations: $elevations,
5051
title-color: $title-color,
51-
background-color: $background-color
52+
background-color: $background-color,
53+
_meta: map.merge(if($meta, $meta, ()), (
54+
variant: map.get($schema, '_meta', 'theme'),
55+
)),
5256
));
5357
}
5458

@@ -57,6 +61,7 @@
5761
/// @param {Map} $theme - The theme used to style the component.
5862
@mixin column-actions($theme) {
5963
@include css-vars($theme);
64+
$variant: map.get($theme, '_meta', 'variant');
6065

6166
%column-actions-display {
6267
display: flex;
@@ -66,6 +71,27 @@
6671
width: 100%;
6772
flex: 1 1 auto;
6873
min-width: rem(180px);
74+
75+
@if $variant == 'material' {
76+
%cbx-composite-wrapper {
77+
padding: 0;
78+
}
79+
80+
%cbx-label-pos--after {
81+
margin-inline-start: rem(12px);
82+
}
83+
84+
%cbx-label-pos--before {
85+
margin-inline-end: rem(12px);
86+
}
87+
88+
%cbx-label-pos--before,
89+
%cbx-label-pos--after {
90+
&:empty {
91+
margin: 0;
92+
}
93+
}
94+
}
6995
}
7096

7197
%column-actions-title {

projects/igniteui-angular/src/lib/core/styles/components/combo/_combo-theme.scss

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,15 @@
100100
}
101101

102102
%igx-combo__checkbox {
103-
margin-inline-end: rem(8);
103+
margin-inline-end: rem(8px);
104+
105+
@if $variant == 'material' {
106+
margin-inline-end: rem(16px);
107+
108+
div {
109+
padding: 0;
110+
}
111+
}
104112
}
105113

106114
%igx-combo__drop-down {

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

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1068,6 +1068,27 @@
10681068

10691069
%cbx-display {
10701070
min-width: $cbx-size;
1071+
1072+
@if $variant == 'material' {
1073+
%cbx-composite-wrapper {
1074+
padding: 0;
1075+
}
1076+
1077+
%cbx-label-pos--after {
1078+
margin-inline-start: rem(12px);
1079+
}
1080+
1081+
%cbx-label-pos--before {
1082+
margin-inline-end: rem(12px);
1083+
}
1084+
1085+
%cbx-label-pos--before,
1086+
%cbx-label-pos--after {
1087+
&:empty {
1088+
margin: 0;
1089+
}
1090+
}
1091+
}
10711092
}
10721093
}
10731094

projects/igniteui-angular/src/lib/core/styles/components/grid/_pivot-data-selector-theme.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,12 @@
8282
}
8383
}
8484

85+
%cbx-composite-wrapper {
86+
@if $variant == 'material' {
87+
padding: 0;
88+
}
89+
}
90+
8591
%form-group-input--box {
8692
transform: none;
8793
}

projects/igniteui-angular/src/lib/core/styles/components/list/_list-theme.scss

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,27 @@
336336
igx-avatar {
337337
--ig-size: #{if($variant == 'indigo', 2, 1)};
338338
}
339+
340+
@if $variant == 'material' {
341+
%cbx-composite-wrapper {
342+
padding: 0;
343+
}
344+
345+
%cbx-label-pos--after {
346+
margin-inline-start: rem(12px);
347+
}
348+
349+
%cbx-label-pos--before {
350+
margin-inline-end: rem(12px);
351+
}
352+
353+
%cbx-label-pos--before,
354+
%cbx-label-pos--after {
355+
&:empty {
356+
margin: 0;
357+
}
358+
}
359+
}
339360
}
340361

341362
%igx-list--empty {

projects/igniteui-angular/src/lib/core/styles/components/tree/_tree-theme.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,12 @@
186186
--tree-size: var(--component-size);
187187
flex-direction: column;
188188

189+
%cbx-composite-wrapper {
190+
@if $variant == 'material' {
191+
padding: 0;
192+
}
193+
}
194+
189195
@if $variant == 'indigo' {
190196
border-radius: rem(4px);
191197
}

0 commit comments

Comments
 (0)