Skip to content

Commit 2c72c6e

Browse files
author
Alyssa
committed
fix(checkbox): fixed disable colors
1 parent 4719c8f commit 2c72c6e

File tree

1 file changed

+22
-23
lines changed

1 file changed

+22
-23
lines changed

src/elements/checkbox/_checkbox.scss

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
.#{$prefix}checkbox {
1212
.#{$prefix}checkbox__label {
1313
cursor: pointer;
14+
color: get('colors.gray.grayDark.hex');
1415
line-height: $base;
1516
position: relative;
1617
display: inline-block;
@@ -36,46 +37,44 @@
3637
width: ($boxSize) + $borderWidth * 2;
3738
height: ($boxSize) + $borderWidth * 2;
3839
margin: -$borderWidth;
39-
border: 2px solid get('colors.gray.gray.hex');
40+
border: 2px solid get('colors.gray.grayDark.hex');
4041
border-radius: 0;
4142
}
4243
}
4344

4445
/* hide the input element */
4546
.#{$prefix}checkbox__input {
4647
opacity: 0;
47-
&:disabled + .#{$prefix}checkbox__label:before {
48-
cursor: not-allowed;
49-
background: get('colors.gray.grayLighter.hex');
50-
border: 2px solid get('colors.gray.gray.hex');
51-
}
5248
&:disabled + .#{$prefix}checkbox__label {
5349
cursor: not-allowed;
50+
color: get('colors.gray.textGray.hex');
5451
}
55-
&:checked + .#{$prefix}checkbox__label:before {
56-
font-family: zepicons;
57-
content: '\f112';
58-
//content: '\2713';
59-
display: inline-block;
60-
background: get('colors.gray.white.hex');
61-
line-height: $boxSize + $borderWidth;
62-
font-size: 1.125rem;
63-
text-align: center;
64-
transform: scale(1);
65-
@include themify($themes) {
52+
&:disabled + .#{$prefix}checkbox__label:before {
53+
border: 2px solid get('colors.gray.grayLight.hex');
54+
}
55+
56+
@include themify($themes) {
57+
&:checked + .#{$prefix}checkbox__label:before {
58+
font-family: zepicons;
59+
content: '\f112';
60+
display: inline-block;
61+
background: get('colors.gray.white.hex');
62+
line-height: $boxSize + $borderWidth;
63+
font-size: 1.125rem;
64+
text-align: center;
65+
transform: scale(1);
6666
color: themed('primary');
6767
}
68-
}
69-
&:checked:focus + .#{$prefix}checkbox__label:before {
70-
@include themify($themes) {
68+
&:checked:focus + .#{$prefix}checkbox__label:before {
7169
box-shadow: 0 0 5px 1px themed('primary');
7270
background: get('colors.gray.white.hex');
7371
}
74-
}
75-
&:active + .#{$prefix}checkbox__label:before {
76-
@include themify($themes) {
72+
&:active + .#{$prefix}checkbox__label:before {
7773
background: themed('hover');
7874
}
75+
&:disabled:active + .#{$prefix}checkbox__label:before {
76+
background: get('colors.gray.white.hex');
77+
}
7978
}
8079
}
8180
}

0 commit comments

Comments
 (0)