Skip to content

Commit a628c8a

Browse files
committed
Add indeterminate-state in sass
1 parent cbb364a commit a628c8a

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

awesome-bootstrap-checkbox.scss

+32
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,20 @@ $check-icon: $fa-var-check !default;
2020
}
2121
}
2222

23+
@mixin checkbox-variant-indeterminate($parent, $color) {
24+
#{$parent} input[type="checkbox"]:indeterminate + label,
25+
#{$parent} input[type="radio"]:indeterminate + label {
26+
&::before {
27+
background-color: $color;
28+
border-color: $color;
29+
}
30+
&::after{
31+
background-color: #fff;
32+
}
33+
}
34+
}
35+
36+
2337

2438
.checkbox{
2539
padding-left: 20px;
@@ -73,6 +87,17 @@ $check-icon: $fa-var-check !default;
7387
content: $check-icon;
7488
}
7589

90+
&:indeterminate + label::after{
91+
display: block;
92+
content: "";
93+
width: 10px;
94+
height: 3px;
95+
background-color: #555555;
96+
border-radius: 2px;
97+
margin-left: -16.5px;
98+
margin-top: 7px;
99+
}
100+
76101
&:disabled + label{
77102
opacity: 0.65;
78103

@@ -99,6 +124,13 @@ $check-icon: $fa-var-check !default;
99124
@include checkbox-variant('.checkbox-warning', $brand-warning);
100125
@include checkbox-variant('.checkbox-success', $brand-success);
101126

127+
128+
@include checkbox-variant-indeterminate('.checkbox-primary', $brand-primary);
129+
@include checkbox-variant-indeterminate('.checkbox-danger', $brand-danger);
130+
@include checkbox-variant-indeterminate('.checkbox-info', $brand-info);
131+
@include checkbox-variant-indeterminate('.checkbox-warning', $brand-warning);
132+
@include checkbox-variant-indeterminate('.checkbox-success', $brand-success);
133+
102134
//
103135
// Radios
104136
// --------------------------------------------------

0 commit comments

Comments
 (0)