Skip to content

Commit ea2f246

Browse files
Merge pull request #51 from CastleCSS/feature/#10_Checkboxes_and_radiobuttons_not_clickable_when_they_hold_a_for_attribute
Added :not(.input-control) selector to label[for] selectors.
2 parents bd5fa37 + 15e2a48 commit ea2f246

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

sass/component/label.scss

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@
5959
[class^="label-"],
6060
[class*=" label-"] {
6161
.input-combined {
62-
~ label[for] {
62+
~ label[for]:not(.input-control) {
6363
margin-left: $margin-default * 3;
6464
}
6565

6666
&.has-focus,
6767
&.has-value {
68-
label[for] {
68+
label[for]:not(.input-control) {
6969
margin-left: $margin-default * 3;
7070
}
7171

@@ -98,7 +98,7 @@
9898
&.label-top {
9999
.has-focus,
100100
.has-value {
101-
label[for] {
101+
label[for]:not(.input-control) {
102102
@extend %label-top;
103103
@extend %label-active-transition;
104104
}
@@ -116,7 +116,7 @@
116116
&.label-bottom {
117117
.has-focus,
118118
.has-value {
119-
label[for] {
119+
label[for]:not(.input-control) {
120120
@extend %label-bottom;
121121
@extend %label-active-transition;
122122
}
@@ -134,7 +134,7 @@
134134
&.label-above {
135135
.has-focus,
136136
.has-value {
137-
label[for] {
137+
label[for]:not(.input-control) {
138138
@extend %label-above;
139139
@extend %label-active-transition;
140140
}
@@ -152,20 +152,20 @@
152152
}
153153

154154
.form-field {
155-
label[for] {
155+
label[for]:not(.input-control) {
156156
@extend %label-default;
157157
}
158158

159159
&.has-value {
160-
label[for] {
160+
label[for]:not(.input-control) {
161161
@extend %label-active-static;
162162
}
163163
}
164164

165165
&.label-top {
166166
&.has-focus,
167167
&.has-value {
168-
> label[for] {
168+
> label[for]:not(.input-control) {
169169
@extend %label-top;
170170
@extend %label-active-transition;
171171
}
@@ -184,7 +184,7 @@
184184

185185
&.has-focus,
186186
&.has-value {
187-
> label[for] {
187+
> label[for]:not(.input-control) {
188188
@extend %label-bottom;
189189
@extend %label-active-transition;
190190
}
@@ -200,7 +200,7 @@
200200

201201
&.has-focus,
202202
&.has-value {
203-
> label[for] {
203+
> label[for]:not(.input-control) {
204204
@extend %label-above;
205205
@extend %label-active-transition;
206206
}

0 commit comments

Comments
 (0)