Skip to content

Commit 8649396

Browse files
committedAug 10, 2011
updated to HTML5 Boilerplate v2.0
1 parent 761be46 commit 8649396

File tree

5 files changed

+59
-53
lines changed

5 files changed

+59
-53
lines changed
 

‎config.ru

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ if ENV['RACK_ENV'] != 'production'
3131
end
3232

3333
# Tweak some Haml configuration options (HTML5 output, double quoted attributes)
34+
# Remove this if you choose to disable Haml
3435
require 'haml'
3536
class Haml::Engine
3637
alias old_initialize initialize

‎stylesheets/partials/h5bp/_main.sass

+44-39
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,46 @@
1-
// converted from HTML5 Boilerplate - pre-release w/ normalization - 06/28/11
1+
// converted from HTML5 Boilerplate v2.0 - 08/10/2011
22
33
// Default colors
4-
$h5bp-text-selection: #FF5E99 !default
5-
$h5bp-webkit-tap: #FF5E99 !default
4+
$h5bp-text-selection: #fe57a1 !default
5+
$h5bp-webkit-tap: #fe57a1 !default
66
$h5bp-link: #00e !default
7-
$h5bp-visited-link: #551a8b !default
7+
$h5bp-link-hover: #06e !default
8+
$h5bp-link-visited: #551a8b !default
89

910
// HTML5 ✰ Boilerplate
1011
//
1112
// What follows is the result of much research on cross-browser styling.
1213
// Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
1314
// Kroc Camen, and the H5BP dev community and team.
15+
//
16+
// Detailed information about this CSS: h5bp.com/css
1417
1518
1619
// ==========================================================================
17-
// HTML5 element display
20+
// HTML5 display definitions
1821
// ==========================================================================
1922
2023
article, aside, details, figcaption, figure, footer, header, hgroup, nav, section
2124
display: block
22-
audio[controls], canvas, video
25+
audio, canvas, video
2326
display: inline-block
2427
*display: inline
2528
*zoom: 1
26-
29+
audio:not([controls])
30+
display: none
31+
[hidden]
32+
display: none
2733

2834
// ==========================================================================
2935
// Base
3036
// ==========================================================================
3137
3238
// 1. Correct text resizing oddly in IE6/7 when body font-size is set using em units
33-
// http://clagnut.com/blog/348/#c790
3439
// 2. Force vertical scrollbar in non-IE
35-
// 3. Remove Android and iOS tap highlight color to prevent entire container being highlighted
36-
// www.yuiblog.com/blog/2010/10/01/quick-tip-customizing-the-mobile-safari-tap-highlight-color/
37-
// 4. Prevent iOS text size adjust on device orientation change, without disabling user zoom
38-
// www.456bereastreet.com/archive/201012/controlling_text_size_in_safari_for_ios_without_disabling_user_zoom/
39-
40+
// 3. Prevent iOS text size adjust on device orientation change, without disabling user zoom: h5bp.com/g
4041
html
4142
font-size: 100%
4243
overflow-y: scroll
43-
-webkit-tap-highlight-color: $h5bp-text-selection
4444
-webkit-text-size-adjust: 100%
4545
-ms-text-size-adjust: 100%
4646

@@ -53,10 +53,9 @@ body, button, input, select, textarea
5353
font-family: sans-serif
5454
color: #222
5555

56+
// Remove text-shadow in selection highlight: h5bp.com/i
5657
// These selection declarations have to be separate
57-
// No text-shadow: twitter.com/miketaylr/status/12228805301
58-
// Also: hot pink!
59-
58+
// Also: hot pink! (or customize the background color to match your design)
6059
::-moz-selection
6160
background: $h5bp-text-selection
6261
color: #fff
@@ -74,11 +73,13 @@ body, button, input, select, textarea
7473
a
7574
color: $h5bp-link
7675
&:visited
77-
color: $h5bp-visited-link
76+
color: $h5bp-link-visited
77+
&:hover
78+
color: $h5bp-link-hover
7879
&:focus
7980
outline: thin dotted
8081

81-
// Improve readability when focused and hovered in all browsers: people.opera.com/patrickl/experiments/keyboard/test
82+
// Improve readability when focused and hovered in all browsers: h5bp.com/h
8283
&:hover, &:active
8384
outline: 0
8485

@@ -118,7 +119,7 @@ mark
118119
font-style: italic
119120
font-weight: bold
120121

121-
// Redeclare monospace font family: en.wikipedia.org/wiki/User:Davidgothberg/Test59
122+
// Redeclare monospace font family: h5bp.com/j
122123
pre, code, kbd, samp
123124
font-family: monospace, monospace
124125
_font-family: 'courier new', monospace
@@ -139,7 +140,7 @@ q
139140
small
140141
font-size: 85%
141142

142-
// Position subscript and superscript content without affecting line-height: gist.github.com/413930
143+
// Position subscript and superscript content without affecting line-height: h5bp.com/k
143144
sub, sup
144145
font-size: 75%
145146
line-height: 0
@@ -162,6 +163,7 @@ dd
162163
margin: 0 0 0 40px
163164
nav ul, nav ol
164165
list-style: none
166+
list-style-image: none
165167
margin: 0
166168
padding: 0
167169

@@ -170,15 +172,14 @@ nav ul, nav ol
170172
// Embedded content
171173
// ==========================================================================
172174
173-
// Improve image quality when scaled in IE7
174-
// code.flickr.com/blog/2008/11/12/on-ui-quality-the-little-things-client-side-image-resizing/
175-
175+
// 1. Improve image quality when scaled in IE7: h5bp.com/d
176+
// 2. Remove the gap between images and borders on image containers: h5bp.com/e
176177
img
177178
border: 0
178179
-ms-interpolation-mode: bicubic
180+
vertical-align: middle
179181

180182
// Correct overflow displayed oddly in IE9
181-
182183
svg:not(:root)
183184
overflow: hidden
184185

@@ -202,22 +203,20 @@ fieldset
202203
margin: 0
203204
padding: 0
204205

206+
// Indicate that 'label' will shift focus to the associated form element
207+
label
208+
cursor: pointer
209+
205210
// 1. Correct color not inheriting in IE6/7/8/9
206211
// 2. Correct alignment displayed oddly in IE6/7
207-
208212
legend
209213
border: 0
210214
*margin-left: -7px
211215
padding: 0
212216

213-
// Indicate that 'label' will shift focus to the associated form element
214-
label
215-
cursor: pointer
216-
217217
// 1. Correct font-size not inheriting in all browsers
218218
// 2. Remove margins in FF3/4 S5 Chrome
219219
// 3. Define consistent vertical alignment display in all browsers
220-
221220
button, input, select, textarea
222221
font-size: 100%
223222
margin: 0
@@ -226,38 +225,42 @@ button, input, select, textarea
226225

227226
// 1. Define line-height as normal to match FF3/4 (set using !important in the UA stylesheet)
228227
// 2. Correct inner spacing displayed oddly in IE6/7
229-
230228
button, input
231229
line-height: normal
232230
*overflow: visible
231+
232+
// Reintroduce inner spacing in 'table' to avoid overlap and whitespace issues in IE6/7
233+
table button, table input
234+
*overflow: auto
233235

234236
// 1. Display hand cursor for clickable form elements
235237
// 2. Allow styling of clickable form elements in iOS
236-
237238
button, input[type="button"], input[type="reset"], input[type="submit"]
238239
cursor: pointer
239240
-webkit-appearance: button
240241

241242
// Consistent box sizing and appearance
242-
243243
input[type="checkbox"], input[type="radio"]
244244
box-sizing: border-box
245245
input[type="search"]
246+
-webkit-appearance: textfield
246247
-moz-box-sizing: content-box
247248
-webkit-box-sizing: content-box
248249
box-sizing: content-box
250+
input[type="search"]::-webkit-search-decoration
251+
-webkit-appearance: none
249252

250-
// Remove inner padding and border in FF3/4
251-
// www.sitepen.com/blog/2008/05/14/the-devils-in-the-details-fixing-dojos-toolbar-buttons/
252-
253+
// Remove inner padding and border in FF3/4: h5bp.com/l
253254
button::-moz-focus-inner, input::-moz-focus-inner
254255
border: 0
255256
padding: 0
256257

257-
// Remove default vertical scrollbar in IE6/7/8/9 */
258+
// 1. Remove default vertical scrollbar in IE6/7/8/9
259+
// 2. Allow only vertical resizingtextarea
258260
textarea
259261
overflow: auto
260262
vertical-align: top
263+
resize: vertical
261264

262265
// Colors for form validity
263266
input:valid, textarea:valid
@@ -272,4 +275,6 @@ input:invalid, textarea:invalid
272275
273276
table
274277
border-collapse: collapse
275-
border-spacing: 0
278+
border-spacing: 0
279+
td
280+
vertical-align: top

‎stylesheets/partials/h5bp/_mediaqueries.sass

+4-5
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,15 @@
1919
// ==========================================================================
2020
2121
@media print
22-
// Black prints faster: sanbeiji.com/archives/953
23-
a, a:visited
24-
color: #444 !important
25-
text-decoration: underline
22+
// Black prints faster: h5bp.com/s
2623
*
2724
background: transparent !important
2825
color: black !important
2926
text-shadow: none !important
3027
filter: none !important
3128
-ms-filter: none !important
29+
a, a:visited
30+
text-decoration: underline
3231
a[href]:after
3332
content: " (" attr(href) ")"
3433
abbr[title]:after
@@ -40,7 +39,7 @@
4039
border: 1px solid #999
4140
page-break-inside: avoid
4241
thead
43-
// css-discuss.incutio.com/wiki/Printing_Tables
42+
// h5bp.com/t
4443
display: table-header-group
4544
tr, img
4645
page-break-inside: avoid

‎stylesheets/partials/h5bp/_nonsemantichelpers.sass

+6-6
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,22 @@
66
// For image replacement
77
.ir
88
display: block
9+
border: 0
910
text-indent: -999em
1011
overflow: hidden
12+
background-color: transparent
1113
background-repeat: no-repeat
1214
text-align: left
1315
direction: ltr
1416
br
1517
display: none
1618

17-
// Hide for both screenreaders and browsers:
18-
// css-discuss.incutio.com/wiki/Screenreader_Visibility
19+
// Hide from both screenreaders and browsers: h5bp.com/u
1920
.hidden
20-
display: none
21+
display: none !important
2122
visibility: hidden
2223

23-
// Hide only visually, but have it available for screenreaders: by Jon Neal.
24-
// www.webaim.org/techniques/css/invisiblecontent/ & j.mp/visuallyhidden
24+
// Hide only visually, but have it available for screenreaders: h5bp.com/v
2525
.visuallyhidden
2626
border: 0
2727
clip: rect(0 0 0 0)
@@ -32,7 +32,7 @@
3232
position: absolute
3333
width: 1px
3434

35-
// Extends the .visuallyhidden class to allow the element to be focusable when navigated to via the keyboard: drupal.org/node/897638
35+
// Extends the .visuallyhidden class to allow the element to be focusable when navigated to via the keyboard: h5bp.com/p
3636
&.focusable:active, &.focusable:focus
3737
clip: auto
3838
height: auto

‎stylesheets/screen.sass

+4-3
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@
55
@import "compass"
66

77
// HTML5 Boilerplate Colors - uncomment to override defaults
8-
// $h5bp-text-selection: #FF5E99
9-
// $h5bp-webkit-tap: #FF5E99
8+
// $h5bp-text-selection: #fe57a1
9+
// $h5bp-webkit-tap: #fe57a1
1010
// $h5bp-link: #00e
11-
// $h5bp-visited-link: #551a8b
11+
// $h5bp-link-hover: #06e
12+
// $h5bp-link-visited: #551a8b
1213
1314
@import "partials/h5bp/main"
1415

0 commit comments

Comments
 (0)
Please sign in to comment.