Skip to content

Commit d2d6344

Browse files
committed
fix(styling): increase checkbox tick width + other minor fixes
1 parent f78d25f commit d2d6344

5 files changed

Lines changed: 14 additions & 8 deletions

File tree

src/app/data-entries/checkbox/checkbox-styling/checkbox-styling.component.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
igx-checkbox {
77
--tick-color: #0064d9;
88
--tick-color-hover: #e3f0ff;
9+
--tick-width: 2;
910
--fill-color: transparent;
1011
--fill-color-hover: #e3f0ff;
1112
--label-color: #131e29;
@@ -21,6 +22,7 @@ igx-checkbox:hover {
2122

2223
// $custom-checkbox-theme: checkbox-theme(
2324
// $tick-color: #0064d9,
25+
// $tick-width: 2,
2426
// $tick-color-hover: #e3f0ff,
2527
// $fill-color: transparent,
2628
// $fill-color-hover: #e3f0ff,

src/app/data-entries/checkbox/checkbox-styling/layout.scss

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

4141
#checkbox-1.igx-checkbox--focused:after {
42-
inset: rem(8px) rem(-4px) rem(8px) rem(8px);
42+
inset: rem(7px) rem(-6px) rem(7px) rem(6px);
4343
border-radius: rem(8px);
44+
box-shadow: 0 0 0 rem(2px) var(--focus-outline-color);
4445
}

src/app/data-entries/radio/radio-styling-sample/layout.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
// Note: This is not the standard approach for styling the component.
1212
// We're using it here solely to mirror the UI5 sample.
13-
13+
1414
.igx-radio--checked .igx-radio__composite::after {
1515
--fill-color: #556b81;
1616
}
@@ -50,4 +50,5 @@ igx-radio {
5050
.igx-radio--focused::after {
5151
inset: rem(1px) rem(-4px) rem(1px) rem(-2px);
5252
border-radius: rem(8px);
53+
box-shadow: 0 0 0 rem(2px) var(--focus-outline-color);
5354
}

src/app/data-entries/switch/switch-styling/layout.scss

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
// Note: This is not the standard approach for styling the component.
1212
// We're using it here solely to mirror the UI5 sample.
13-
13+
1414
igx-switch:hover .igx-switch__thumb {
1515
--border-hover-color: #fff;
1616
}
@@ -40,6 +40,7 @@
4040

4141
.igx-switch--focused .igx-switch__composite::after {
4242
border-radius: 1rem;
43+
box-shadow: 0 0 0 rem(2px) var(--focus-outline-color);
4344
}
4445
}
4546
}
@@ -49,6 +50,10 @@ igx-switch {
4950
width: max-content;
5051
}
5152

53+
igx-switch:hover {
54+
--track-off-color: #637d97;
55+
}
56+
5257
.switch-wrapper {
5358
display: flex;
5459
flex-flow: column nowrap;

src/app/data-entries/switch/switch-styling/switch-styling.component.scss

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
igx-switch {
77
--thumb-on-color: #e3f0ff;
88
--thumb-off-color: #fff;
9+
--thumb-off-hover-color: #ededed;
910
--track-on-color: #0064d9;
1011
--track-off-color: #788fa6;
1112
--track-on-hover-color: #0058bf;
@@ -17,17 +18,14 @@ igx-switch {
1718
--border-hover-color: transparent;
1819
}
1920

20-
igx-switch:hover {
21-
--track-off-color: #637d97;
22-
}
23-
2421
// Sass theme approach
2522

2623
// $custom-switch-theme: switch-theme(
2724
// $thumb-on-color: #e3f0ff,
2825
// $track-on-color: #0064d9,
2926
// $track-on-hover-color: #0058bf,
3027
// $thumb-off-color: #fff,
28+
// $thumb-off-hover-color: #ededed,
3129
// $track-off-color: #788fa6,
3230
// $border-radius-track: 1rem,
3331
// $focus-outline-color: #0032a5,
@@ -38,4 +36,3 @@ igx-switch:hover {
3836
// );
3937

4038
// @include css-vars($custom-switch-theme)
41-

0 commit comments

Comments
 (0)