compass-h5bp 0.0.5 → 0.1.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.
- data/.gitignore +1 -0
- data/README.md +15 -9
- data/compass-h5bp.gemspec +2 -2
- data/lib/compass/h5bp/version.rb +2 -2
- data/stylesheets/_h5bp.scss +1 -3
- data/stylesheets/h5bp/_chromeframe.scss +2 -7
- data/stylesheets/h5bp/_helpers.scss +61 -12
- data/stylesheets/h5bp/_main.scss +83 -0
- data/stylesheets/h5bp/_media.scss +64 -12
- data/stylesheets/h5bp/_normalize.scss +333 -132
- data/test/project/sass/original.scss +210 -205
- data/test/project/sass/test.scss +10 -6
- metadata +20 -10
@@ -4,292 +4,297 @@
|
|
4
4
|
* What follows is the result of much research on cross-browser styling.
|
5
5
|
* Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
|
6
6
|
* Kroc Camen, and the H5BP dev community and team.
|
7
|
-
*
|
8
|
-
* Detailed information about this CSS: h5bp.com/css
|
9
|
-
*
|
10
|
-
* ==|== normalize ==========================================================
|
11
7
|
*/
|
12
8
|
|
13
|
-
|
14
|
-
|
15
|
-
HTML5 display definitions
|
9
|
+
/* ==========================================================================
|
10
|
+
Base styles: opinionated defaults
|
16
11
|
========================================================================== */
|
17
12
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
13
|
+
html,
|
14
|
+
button,
|
15
|
+
input,
|
16
|
+
select,
|
17
|
+
textarea {
|
18
|
+
color: #222;
|
19
|
+
}
|
23
20
|
|
24
|
-
|
25
|
-
|
26
|
-
|
21
|
+
body {
|
22
|
+
font-size: 1em;
|
23
|
+
line-height: 1.4;
|
24
|
+
}
|
27
25
|
|
28
26
|
/*
|
29
|
-
*
|
30
|
-
*
|
27
|
+
* Remove text-shadow in selection highlight: h5bp.com/i
|
28
|
+
* These selection declarations have to be separate.
|
29
|
+
* Customize the background color to match your design.
|
31
30
|
*/
|
32
31
|
|
33
|
-
|
34
|
-
|
35
|
-
|
32
|
+
::-moz-selection {
|
33
|
+
background: #b3d4fc;
|
34
|
+
text-shadow: none;
|
35
|
+
}
|
36
36
|
|
37
|
-
|
37
|
+
::selection {
|
38
|
+
background: #b3d4fc;
|
39
|
+
text-shadow: none;
|
40
|
+
}
|
38
41
|
|
39
42
|
/*
|
40
|
-
*
|
41
|
-
* These selection declarations have to be separate
|
42
|
-
* Also: hot pink! (or customize the background color to match your design)
|
43
|
+
* A better looking default horizontal rule
|
43
44
|
*/
|
44
45
|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
a { color: #00e; }
|
54
|
-
a:visited { color: #551a8b; }
|
55
|
-
a:hover { color: #06e; }
|
56
|
-
a:focus { outline: thin dotted; }
|
57
|
-
|
58
|
-
/* Improve readability when focused and hovered in all browsers: h5bp.com/h */
|
59
|
-
a:hover, a:active { outline: 0; }
|
60
|
-
|
61
|
-
|
62
|
-
/* =============================================================================
|
63
|
-
Typography
|
64
|
-
========================================================================== */
|
46
|
+
hr {
|
47
|
+
display: block;
|
48
|
+
height: 1px;
|
49
|
+
border: 0;
|
50
|
+
border-top: 1px solid #ccc;
|
51
|
+
margin: 1em 0;
|
52
|
+
padding: 0;
|
53
|
+
}
|
65
54
|
|
66
|
-
|
55
|
+
/*
|
56
|
+
* Remove the gap between images and the bottom of their containers: h5bp.com/i/440
|
57
|
+
*/
|
67
58
|
|
68
|
-
|
59
|
+
img {
|
60
|
+
vertical-align: middle;
|
61
|
+
}
|
69
62
|
|
70
|
-
|
63
|
+
/*
|
64
|
+
* Remove default fieldset styles.
|
65
|
+
*/
|
71
66
|
|
72
|
-
|
67
|
+
fieldset {
|
68
|
+
border: 0;
|
69
|
+
margin: 0;
|
70
|
+
padding: 0;
|
71
|
+
}
|
73
72
|
|
74
|
-
|
73
|
+
/*
|
74
|
+
* Allow only vertical resizing of textareas.
|
75
|
+
*/
|
75
76
|
|
76
|
-
|
77
|
+
textarea {
|
78
|
+
resize: vertical;
|
79
|
+
}
|
77
80
|
|
78
|
-
|
81
|
+
/* ==========================================================================
|
82
|
+
Chrome Frame prompt
|
83
|
+
========================================================================== */
|
79
84
|
|
80
|
-
|
81
|
-
|
85
|
+
.chromeframe {
|
86
|
+
margin: 0.2em 0;
|
87
|
+
background: #ccc;
|
88
|
+
color: #000;
|
89
|
+
padding: 0.2em 0;
|
90
|
+
}
|
82
91
|
|
83
|
-
/*
|
84
|
-
|
92
|
+
/* ==========================================================================
|
93
|
+
Author's custom styles
|
94
|
+
========================================================================== */
|
85
95
|
|
86
|
-
q { quotes: none; }
|
87
|
-
q:before, q:after { content: ""; content: none; }
|
88
96
|
|
89
|
-
small { font-size: 85%; }
|
90
97
|
|
91
|
-
/* Position subscript and superscript content without affecting line-height: h5bp.com/k */
|
92
|
-
sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; }
|
93
|
-
sup { top: -0.5em; }
|
94
|
-
sub { bottom: -0.25em; }
|
95
98
|
|
96
99
|
|
97
|
-
/* =============================================================================
|
98
|
-
Lists
|
99
|
-
========================================================================== */
|
100
100
|
|
101
|
-
ul, ol { margin: 1em 0; padding: 0 0 0 40px; }
|
102
|
-
dd { margin: 0 0 0 40px; }
|
103
|
-
nav ul, nav ol { list-style: none; list-style-image: none; margin: 0; padding: 0; }
|
104
101
|
|
105
102
|
|
106
|
-
/* =============================================================================
|
107
|
-
Embedded content
|
108
|
-
========================================================================== */
|
109
103
|
|
110
|
-
/*
|
111
|
-
* 1. Improve image quality when scaled in IE7: h5bp.com/d
|
112
|
-
* 2. Remove the gap between images and borders on image containers: h5bp.com/i/440
|
113
|
-
*/
|
114
104
|
|
115
|
-
img { border: 0; -ms-interpolation-mode: bicubic; vertical-align: middle; }
|
116
105
|
|
117
|
-
/*
|
118
|
-
* Correct overflow not hidden in IE9
|
119
|
-
*/
|
120
106
|
|
121
|
-
svg:not(:root) { overflow: hidden; }
|
122
107
|
|
123
108
|
|
124
|
-
/* =============================================================================
|
125
|
-
Figures
|
126
|
-
========================================================================== */
|
127
109
|
|
128
|
-
figure { margin: 0; }
|
129
110
|
|
130
111
|
|
131
|
-
/*
|
132
|
-
|
112
|
+
/* ==========================================================================
|
113
|
+
Helper classes
|
133
114
|
========================================================================== */
|
134
115
|
|
135
|
-
form { margin: 0; }
|
136
|
-
fieldset { border: 0; margin: 0; padding: 0; }
|
137
|
-
|
138
|
-
/* Indicate that 'label' will shift focus to the associated form element */
|
139
|
-
label { cursor: pointer; }
|
140
|
-
|
141
116
|
/*
|
142
|
-
*
|
143
|
-
* 2. Correct alignment displayed oddly in IE6/7
|
117
|
+
* Image replacement
|
144
118
|
*/
|
145
119
|
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
120
|
+
.ir {
|
121
|
+
background-color: transparent;
|
122
|
+
border: 0;
|
123
|
+
overflow: hidden;
|
124
|
+
// IE 6/7 fallback
|
125
|
+
*text-indent: -9999px;
|
126
|
+
}
|
153
127
|
|
154
|
-
|
128
|
+
.ir:before {
|
129
|
+
content: "";
|
130
|
+
display: block;
|
131
|
+
width: 0;
|
132
|
+
height: 100%;
|
133
|
+
}
|
155
134
|
|
156
135
|
/*
|
157
|
-
*
|
136
|
+
* Hide from both screenreaders and browsers: h5bp.com/u
|
158
137
|
*/
|
159
138
|
|
160
|
-
|
139
|
+
.hidden {
|
140
|
+
display: none !important;
|
141
|
+
visibility: hidden;
|
142
|
+
}
|
161
143
|
|
162
144
|
/*
|
163
|
-
*
|
164
|
-
* 2. Allow styling of clickable form elements in iOS
|
165
|
-
* 3. Correct inner spacing displayed oddly in IE7 (doesn't effect IE6)
|
145
|
+
* Hide only visually, but have it available for screenreaders: h5bp.com/v
|
166
146
|
*/
|
167
147
|
|
168
|
-
|
148
|
+
.visuallyhidden {
|
149
|
+
border: 0;
|
150
|
+
clip: rect(0 0 0 0);
|
151
|
+
height: 1px;
|
152
|
+
margin: -1px;
|
153
|
+
overflow: hidden;
|
154
|
+
padding: 0;
|
155
|
+
position: absolute;
|
156
|
+
width: 1px;
|
157
|
+
}
|
169
158
|
|
170
159
|
/*
|
171
|
-
*
|
160
|
+
* Extends the .visuallyhidden class to allow the element to be focusable
|
161
|
+
* when navigated to via the keyboard: h5bp.com/p
|
172
162
|
*/
|
173
163
|
|
174
|
-
|
164
|
+
.visuallyhidden.focusable:active,
|
165
|
+
.visuallyhidden.focusable:focus {
|
166
|
+
clip: auto;
|
167
|
+
height: auto;
|
168
|
+
margin: 0;
|
169
|
+
overflow: visible;
|
170
|
+
position: static;
|
171
|
+
width: auto;
|
172
|
+
}
|
175
173
|
|
176
174
|
/*
|
177
|
-
*
|
175
|
+
* Hide visually and from screenreaders, but maintain layout
|
178
176
|
*/
|
179
177
|
|
180
|
-
|
181
|
-
|
182
|
-
|
178
|
+
.invisible {
|
179
|
+
visibility: hidden;
|
180
|
+
}
|
183
181
|
|
184
182
|
/*
|
185
|
-
*
|
183
|
+
* Clearfix: contain floats
|
184
|
+
*
|
185
|
+
* For modern browsers
|
186
|
+
* 1. The space content is one way to avoid an Opera bug when the
|
187
|
+
* `contenteditable` attribute is included anywhere else in the document.
|
188
|
+
* Otherwise it causes space to appear at the top and bottom of elements
|
189
|
+
* that receive the `clearfix` class.
|
190
|
+
* 2. The use of `table` rather than `block` is only necessary if using
|
191
|
+
* `:before` to contain the top-margins of child elements.
|
186
192
|
*/
|
187
193
|
|
188
|
-
|
194
|
+
.clearfix:before,
|
195
|
+
.clearfix:after {
|
196
|
+
content: " "; // 1
|
197
|
+
display: table; // 2
|
198
|
+
}
|
199
|
+
|
200
|
+
.clearfix:after {
|
201
|
+
clear: both;
|
202
|
+
}
|
189
203
|
|
190
204
|
/*
|
191
|
-
*
|
192
|
-
*
|
205
|
+
* For IE 6/7 only
|
206
|
+
* Include this rule to trigger hasLayout and contain floats.
|
193
207
|
*/
|
194
208
|
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
input:valid, textarea:valid { }
|
199
|
-
input:invalid, textarea:invalid { background-color: #f0dddd; }
|
200
|
-
|
201
|
-
|
202
|
-
/* =============================================================================
|
203
|
-
Tables
|
204
|
-
========================================================================== */
|
205
|
-
|
206
|
-
table { border-collapse: collapse; border-spacing: 0; }
|
207
|
-
td { vertical-align: top; }
|
208
|
-
|
209
|
-
|
210
|
-
/* =============================================================================
|
211
|
-
Chrome Frame Prompt
|
212
|
-
========================================================================== */
|
213
|
-
|
214
|
-
.chromeframe { margin: 0.2em 0; background: #ccc; color: black; padding: 0.2em 0; }
|
215
|
-
|
216
|
-
|
217
|
-
/* ==|== primary styles =====================================================
|
218
|
-
Author:
|
219
|
-
========================================================================== */
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
209
|
+
.clearfix {
|
210
|
+
*zoom: 1;
|
211
|
+
}
|
235
212
|
|
236
|
-
/*
|
237
|
-
EXAMPLE Media
|
238
|
-
|
213
|
+
/* ==========================================================================
|
214
|
+
EXAMPLE Media Queries for Responsive Design.
|
215
|
+
Theses examples override the primary ('mobile first') styles.
|
239
216
|
Modify as content requires.
|
240
217
|
========================================================================== */
|
241
218
|
|
242
219
|
@media only screen and (min-width: 35em) {
|
243
|
-
|
244
|
-
|
245
|
-
body { margin: 0; }
|
220
|
+
/* Style adjustments for viewports that meet the condition */
|
221
|
+
body { margin: 0; } //HACK
|
246
222
|
}
|
247
223
|
|
224
|
+
@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
|
225
|
+
only screen and (min-resolution: 144dpi) {
|
226
|
+
/* Style adjustments for high resolution devices */
|
227
|
+
body { margin: 0; } //HACK
|
228
|
+
}
|
248
229
|
|
249
|
-
|
250
|
-
/* ==|== non-semantic helper classes ========================================
|
251
|
-
Please define your styles before this section.
|
252
|
-
========================================================================== */
|
253
|
-
|
254
|
-
/* For image replacement */
|
255
|
-
.ir { display: block; border: 0; text-indent: -999em; overflow: hidden; background-color: transparent; background-repeat: no-repeat; text-align: left; direction: ltr; *line-height: 0; }
|
256
|
-
.ir br { display: none; }
|
257
|
-
|
258
|
-
/* Hide from both screenreaders and browsers: h5bp.com/u */
|
259
|
-
.hidden { display: none !important; visibility: hidden; }
|
260
|
-
|
261
|
-
/* Hide only visually, but have it available for screenreaders: h5bp.com/v */
|
262
|
-
.visuallyhidden { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; }
|
263
|
-
|
264
|
-
/* Extends the .visuallyhidden class to allow the element to be focusable when navigated to via the keyboard: h5bp.com/p */
|
265
|
-
.visuallyhidden.focusable:active, .visuallyhidden.focusable:focus { clip: auto; height: auto; margin: 0; overflow: visible; position: static; width: auto; }
|
266
|
-
|
267
|
-
/* Hide visually and from screenreaders, but maintain layout */
|
268
|
-
.invisible { visibility: hidden; }
|
269
|
-
|
270
|
-
/* Contain floats: h5bp.com/q */
|
271
|
-
.clearfix:before, .clearfix:after { content: ""; display: table; }
|
272
|
-
.clearfix:after { clear: both; }
|
273
|
-
.clearfix { *zoom: 1; }
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
/* ==|== print styles =======================================================
|
230
|
+
/* ==========================================================================
|
278
231
|
Print styles.
|
279
232
|
Inlined to avoid required HTTP connection: h5bp.com/r
|
280
233
|
========================================================================== */
|
281
234
|
|
282
235
|
@media print {
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
236
|
+
* {
|
237
|
+
background: transparent !important;
|
238
|
+
color: #000 !important; // Black prints faster: h5bp.com/s
|
239
|
+
box-shadow:none !important;
|
240
|
+
text-shadow: none !important;
|
241
|
+
}
|
242
|
+
|
243
|
+
a,
|
244
|
+
a:visited {
|
245
|
+
text-decoration: underline;
|
246
|
+
}
|
247
|
+
|
248
|
+
a[href]:after {
|
249
|
+
content: " (" attr(href) ")";
|
250
|
+
}
|
251
|
+
|
252
|
+
abbr[title]:after {
|
253
|
+
content: " (" attr(title) ")";
|
254
|
+
}
|
255
|
+
|
256
|
+
/*
|
257
|
+
* Don't show links for images, or javascript/internal links
|
258
|
+
*/
|
259
|
+
|
260
|
+
.ir a:after,
|
261
|
+
a[href^="javascript:"]:after,
|
262
|
+
a[href^="#"]:after {
|
263
|
+
content: "";
|
264
|
+
}
|
265
|
+
|
266
|
+
pre,
|
267
|
+
blockquote {
|
268
|
+
border: 1px solid #999;
|
269
|
+
page-break-inside: avoid;
|
270
|
+
}
|
271
|
+
|
272
|
+
thead {
|
273
|
+
display: table-header-group; // h5bp.com/t
|
274
|
+
}
|
275
|
+
|
276
|
+
tr,
|
277
|
+
img {
|
278
|
+
page-break-inside: avoid;
|
279
|
+
}
|
280
|
+
|
281
|
+
img {
|
282
|
+
max-width: 100% !important;
|
283
|
+
}
|
284
|
+
|
285
|
+
@page {
|
286
|
+
margin: 0.5cm;
|
287
|
+
}
|
288
|
+
|
289
|
+
p,
|
290
|
+
h2,
|
291
|
+
h3 {
|
292
|
+
orphans: 3;
|
293
|
+
widows: 3;
|
294
|
+
}
|
295
|
+
|
296
|
+
h2,
|
297
|
+
h3 {
|
298
|
+
page-break-after: avoid;
|
299
|
+
}
|
295
300
|
}
|