Skip to content

Commit 1e3747d

Browse files
committed
Merge pull request #290 from tilomitra/261-fix
Separate out `:not()` selectors from CSS 2.1 selectors.
2 parents a6a38ca + 06fb6d6 commit 1e3747d

File tree

1 file changed

+46
-4
lines changed

1 file changed

+46
-4
lines changed

src/forms/css/forms.css

Lines changed: 46 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
.pure-form input:not([type]),
21
.pure-form input[type="text"],
32
.pure-form input[type="password"],
43
.pure-form input[type="email"],
@@ -26,7 +25,23 @@
2625
box-sizing: border-box;
2726
}
2827

29-
.pure-form input:not([type]):focus,
28+
/*
29+
Need to separate out the :not() selector from the rest of the CSS 2.1 selectors
30+
since IE8 won't execute CSS that contains a CSS3 selector.
31+
*/
32+
.pure-form input:not([type]) {
33+
padding: 0.5em 0.6em;
34+
display: inline-block;
35+
border: 1px solid #ccc;
36+
font-size: 0.8em;
37+
box-shadow: inset 0 1px 3px #ddd;
38+
border-radius: 4px;
39+
-webkit-box-sizing: border-box;
40+
-moz-box-sizing: border-box;
41+
box-sizing: border-box;
42+
}
43+
44+
3045
.pure-form input[type="text"]:focus,
3146
.pure-form input[type="password"]:focus,
3247
.pure-form input[type="email"]:focus,
@@ -48,6 +63,16 @@
4863
border-color: #129FEA;
4964
}
5065

66+
/*
67+
Need to separate out the :not() selector from the rest of the CSS 2.1 selectors
68+
since IE8 won't execute CSS that contains a CSS3 selector.
69+
*/
70+
.pure-form input:not([type]):focus {
71+
outline: 0;
72+
outline: thin dotted \9; /* IE6-9 */
73+
border-color: #129FEA;
74+
}
75+
5176
.pure-form input[type="file"]:focus,
5277
.pure-form input[type="radio"]:focus,
5378
.pure-form input[type="checkbox"]:focus {
@@ -59,7 +84,7 @@
5984
margin: 0.5em 0;
6085
display: block;
6186
}
62-
.pure-form input:not([type])[disabled],
87+
6388
.pure-form input[type="text"][disabled],
6489
.pure-form input[type="password"][disabled],
6590
.pure-form input[type="email"][disabled],
@@ -80,6 +105,16 @@
80105
background-color: #eaeded;
81106
color: #cad2d3;
82107
}
108+
109+
/*
110+
Need to separate out the :not() selector from the rest of the CSS 2.1 selectors
111+
since IE8 won't execute CSS that contains a CSS3 selector.
112+
*/
113+
.pure-form input:not([type])[disabled] {
114+
cursor: not-allowed;
115+
background-color: #eaeded;
116+
color: #cad2d3;
117+
}
83118
.pure-form input[readonly],
84119
.pure-form select[readonly],
85120
.pure-form textarea[readonly] {
@@ -130,7 +165,6 @@
130165
border-bottom: 1px solid #e5e5e5;
131166
}
132167

133-
.pure-form-stacked input:not([type]),
134168
.pure-form-stacked input[type="text"],
135169
.pure-form-stacked input[type="password"],
136170
.pure-form-stacked input[type="email"],
@@ -152,6 +186,14 @@
152186
margin: 0.25em 0;
153187
}
154188

189+
/*
190+
Need to separate out the :not() selector from the rest of the CSS 2.1 selectors
191+
since IE8 won't execute CSS that contains a CSS3 selector.
192+
*/
193+
.pure-form-stacked input:not([type]) {
194+
display: block;
195+
margin: 0.25em 0;
196+
}
155197
.pure-form-aligned input,
156198
.pure-form-aligned textarea,
157199
.pure-form-aligned select,

0 commit comments

Comments
 (0)