compass-h5bp 0.0.5 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -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
- article, aside, details, figcaption, figure, footer, header, hgroup, nav, section { display: block; }
19
- audio, canvas, video { display: inline-block; *display: inline; *zoom: 1; }
20
- audio:not([controls]) { display: none; }
21
- [hidden] { display: none; }
22
-
13
+ html,
14
+ button,
15
+ input,
16
+ select,
17
+ textarea {
18
+ color: #222;
19
+ }
23
20
 
24
- /* =============================================================================
25
- Base
26
- ========================================================================== */
21
+ body {
22
+ font-size: 1em;
23
+ line-height: 1.4;
24
+ }
27
25
 
28
26
  /*
29
- * 1. Correct text resizing oddly in IE6/7 when body font-size is set using em units
30
- * 2. Prevent iOS text size adjust on device orientation change, without disabling user zoom: h5bp.com/g
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
- html { font-size: 100%; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; }
34
-
35
- html, button, input, select, textarea { font-family: sans-serif; color: #222; }
32
+ ::-moz-selection {
33
+ background: #b3d4fc;
34
+ text-shadow: none;
35
+ }
36
36
 
37
- body { margin: 0; font-size: 1em; line-height: 1.4; }
37
+ ::selection {
38
+ background: #b3d4fc;
39
+ text-shadow: none;
40
+ }
38
41
 
39
42
  /*
40
- * Remove text-shadow in selection highlight: h5bp.com/i
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
- ::-moz-selection { background: #fe57a1; color: #fff; text-shadow: none; }
46
- ::selection { background: #fe57a1; color: #fff; text-shadow: none; }
47
-
48
-
49
- /* =============================================================================
50
- Links
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
- abbr[title] { border-bottom: 1px dotted; }
55
+ /*
56
+ * Remove the gap between images and the bottom of their containers: h5bp.com/i/440
57
+ */
67
58
 
68
- b, strong { font-weight: bold; }
59
+ img {
60
+ vertical-align: middle;
61
+ }
69
62
 
70
- blockquote { margin: 1em 40px; }
63
+ /*
64
+ * Remove default fieldset styles.
65
+ */
71
66
 
72
- dfn { font-style: italic; }
67
+ fieldset {
68
+ border: 0;
69
+ margin: 0;
70
+ padding: 0;
71
+ }
73
72
 
74
- hr { display: block; height: 1px; border: 0; border-top: 1px solid #ccc; margin: 1em 0; padding: 0; }
73
+ /*
74
+ * Allow only vertical resizing of textareas.
75
+ */
75
76
 
76
- ins { background: #ff9; color: #000; text-decoration: none; }
77
+ textarea {
78
+ resize: vertical;
79
+ }
77
80
 
78
- mark { background: #ff0; color: #000; font-style: italic; font-weight: bold; }
81
+ /* ==========================================================================
82
+ Chrome Frame prompt
83
+ ========================================================================== */
79
84
 
80
- /* Redeclare monospace font family: h5bp.com/j */
81
- pre, code, kbd, samp { font-family: monospace, serif; _font-family: 'courier new', monospace; font-size: 1em; }
85
+ .chromeframe {
86
+ margin: 0.2em 0;
87
+ background: #ccc;
88
+ color: #000;
89
+ padding: 0.2em 0;
90
+ }
82
91
 
83
- /* Improve readability of pre-formatted text in all browsers */
84
- pre { white-space: pre; white-space: pre-wrap; word-wrap: break-word; }
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
- Forms
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
- * 1. Correct color not inheriting in IE6/7/8/9
143
- * 2. Correct alignment displayed oddly in IE6/7
117
+ * Image replacement
144
118
  */
145
119
 
146
- legend { border: 0; *margin-left: -7px; padding: 0; white-space: normal; }
147
-
148
- /*
149
- * 1. Correct font-size not inheriting in all browsers
150
- * 2. Remove margins in FF3/4 S5 Chrome
151
- * 3. Define consistent vertical alignment display in all browsers
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
- button, input, select, textarea { font-size: 100%; margin: 0; vertical-align: baseline; *vertical-align: middle; }
128
+ .ir:before {
129
+ content: "";
130
+ display: block;
131
+ width: 0;
132
+ height: 100%;
133
+ }
155
134
 
156
135
  /*
157
- * 1. Define line-height as normal to match FF3/4 (set using !important in the UA stylesheet)
136
+ * Hide from both screenreaders and browsers: h5bp.com/u
158
137
  */
159
138
 
160
- button, input { line-height: normal; }
139
+ .hidden {
140
+ display: none !important;
141
+ visibility: hidden;
142
+ }
161
143
 
162
144
  /*
163
- * 1. Display hand cursor for clickable form elements
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
- button, input[type="button"], input[type="reset"], input[type="submit"] { cursor: pointer; -webkit-appearance: button; *overflow: visible; }
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
- * Re-set default cursor for disabled elements
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
- button[disabled], input[disabled] { cursor: default; }
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
- * Consistent box sizing and appearance
175
+ * Hide visually and from screenreaders, but maintain layout
178
176
  */
179
177
 
180
- input[type="checkbox"], input[type="radio"] { box-sizing: border-box; padding: 0; *width: 13px; *height: 13px; }
181
- input[type="search"] { -webkit-appearance: textfield; -moz-box-sizing: content-box; -webkit-box-sizing: content-box; box-sizing: content-box; }
182
- input[type="search"]::-webkit-search-decoration, input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }
178
+ .invisible {
179
+ visibility: hidden;
180
+ }
183
181
 
184
182
  /*
185
- * Remove inner padding and border in FF3/4: h5bp.com/l
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
- button::-moz-focus-inner, input::-moz-focus-inner { border: 0; padding: 0; }
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
- * 1. Remove default vertical scrollbar in IE6/7/8/9
192
- * 2. Allow only vertical resizing
205
+ * For IE 6/7 only
206
+ * Include this rule to trigger hasLayout and contain floats.
193
207
  */
194
208
 
195
- textarea { overflow: auto; vertical-align: top; resize: vertical; }
196
-
197
- /* Colors for form validity */
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
- /* ==|== media queries ======================================================
237
- EXAMPLE Media Query for Responsive Design.
238
- This example overrides the primary ('mobile first') styles
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
- /* Style adjustments for viewports that meet the condition */
244
- /* HACK needed to make Sass compile correctly */
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
- * { background: transparent !important; color: black !important; box-shadow:none !important; text-shadow: none !important; filter:none !important; -ms-filter: none !important; } /* Black prints faster: h5bp.com/s */
284
- a, a:visited { text-decoration: underline; }
285
- a[href]:after { content: " (" attr(href) ")"; }
286
- abbr[title]:after { content: " (" attr(title) ")"; }
287
- .ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; } /* Don't show links for images, or javascript/internal links */
288
- pre, blockquote { border: 1px solid #999; page-break-inside: avoid; }
289
- thead { display: table-header-group; } /* h5bp.com/t */
290
- tr, img { page-break-inside: avoid; }
291
- img { max-width: 100% !important; }
292
- @page { margin: 0.5cm; }
293
- p, h2, h3 { orphans: 3; widows: 3; }
294
- h2, h3 { page-break-after: avoid; }
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
  }