|
42 | 42 | }
|
43 | 43 | }
|
44 | 44 |
|
45 |
| -.checkbox-input-hidden input { |
46 |
| - display: none; |
| 45 | +.checkbox.checkbox-input-hidden input { |
| 46 | + display: none !important; |
47 | 47 | }
|
48 | 48 |
|
49 | 49 | .checkbox input,
|
50 |
| -.checkbox .checkbox-handle { |
| 50 | +.checkbox-icon { |
51 | 51 | position: relative;
|
52 | 52 | width: $checkbox-width;
|
53 | 53 | height: $checkbox-height;
|
| 54 | + display: block; |
54 | 55 | border: 0;
|
55 | 56 | background: transparent;
|
56 | 57 | cursor: pointer;
|
57 | 58 | -webkit-appearance: none;
|
58 | 59 |
|
59 | 60 | &:before {
|
60 |
| - /* what the checkbox looks like when its not checked */ |
| 61 | + // what the checkbox looks like when its not checked |
61 | 62 | display: table;
|
62 | 63 | width: 100%;
|
63 | 64 | height: 100%;
|
| 65 | + border-width: $checkbox-border-width; |
| 66 | + border-style: solid; |
64 | 67 | border-radius: $checkbox-border-radius;
|
65 | 68 | background: $checkbox-off-bg-color;
|
66 | 69 | content: ' ';
|
67 | 70 | transition: background-color .1s ease-in-out;
|
68 | 71 | }
|
69 | 72 | }
|
70 | 73 |
|
71 |
| -/* the checkmark within the box */ |
| 74 | +.checkbox input:checked:before, |
| 75 | +input:checked + .checkbox-icon:before { |
| 76 | + border-width: $checkbox-border-width + 1; |
| 77 | +} |
| 78 | + |
| 79 | +// the checkmark within the box |
72 | 80 | .checkbox input:after,
|
73 |
| -.checkbox .checkbox-handle:after { |
| 81 | +.checkbox-icon:after { |
74 | 82 | @include transition(opacity .05s ease-in-out);
|
75 | 83 | @include rotate(-45deg);
|
76 | 84 | position: absolute;
|
|
87 | 95 | }
|
88 | 96 |
|
89 | 97 | .grade-c .checkbox input:after,
|
90 |
| -.grade-c .checkbox .checkbox-handle:after { |
| 98 | +.grade-c .checkbox-icon:after { |
91 | 99 | @include rotate(0);
|
92 | 100 | top: 3px;
|
93 | 101 | left: 4px;
|
|
98 | 106 | font-size: 20px;
|
99 | 107 | }
|
100 | 108 |
|
101 |
| -/* what the checkmark looks like when its checked */ |
| 109 | +// what the checkmark looks like when its checked |
102 | 110 | .checkbox input:checked:after,
|
103 |
| -.checkbox input:checked + .checkbox-handle:after { |
| 111 | +input:checked + .checkbox-icon:after { |
104 | 112 | opacity: 1;
|
105 | 113 | }
|
106 | 114 |
|
107 |
| -/* make sure item content have enough padding on left to fit the checkbox */ |
| 115 | +// make sure item content have enough padding on left to fit the checkbox |
108 | 116 | .item-checkbox {
|
109 | 117 | padding-left: ($item-padding * 2) + $checkbox-width;
|
110 | 118 |
|
|
113 | 121 | }
|
114 | 122 | }
|
115 | 123 |
|
116 |
| -/* position the checkbox to the left within an item */ |
| 124 | +// position the checkbox to the left within an item |
117 | 125 | .item-checkbox .checkbox {
|
118 | 126 | position: absolute;
|
119 | 127 | top: 50%;
|
|
0 commit comments