compass-h5bp 0.1.2 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.editorconfig +16 -0
- data/.gitignore +1 -0
- data/LICENSE +2 -0
- data/README.md +49 -53
- data/compass-h5bp.gemspec +15 -15
- data/config.rb +17 -0
- data/lib/compass-h5bp.rb +1 -1
- data/lib/compass/h5bp.rb +7 -3
- data/lib/compass/h5bp/version.rb +2 -2
- data/stylesheets/_h5bp.scss +22 -5
- data/stylesheets/h5bp/_browserupgrade.scss +9 -0
- data/stylesheets/h5bp/_errorpage.scss +45 -0
- data/stylesheets/h5bp/_helpers.scss +15 -52
- data/stylesheets/h5bp/_main.scss +15 -32
- data/stylesheets/h5bp/_media.scss +55 -54
- data/stylesheets/h5bp/_normalize.scss +184 -308
- data/test/compass_h5bp_test.rb +18 -13
- data/test/project/sass/original.scss +43 -65
- data/test/project/sass/original_normalize.scss +196 -302
- data/test/project/sass/test.scss +1 -0
- metadata +30 -31
- data/stylesheets/h5bp/_chromeframe.scss +0 -2
data/stylesheets/h5bp/_main.scss
CHANGED
@@ -1,34 +1,23 @@
|
|
1
|
-
$line-height: 1.4 !default;
|
2
1
|
$font-color: #222 !default;
|
3
|
-
$font-family: sans-serif !default;
|
4
2
|
$font-size: 1em !default;
|
5
|
-
$
|
3
|
+
$line-height: 1.4 !default;
|
6
4
|
$selected-background-color: #b3d4fc !default;
|
5
|
+
$hr-color: #ccc !default;
|
7
6
|
|
8
7
|
@mixin h5bp-main {
|
9
8
|
@include h5bp-base-styles;
|
10
|
-
@include h5bp-chromeframe;
|
11
9
|
}
|
12
10
|
|
13
|
-
//
|
14
11
|
// Base styles: opinionated defaults
|
15
|
-
//
|
16
12
|
@mixin h5bp-base-styles {
|
17
|
-
|
18
|
-
html,
|
19
|
-
button,
|
20
|
-
input,
|
21
|
-
select,
|
22
|
-
textarea {
|
13
|
+
html {
|
23
14
|
color: $font-color;
|
24
|
-
}
|
25
|
-
|
26
|
-
body {
|
27
15
|
font-size: $font-size;
|
28
16
|
line-height: $line-height;
|
29
17
|
}
|
30
18
|
|
31
|
-
// Remove text-shadow in selection highlight:
|
19
|
+
// Remove text-shadow in selection highlight:
|
20
|
+
// https://twitter.com/miketaylr/status/12228805301
|
32
21
|
// These selection rule sets have to be separate.
|
33
22
|
// Customize the background color to match your design.
|
34
23
|
::-moz-selection {
|
@@ -46,13 +35,20 @@ $selected-background-color: #b3d4fc !default;
|
|
46
35
|
display: block;
|
47
36
|
height: 1px;
|
48
37
|
border: 0;
|
49
|
-
border-top: 1px solid
|
38
|
+
border-top: 1px solid $hr-color;
|
50
39
|
margin: 1em 0;
|
51
40
|
padding: 0;
|
52
41
|
}
|
53
42
|
|
54
|
-
// Remove the gap between
|
55
|
-
|
43
|
+
// Remove the gap between audio, canvas, iframes,
|
44
|
+
// images, videos and the bottom of their containers:
|
45
|
+
// https://github.com/h5bp/html5-boilerplate/issues/440
|
46
|
+
audio,
|
47
|
+
canvas,
|
48
|
+
iframe,
|
49
|
+
img,
|
50
|
+
svg,
|
51
|
+
video {
|
56
52
|
vertical-align: middle;
|
57
53
|
}
|
58
54
|
|
@@ -68,16 +64,3 @@ $selected-background-color: #b3d4fc !default;
|
|
68
64
|
resize: vertical;
|
69
65
|
}
|
70
66
|
}
|
71
|
-
|
72
|
-
//
|
73
|
-
// Chrome Frame Prompt
|
74
|
-
//
|
75
|
-
|
76
|
-
@mixin h5bp-chromeframe {
|
77
|
-
.chromeframe {
|
78
|
-
margin: 0.2em 0;
|
79
|
-
background: #ccc;
|
80
|
-
color: #000;
|
81
|
-
padding: 0.2em 0;
|
82
|
-
}
|
83
|
-
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
// Print styles
|
2
|
-
// Inlined to avoid
|
3
|
-
|
2
|
+
// Inlined to avoid the additional HTTP request:
|
3
|
+
// http://www.phpied.com/delay-loading-your-print-css/
|
4
4
|
@mixin h5bp-media {
|
5
5
|
@media print {
|
6
6
|
@include h5bp-media-print;
|
@@ -8,68 +8,69 @@
|
|
8
8
|
}
|
9
9
|
|
10
10
|
@mixin h5bp-media-print {
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
11
|
+
@media print {
|
12
|
+
*,
|
13
|
+
*:before,
|
14
|
+
*:after {
|
15
|
+
background: transparent !important;
|
16
|
+
color: #000 !important; // Black prints faster:
|
17
|
+
// http://www.sanbeiji.com/archives/953
|
18
|
+
box-shadow: none !important;
|
19
|
+
text-shadow: none !important;
|
20
|
+
}
|
17
21
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
+
a,
|
23
|
+
a:visited {
|
24
|
+
text-decoration: underline;
|
25
|
+
}
|
22
26
|
|
23
|
-
|
24
|
-
|
25
|
-
|
27
|
+
a[href]:after {
|
28
|
+
content: " (" attr(href) ")";
|
29
|
+
}
|
26
30
|
|
27
|
-
|
28
|
-
|
29
|
-
|
31
|
+
abbr[title]:after {
|
32
|
+
content: " (" attr(title) ")";
|
33
|
+
}
|
30
34
|
|
31
|
-
|
32
|
-
|
33
|
-
|
35
|
+
// Don't show links that are fragment identifiers,
|
36
|
+
// or use the `javascript:` pseudo protocol
|
37
|
+
a[href^="#"]:after,
|
38
|
+
a[href^="javascript:"]:after {
|
39
|
+
content: "";
|
40
|
+
}
|
34
41
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
42
|
+
pre,
|
43
|
+
blockquote {
|
44
|
+
border: 1px solid #999;
|
45
|
+
page-break-inside: avoid;
|
46
|
+
}
|
40
47
|
|
41
|
-
|
42
|
-
|
43
|
-
border: 1px solid #999;
|
44
|
-
page-break-inside: avoid;
|
45
|
-
}
|
48
|
+
// Printing Tables:
|
49
|
+
// http://css-discuss.incutio.com/wiki/Printing_Tables
|
46
50
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
tr,
|
52
|
-
img {
|
53
|
-
page-break-inside: avoid;
|
54
|
-
}
|
51
|
+
thead {
|
52
|
+
display: table-header-group;
|
53
|
+
}
|
55
54
|
|
56
|
-
|
57
|
-
|
58
|
-
|
55
|
+
tr,
|
56
|
+
img {
|
57
|
+
page-break-inside: avoid;
|
58
|
+
}
|
59
59
|
|
60
|
-
|
61
|
-
|
62
|
-
|
60
|
+
img {
|
61
|
+
max-width: 100% !important;
|
62
|
+
}
|
63
63
|
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
64
|
+
p,
|
65
|
+
h2,
|
66
|
+
h3 {
|
67
|
+
orphans: 3;
|
68
|
+
widows: 3;
|
69
|
+
}
|
70
70
|
|
71
|
-
|
72
|
-
|
73
|
-
|
71
|
+
h2,
|
72
|
+
h3 {
|
73
|
+
page-break-after: avoid;
|
74
|
+
}
|
74
75
|
}
|
75
76
|
}
|
@@ -1,24 +1,38 @@
|
|
1
|
-
//
|
2
|
-
// Normalize v1.1.1 | MIT License | git.io/normalize
|
3
|
-
//
|
4
|
-
|
1
|
+
// normalize.css v3.0.2 | MIT License | git.io/normalize
|
5
2
|
@mixin h5bp-normalize {
|
6
|
-
@include
|
7
|
-
@include
|
8
|
-
@include
|
9
|
-
@include
|
10
|
-
@include
|
11
|
-
@include
|
12
|
-
@include
|
13
|
-
@include
|
14
|
-
@include h5bp-tables;
|
3
|
+
@include normalize-base;
|
4
|
+
@include normalize-display;
|
5
|
+
@include normalize-links;
|
6
|
+
@include normalize-semantics;
|
7
|
+
@include normalize-embedded;
|
8
|
+
@include normalize-grouping;
|
9
|
+
@include normalize-forms;
|
10
|
+
@include normalize-tables;
|
15
11
|
}
|
16
12
|
|
13
|
+
// Base
|
14
|
+
@mixin normalize-base {
|
15
|
+
// 1. Set default font family to sans-serif.
|
16
|
+
// 2. Prevent iOS text size adjust after orientation change, without
|
17
|
+
// disabling user zoom.
|
18
|
+
html {
|
19
|
+
font-family: sans-serif; // 1
|
20
|
+
-ms-text-size-adjust: 100%; // 2
|
21
|
+
-webkit-text-size-adjust: 100%; // 2
|
22
|
+
}
|
23
|
+
// Remove default margin.
|
24
|
+
body {
|
25
|
+
margin: 0;
|
26
|
+
}
|
17
27
|
|
18
|
-
|
19
|
-
@mixin h5bp-display {
|
28
|
+
}
|
20
29
|
|
21
|
-
|
30
|
+
// HTML5 display definitions
|
31
|
+
@mixin normalize-display {
|
32
|
+
// Correct `block` display not defined for any HTML5 element in IE 8/9.
|
33
|
+
// Correct `block` display not defined for `details` or `summary` in IE 10/11
|
34
|
+
// and Firefox.
|
35
|
+
// Correct `block` display not defined for `main` in IE 11.
|
22
36
|
article,
|
23
37
|
aside,
|
24
38
|
details,
|
@@ -28,422 +42,284 @@
|
|
28
42
|
header,
|
29
43
|
hgroup,
|
30
44
|
main,
|
45
|
+
menu,
|
31
46
|
nav,
|
32
47
|
section,
|
33
48
|
summary {
|
34
|
-
|
49
|
+
display: block;
|
35
50
|
}
|
36
51
|
|
37
|
-
// Correct `inline-block` display not defined in IE
|
52
|
+
// 1. Correct `inline-block` display not defined in IE 8/9.
|
53
|
+
// 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.
|
38
54
|
audio,
|
39
55
|
canvas,
|
56
|
+
progress,
|
40
57
|
video {
|
41
|
-
|
42
|
-
|
43
|
-
*zoom: 1;
|
58
|
+
display: inline-block; // 1
|
59
|
+
vertical-align: baseline; // 2
|
44
60
|
}
|
45
61
|
|
46
62
|
// Prevent modern browsers from displaying `audio` without controls.
|
47
63
|
// Remove excess height in iOS 5 devices.
|
48
64
|
audio:not([controls]) {
|
49
|
-
|
50
|
-
|
51
|
-
}
|
52
|
-
|
53
|
-
// Address styling not present in IE 7/8/9, Firefox 3, and Safari 4.
|
54
|
-
// Known issue: no IE 6 support.
|
55
|
-
[hidden] {
|
56
|
-
display: none;
|
57
|
-
}
|
58
|
-
|
59
|
-
}
|
60
|
-
|
61
|
-
|
62
|
-
// Base
|
63
|
-
@mixin h5bp-base {
|
64
|
-
|
65
|
-
// 1. Correct text resizing oddly in IE 6/7 when body `font-size` is set using
|
66
|
-
// `em` units.
|
67
|
-
// 2. Prevent iOS text size adjust after orientation change, without disabling
|
68
|
-
// user zoom.
|
69
|
-
// 1. Prevent system color scheme's background color being used in Firefox, IE,
|
70
|
-
// and Opera.
|
71
|
-
// 2. Prevent system color scheme's text color being used in Firefox, IE, and
|
72
|
-
// Opera.
|
73
|
-
// 3. Correct text resizing oddly in IE 6/7 when body `font-size` is set using
|
74
|
-
// `em` units.
|
75
|
-
// 4. Prevent iOS text size adjust after orientation change, without disabling
|
76
|
-
// user zoom.
|
77
|
-
html {
|
78
|
-
background: #fff; // 1
|
79
|
-
color: #000; // 2
|
80
|
-
font-size: 100%; // 3
|
81
|
-
-webkit-text-size-adjust: 100%; // 4
|
82
|
-
-ms-text-size-adjust: 100%; // 4
|
83
|
-
}
|
84
|
-
|
85
|
-
// Address `font-family` inconsistency between `textarea` and other form
|
86
|
-
// elements.
|
87
|
-
|
88
|
-
html,
|
89
|
-
button,
|
90
|
-
input,
|
91
|
-
select,
|
92
|
-
textarea {
|
93
|
-
font-family: sans-serif;
|
65
|
+
display: none;
|
66
|
+
height: 0;
|
94
67
|
}
|
95
68
|
|
96
|
-
// Address
|
97
|
-
|
98
|
-
|
99
|
-
|
69
|
+
// Address `[hidden]` styling not present in IE 8/9/10.
|
70
|
+
// Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22.
|
71
|
+
[hidden],
|
72
|
+
template {
|
73
|
+
display: none;
|
100
74
|
}
|
101
|
-
|
102
|
-
}
|
103
|
-
|
104
|
-
// Deprecation
|
105
|
-
@mixin h5bp-selection {
|
106
|
-
@warn "The selection mixin has been removed. The selection code is in the h5bp-base-styles mixin starting with Boilerplate version 4.0.";
|
107
75
|
}
|
108
76
|
|
109
77
|
// Links
|
110
|
-
@mixin
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
outline: thin dotted;
|
78
|
+
@mixin normalize-links {
|
79
|
+
// Remove the gray background color from active links in IE 10.
|
80
|
+
a {
|
81
|
+
background-color: transparent;
|
115
82
|
}
|
116
83
|
|
117
84
|
// Improve readability when focused and also mouse hovered in all browsers.
|
118
85
|
a:active,
|
119
86
|
a:hover {
|
120
|
-
|
87
|
+
outline: 0;
|
121
88
|
}
|
122
|
-
|
123
89
|
}
|
124
90
|
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
// Address font sizes and margins set differently in IE 6/7.
|
130
|
-
// Address font sizes within `section` and `article` in Firefox 4+, Safari 5,
|
131
|
-
// and Chrome.
|
132
|
-
h1 {
|
133
|
-
font-size: 2em;
|
134
|
-
margin: 0.67em 0;
|
135
|
-
}
|
136
|
-
|
137
|
-
h2 {
|
138
|
-
font-size: 1.5em;
|
139
|
-
margin: 0.83em 0;
|
140
|
-
}
|
141
|
-
|
142
|
-
h3 {
|
143
|
-
font-size: 1.17em;
|
144
|
-
margin: 1em 0;
|
145
|
-
}
|
146
|
-
|
147
|
-
h4 {
|
148
|
-
font-size: 1em;
|
149
|
-
margin: 1.33em 0;
|
150
|
-
}
|
151
|
-
|
152
|
-
h5 {
|
153
|
-
font-size: 0.83em;
|
154
|
-
margin: 1.67em 0;
|
155
|
-
}
|
156
|
-
|
157
|
-
h6 {
|
158
|
-
font-size: 0.67em;
|
159
|
-
margin: 2.33em 0;
|
160
|
-
}
|
161
|
-
|
162
|
-
// Address styling not present in IE 7/8/9, Safari 5, and Chrome.
|
91
|
+
// Text-level semantics
|
92
|
+
@mixin normalize-semantics {
|
93
|
+
// Address styling not present in IE 8/9/10/11, Safari, and Chrome.
|
163
94
|
abbr[title] {
|
164
|
-
|
95
|
+
border-bottom: 1px dotted;
|
165
96
|
}
|
166
97
|
|
167
|
-
// Address style set to `bolder` in Firefox
|
98
|
+
// Address style set to `bolder` in Firefox 4+, Safari, and Chrome.
|
168
99
|
b,
|
169
100
|
strong {
|
170
|
-
|
171
|
-
}
|
172
|
-
|
173
|
-
blockquote {
|
174
|
-
margin: 1em 40px;
|
101
|
+
font-weight: bold;
|
175
102
|
}
|
176
103
|
|
177
|
-
// Address styling not present in Safari
|
104
|
+
// Address styling not present in Safari and Chrome.
|
178
105
|
dfn {
|
179
|
-
|
106
|
+
font-style: italic;
|
180
107
|
}
|
181
108
|
|
182
|
-
// Address
|
183
|
-
//
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
height: 0;
|
109
|
+
// Address variable `h1` font-size and margin within `section` and `article`
|
110
|
+
// contexts in Firefox 4+, Safari, and Chrome.
|
111
|
+
h1 {
|
112
|
+
font-size: 2em;
|
113
|
+
margin: 0.67em 0;
|
188
114
|
}
|
189
115
|
|
190
|
-
// Address styling not present in IE
|
116
|
+
// Address styling not present in IE 8/9.
|
191
117
|
mark {
|
192
|
-
|
193
|
-
|
194
|
-
}
|
195
|
-
|
196
|
-
// Address margins set differently in IE 6/7.
|
197
|
-
p,
|
198
|
-
pre {
|
199
|
-
margin: 1em 0;
|
200
|
-
}
|
201
|
-
|
202
|
-
// Correct font family set oddly in IE 6, Safari 4/5, and Chrome.
|
203
|
-
code,
|
204
|
-
kbd,
|
205
|
-
pre,
|
206
|
-
samp {
|
207
|
-
font-family: monospace, serif;
|
208
|
-
_font-family: 'courier new', monospace;
|
209
|
-
font-size: 1em;
|
210
|
-
}
|
211
|
-
|
212
|
-
// Improve readability of pre-formatted text in all browsers.
|
213
|
-
pre {
|
214
|
-
white-space: pre;
|
215
|
-
white-space: pre-wrap;
|
216
|
-
word-wrap: break-word;
|
217
|
-
}
|
218
|
-
|
219
|
-
// Address CSS quotes not supported in IE 6/7.
|
220
|
-
q {
|
221
|
-
quotes: none;
|
222
|
-
}
|
223
|
-
|
224
|
-
// Address `quotes` property not supported in Safari 4.
|
225
|
-
q:before,
|
226
|
-
q:after {
|
227
|
-
content: '';
|
228
|
-
content: none;
|
118
|
+
background: #ff0;
|
119
|
+
color: #000;
|
229
120
|
}
|
230
121
|
|
231
122
|
// Address inconsistent and variable font size in all browsers.
|
232
123
|
small {
|
233
|
-
|
124
|
+
font-size: 80%;
|
234
125
|
}
|
235
126
|
|
236
127
|
// Prevent `sub` and `sup` affecting `line-height` in all browsers.
|
237
128
|
sub,
|
238
129
|
sup {
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
130
|
+
font-size: 75%;
|
131
|
+
line-height: 0;
|
132
|
+
position: relative;
|
133
|
+
vertical-align: baseline;
|
243
134
|
}
|
244
135
|
|
245
136
|
sup {
|
246
|
-
|
137
|
+
top: -0.5em;
|
247
138
|
}
|
248
139
|
|
249
140
|
sub {
|
250
|
-
|
251
|
-
}
|
252
|
-
|
253
|
-
}
|
254
|
-
|
255
|
-
|
256
|
-
// Lists
|
257
|
-
@mixin h5bp-lists {
|
258
|
-
|
259
|
-
// Address margins set differently in IE 6/7.
|
260
|
-
dl,
|
261
|
-
menu,
|
262
|
-
ol,
|
263
|
-
ul {
|
264
|
-
margin: 1em 0;
|
265
|
-
}
|
266
|
-
|
267
|
-
dd {
|
268
|
-
margin: 0 0 0 40px;
|
269
|
-
}
|
270
|
-
|
271
|
-
// Address paddings set differently in IE 6/7.
|
272
|
-
menu,
|
273
|
-
ol,
|
274
|
-
ul {
|
275
|
-
padding: 0 0 0 40px;
|
276
|
-
}
|
277
|
-
|
278
|
-
// Correct list images handled incorrectly in IE 7.
|
279
|
-
nav ul,
|
280
|
-
nav ol {
|
281
|
-
list-style: none;
|
282
|
-
list-style-image: none;
|
141
|
+
bottom: -0.25em;
|
283
142
|
}
|
284
|
-
|
285
143
|
}
|
286
144
|
|
287
|
-
|
288
145
|
// Embedded content
|
289
|
-
@mixin
|
290
|
-
|
291
|
-
// 1. Remove border when inside `a` element in IE 6/7/8/9 and Firefox 3.
|
292
|
-
// 2. Improve image quality when scaled in IE 7.
|
146
|
+
@mixin normalize-embedded {
|
147
|
+
// Remove border when inside `a` element in IE 8/9/10.
|
293
148
|
img {
|
294
|
-
|
295
|
-
-ms-interpolation-mode: bicubic; // 2
|
149
|
+
border: 0;
|
296
150
|
}
|
297
151
|
|
298
|
-
// Correct overflow
|
152
|
+
// Correct overflow not hidden in IE 9/10/11.
|
299
153
|
svg:not(:root) {
|
300
|
-
|
154
|
+
overflow: hidden;
|
301
155
|
}
|
302
|
-
|
303
156
|
}
|
304
157
|
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
// Address margin not present in IE 6/7/8/9, Safari 5, and Opera 11.
|
158
|
+
// Grouping content
|
159
|
+
@mixin normalize-grouping {
|
160
|
+
// Address margin not present in IE 8/9 and Safari.
|
310
161
|
figure {
|
311
|
-
|
162
|
+
margin: 1em 40px;
|
312
163
|
}
|
313
164
|
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
// Correct margin displayed oddly in IE 6/7.
|
321
|
-
form {
|
322
|
-
margin: 0;
|
165
|
+
// Address differences between Firefox and other browsers.
|
166
|
+
hr {
|
167
|
+
-moz-box-sizing: content-box;
|
168
|
+
box-sizing: content-box;
|
169
|
+
height: 0;
|
323
170
|
}
|
324
171
|
|
325
|
-
//
|
326
|
-
|
327
|
-
|
328
|
-
margin: 0 2px;
|
329
|
-
padding: 0.35em 0.625em 0.75em;
|
172
|
+
// Contain overflow in all browsers.
|
173
|
+
pre {
|
174
|
+
overflow: auto;
|
330
175
|
}
|
331
176
|
|
332
|
-
//
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
*margin-left: -7px; // 3
|
177
|
+
// Address odd `em`-unit font size rendering in all browsers.
|
178
|
+
code,
|
179
|
+
kbd,
|
180
|
+
pre,
|
181
|
+
samp {
|
182
|
+
font-family: monospace, monospace;
|
183
|
+
font-size: 1em;
|
340
184
|
}
|
185
|
+
}
|
341
186
|
|
342
|
-
|
343
|
-
|
344
|
-
//
|
345
|
-
//
|
187
|
+
// Forms
|
188
|
+
@mixin normalize-forms {
|
189
|
+
// Known limitation: by default, Chrome and Safari on OS X allow very limited
|
190
|
+
// styling of `select`, unless a `border` property is set.
|
191
|
+
// 1. Correct color not being inherited.
|
192
|
+
// Known issue: affects color of disabled elements.
|
193
|
+
// 2. Correct font properties not being inherited.
|
194
|
+
// 3. Address margins set differently in Firefox 4+, Safari, and Chrome.
|
346
195
|
button,
|
347
196
|
input,
|
197
|
+
optgroup,
|
348
198
|
select,
|
349
199
|
textarea {
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
*vertical-align: middle; // 3
|
200
|
+
color: inherit; // 1
|
201
|
+
font: inherit; // 2
|
202
|
+
margin: 0; // 3
|
354
203
|
}
|
355
204
|
|
356
|
-
// Address
|
357
|
-
|
358
|
-
|
359
|
-
input {
|
360
|
-
line-height: normal;
|
205
|
+
// Address `overflow` set to `hidden` in IE 8/9/10/11.
|
206
|
+
button {
|
207
|
+
overflow: visible;
|
361
208
|
}
|
362
209
|
|
363
210
|
// Address inconsistent `text-transform` inheritance for `button` and `select`.
|
364
211
|
// All other form control elements do not inherit `text-transform` values.
|
365
|
-
// Correct `button` style inheritance in
|
366
|
-
// Correct `select` style inheritance in Firefox
|
212
|
+
// Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.
|
213
|
+
// Correct `select` style inheritance in Firefox.
|
367
214
|
button,
|
368
215
|
select {
|
369
|
-
|
216
|
+
text-transform: none;
|
370
217
|
}
|
371
218
|
|
372
219
|
// 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
|
373
|
-
//
|
220
|
+
// and `video` controls.
|
374
221
|
// 2. Correct inability to style clickable `input` types in iOS.
|
375
222
|
// 3. Improve usability and consistency of cursor style between image-type
|
376
|
-
//
|
377
|
-
// 4. Remove inner spacing in IE 7 without affecting normal text inputs.
|
378
|
-
// Known issue: inner spacing remains in IE 6.
|
223
|
+
// `input` and others.
|
379
224
|
button,
|
380
225
|
html input[type="button"], // 1
|
381
226
|
input[type="reset"],
|
382
227
|
input[type="submit"] {
|
383
|
-
|
384
|
-
|
385
|
-
*overflow: visible; // 4
|
228
|
+
-webkit-appearance: button; // 2
|
229
|
+
cursor: pointer; // 3
|
386
230
|
}
|
387
231
|
|
388
232
|
// Re-set default cursor for disabled elements.
|
389
233
|
button[disabled],
|
390
234
|
html input[disabled] {
|
391
|
-
|
235
|
+
cursor: default;
|
236
|
+
}
|
237
|
+
|
238
|
+
// Remove inner padding and border in Firefox 4+.
|
239
|
+
button::-moz-focus-inner,
|
240
|
+
input::-moz-focus-inner {
|
241
|
+
border: 0;
|
242
|
+
padding: 0;
|
243
|
+
}
|
244
|
+
|
245
|
+
// Address Firefox 4+ setting `line-height` on `input` using `!important` in
|
246
|
+
// the UA stylesheet.
|
247
|
+
input {
|
248
|
+
line-height: normal;
|
392
249
|
}
|
393
250
|
|
394
|
-
//
|
395
|
-
//
|
396
|
-
//
|
397
|
-
//
|
251
|
+
// It's recommended that you don't attempt to style these elements.
|
252
|
+
// Firefox's implementation doesn't respect box-sizing, padding, or width.
|
253
|
+
// 1. Address box sizing set to `content-box` in IE 8/9/10.
|
254
|
+
// 2. Remove excess padding in IE 8/9/10.
|
398
255
|
input[type="checkbox"],
|
399
256
|
input[type="radio"] {
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
257
|
+
box-sizing: border-box; // 1
|
258
|
+
padding: 0; // 2
|
259
|
+
}
|
260
|
+
|
261
|
+
// Fix the cursor style for Chrome's increment/decrement buttons. For certain
|
262
|
+
// `font-size` values of the `input`, it causes the cursor style of the
|
263
|
+
// decrement button to change from `default` to `text`.
|
264
|
+
input[type="number"]::-webkit-inner-spin-button,
|
265
|
+
input[type="number"]::-webkit-outer-spin-button {
|
266
|
+
height: auto;
|
404
267
|
}
|
405
268
|
|
406
|
-
// 1. Address `appearance` set to `searchfield` in Safari
|
407
|
-
// 2. Address `box-sizing` set to `border-box` in Safari
|
408
|
-
//
|
269
|
+
// 1. Address `appearance` set to `searchfield` in Safari and Chrome.
|
270
|
+
// 2. Address `box-sizing` set to `border-box` in Safari and Chrome
|
271
|
+
// (include `-moz` to future-proof).
|
409
272
|
input[type="search"] {
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
273
|
+
-webkit-appearance: textfield; /* 1 */
|
274
|
+
-moz-box-sizing: content-box;
|
275
|
+
-webkit-box-sizing: content-box; /* 2 */
|
276
|
+
box-sizing: content-box;
|
414
277
|
}
|
415
278
|
|
416
|
-
// Remove inner padding and search cancel button in Safari
|
417
|
-
//
|
279
|
+
// Remove inner padding and search cancel button in Safari and Chrome on OS X.
|
280
|
+
// Safari (but not Chrome) clips the cancel button when the search input has
|
281
|
+
// padding (and `textfield` appearance).
|
418
282
|
input[type="search"]::-webkit-search-cancel-button,
|
419
283
|
input[type="search"]::-webkit-search-decoration {
|
420
|
-
|
284
|
+
-webkit-appearance: none;
|
421
285
|
}
|
422
286
|
|
423
|
-
//
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
287
|
+
// Define consistent border, margin, and padding.
|
288
|
+
fieldset {
|
289
|
+
border: 1px solid #c0c0c0;
|
290
|
+
margin: 0 2px;
|
291
|
+
padding: 0.35em 0.625em 0.75em;
|
292
|
+
}
|
293
|
+
|
294
|
+
// 1. Correct `color` not being inherited in IE 8/9/10/11.
|
295
|
+
// 2. Remove padding so people aren't caught out if they zero out fieldsets.
|
296
|
+
legend {
|
297
|
+
border: 0; /* 1 */
|
298
|
+
padding: 0; /* 2 */
|
428
299
|
}
|
429
300
|
|
430
|
-
//
|
431
|
-
// 2. Improve readability and alignment in all browsers.
|
301
|
+
// Remove default vertical scrollbar in IE 8/9/10/11.
|
432
302
|
textarea {
|
433
|
-
|
434
|
-
vertical-align: top; // 2
|
303
|
+
overflow: auto;
|
435
304
|
}
|
436
305
|
|
306
|
+
// Don't inherit the `font-weight` (applied by a rule above).
|
307
|
+
// NOTE: the default cannot safely be changed in Chrome and Safari on OS X.
|
308
|
+
optgroup {
|
309
|
+
font-weight: bold;
|
310
|
+
}
|
437
311
|
}
|
438
312
|
|
439
|
-
|
440
313
|
// Tables
|
441
|
-
@mixin
|
442
|
-
|
314
|
+
@mixin normalize-tables {
|
443
315
|
// Remove most spacing between table cells.
|
444
316
|
table {
|
445
|
-
|
446
|
-
|
317
|
+
border-collapse: collapse;
|
318
|
+
border-spacing: 0;
|
447
319
|
}
|
448
320
|
|
321
|
+
td,
|
322
|
+
th {
|
323
|
+
padding: 0;
|
324
|
+
}
|
449
325
|
}
|