Skip to content

Commit dfbb376

Browse files
committed
rename .checkbox-handle to .checkbox-icon
1 parent b0b446d commit dfbb376

File tree

3 files changed

+24
-16
lines changed

3 files changed

+24
-16
lines changed

Diff for: js/ext/angular/src/directive/ionicCheckbox.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ angular.module('ionic.ui.checkbox', [])
3434
transclude: true,
3535

3636
template: '<label class="item item-checkbox">' +
37-
'<div class="checkbox checkbox-input-hidden">' +
37+
'<div class="checkbox checkbox-input-hidden disable-pointer-events">' +
3838
'<input type="checkbox" ng-model="ngModel" ng-value="ngValue" ng-change="ngChange()">' +
39-
'<div class="checkbox-handle"></div>' +
39+
'<i class="checkbox-icon"></i>' +
4040
'</div>' +
4141
'<div class="item-content disable-pointer-events" ng-transclude></div>' +
4242
'</label>',

Diff for: scss/_checkbox.scss

+19-11
Original file line numberDiff line numberDiff line change
@@ -42,35 +42,43 @@
4242
}
4343
}
4444

45-
.checkbox-input-hidden input {
46-
display: none;
45+
.checkbox.checkbox-input-hidden input {
46+
display: none !important;
4747
}
4848

4949
.checkbox input,
50-
.checkbox .checkbox-handle {
50+
.checkbox-icon {
5151
position: relative;
5252
width: $checkbox-width;
5353
height: $checkbox-height;
54+
display: block;
5455
border: 0;
5556
background: transparent;
5657
cursor: pointer;
5758
-webkit-appearance: none;
5859

5960
&:before {
60-
/* what the checkbox looks like when its not checked */
61+
// what the checkbox looks like when its not checked
6162
display: table;
6263
width: 100%;
6364
height: 100%;
65+
border-width: $checkbox-border-width;
66+
border-style: solid;
6467
border-radius: $checkbox-border-radius;
6568
background: $checkbox-off-bg-color;
6669
content: ' ';
6770
transition: background-color .1s ease-in-out;
6871
}
6972
}
7073

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
7280
.checkbox input:after,
73-
.checkbox .checkbox-handle:after {
81+
.checkbox-icon:after {
7482
@include transition(opacity .05s ease-in-out);
7583
@include rotate(-45deg);
7684
position: absolute;
@@ -87,7 +95,7 @@
8795
}
8896

8997
.grade-c .checkbox input:after,
90-
.grade-c .checkbox .checkbox-handle:after {
98+
.grade-c .checkbox-icon:after {
9199
@include rotate(0);
92100
top: 3px;
93101
left: 4px;
@@ -98,13 +106,13 @@
98106
font-size: 20px;
99107
}
100108

101-
/* what the checkmark looks like when its checked */
109+
// what the checkmark looks like when its checked
102110
.checkbox input:checked:after,
103-
.checkbox input:checked + .checkbox-handle:after {
111+
input:checked + .checkbox-icon:after {
104112
opacity: 1;
105113
}
106114

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
108116
.item-checkbox {
109117
padding-left: ($item-padding * 2) + $checkbox-width;
110118

@@ -113,7 +121,7 @@
113121
}
114122
}
115123

116-
/* position the checkbox to the left within an item */
124+
// position the checkbox to the left within an item
117125
.item-checkbox .checkbox {
118126
position: absolute;
119127
top: 50%;

Diff for: scss/_mixins.scss

+3-3
Original file line numberDiff line numberDiff line change
@@ -127,13 +127,13 @@
127127

128128
@mixin checkbox-style($off-border-color, $on-bg-color) {
129129
& input:before,
130-
& .checkbox-handle:before {
131-
border: $checkbox-border-width solid $off-border-color;
130+
& .checkbox-icon:before {
131+
border-color: $off-border-color;
132132
}
133133

134134
// what the background looks like when its checked
135135
& input:checked:before,
136-
& input:checked + .checkbox-handle:before {
136+
& input:checked + .checkbox-icon:before {
137137
background: $on-bg-color;
138138
}
139139
}

0 commit comments

Comments
 (0)