File tree 3 files changed +18
-7
lines changed
js/ext/angular/src/directive
3 files changed +18
-7
lines changed Original file line number Diff line number Diff line change @@ -34,8 +34,9 @@ angular.module('ionic.ui.checkbox', [])
34
34
transclude : true ,
35
35
36
36
template : '<label class="item item-checkbox">' +
37
- '<div class="checkbox">' +
37
+ '<div class="checkbox checkbox-input-hidden ">' +
38
38
'<input type="checkbox" ng-model="ngModel" ng-value="ngValue" ng-change="ngChange()">' +
39
+ '<div class="checkbox-handle"></div>' +
39
40
'</div>' +
40
41
'<div class="item-content disable-pointer-events" ng-transclude></div>' +
41
42
'</label>' ,
Original file line number Diff line number Diff line change 42
42
}
43
43
}
44
44
45
- .checkbox input {
45
+ .checkbox-input-hidden input {
46
+ display : none ;
47
+ }
48
+
49
+ .checkbox input ,
50
+ .checkbox .checkbox-handle {
46
51
position : relative ;
47
52
width : $checkbox-width ;
48
53
height : $checkbox-height ;
64
69
}
65
70
66
71
/* the checkmark within the box */
67
- .checkbox input :after {
72
+ .checkbox input :after ,
73
+ .checkbox .checkbox-handle :after {
68
74
@include transition (opacity .05s ease-in-out );
69
75
@include rotate (-45deg );
70
76
position : absolute ;
80
86
opacity : 0 ;
81
87
}
82
88
83
- .grade-c .checkbox input :after {
89
+ .grade-c .checkbox input :after ,
90
+ .grade-c .checkbox .checkbox-handle :after {
84
91
@include rotate (0 );
85
92
top : 3px ;
86
93
left : 4px ;
92
99
}
93
100
94
101
/* what the checkmark looks like when its checked */
95
- .checkbox input :checked :after {
102
+ .checkbox input :checked :after ,
103
+ .checkbox input :checked + .checkbox-handle :after {
96
104
opacity : 1 ;
97
105
}
98
106
Original file line number Diff line number Diff line change 126
126
// --------------------------------------------------
127
127
128
128
@mixin checkbox-style ($off-border-color , $on-bg-color ) {
129
- & input :before {
129
+ & input :before ,
130
+ & .checkbox-handle :before {
130
131
border : $checkbox-border-width solid $off-border-color ;
131
132
}
132
133
133
134
// what the background looks like when its checked
134
- & input :checked :before {
135
+ & input :checked :before ,
136
+ & input :checked + .checkbox-handle :before {
135
137
background : $on-bg-color ;
136
138
}
137
139
}
You can’t perform that action at this time.
0 commit comments