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.
- 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
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -1,10 +1,7 @@
|
|
1
1
|
Compass H5bp
|
2
2
|
=========================
|
3
3
|
|
4
|
-
This is a Compass extension of Html5 mixins extracted from
|
5
|
-
by Paul Irish and Divya Manian. This gem provides only the CSS mixins and not the
|
6
|
-
html or javascript templates. This makes sense because any implementation of
|
7
|
-
Html5 Boilerplate should be specific to the language and framework it's built on.
|
4
|
+
This is a Compass extension of Html5 mixins extracted from v4 of [Html5 Boilerplate](http://html5boilerplate.com). This gem provides only the CSS mixins and not the html or javascript templates. This makes sense because any implementation of Html5 Boilerplate should be specific to the language and framework it's built on.
|
8
5
|
|
9
6
|
Browse [html5boilerplate.com](http://html5boilerplate.com) for the full workup.
|
10
7
|
|
@@ -36,8 +33,13 @@ compass library before you can use any of the mixins:
|
|
36
33
|
Then include the mixins that make up the Normalize portion of Html5
|
37
34
|
Boilerplate's styles. http://necolas.github.com/normalize.css
|
38
35
|
|
36
|
+
You can include all of Normalize at once:
|
37
|
+
|
38
|
+
@include h5bp-normalize;
|
39
|
+
|
40
|
+
Or pull in only the portions of Normalize you want:
|
41
|
+
|
39
42
|
@include h5bp-display;
|
40
|
-
@include h5bp-selection;
|
41
43
|
@include h5bp-base;
|
42
44
|
@include h5bp-links;
|
43
45
|
@include h5bp-typography;
|
@@ -47,16 +49,20 @@ Boilerplate's styles. http://necolas.github.com/normalize.css
|
|
47
49
|
@include h5bp-forms;
|
48
50
|
@include h5bp-tables;
|
49
51
|
|
50
|
-
|
52
|
+
Next you can include the opinionated default base styles:
|
51
53
|
|
52
|
-
|
53
|
-
|
54
|
-
@include h5bp-helpers;
|
54
|
+
@include h5bp-base-styles;
|
55
55
|
|
56
56
|
You can include the default Html5 Boilerplate Chrome Frame notification styling:
|
57
57
|
|
58
58
|
@include h5bp-chromeframe;
|
59
59
|
|
60
|
+
Now you can define your own custom CSS here.
|
61
|
+
|
62
|
+
Then (optionally) let H5bp define some semantic helper classes. (e.g. `.clearfix`):
|
63
|
+
|
64
|
+
@include h5bp-helpers;
|
65
|
+
|
60
66
|
Finally, you can include H5bp's predefined print style media query:
|
61
67
|
|
62
68
|
@include h5bp-media;
|
data/compass-h5bp.gemspec
CHANGED
@@ -9,8 +9,8 @@ Gem::Specification.new do |s|
|
|
9
9
|
s.authors = ["Peter Gumeson"]
|
10
10
|
s.email = ["gumeson@gmail.com"]
|
11
11
|
s.homepage = "http://rubygems.org/gems/compass-h5bp"
|
12
|
-
s.summary = %q{ Compass extension for Html5 Boilerplate
|
13
|
-
s.description = %q{ Compass extension of Html5 mixins extracted from
|
12
|
+
s.summary = %q{ Compass extension for Html5 Boilerplate v4.0 }
|
13
|
+
s.description = %q{ Compass extension of Html5 mixins extracted from v4 of the Html5 Boilerplate project (h5bp.com) }
|
14
14
|
|
15
15
|
s.rubyforge_project = "compass-h5bp"
|
16
16
|
|
data/lib/compass/h5bp/version.rb
CHANGED
data/stylesheets/_h5bp.scss
CHANGED
@@ -3,10 +3,8 @@
|
|
3
3
|
// What follows is the result of much research on cross-browser styling.
|
4
4
|
// Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
|
5
5
|
// Kroc Camen, and the H5BP dev community and team.
|
6
|
-
//
|
7
|
-
// Detailed information about this CSS: h5bp.com/css
|
8
6
|
|
9
7
|
@import "h5bp/normalize";
|
10
|
-
@import "h5bp/
|
8
|
+
@import "h5bp/main";
|
11
9
|
@import "h5bp/helpers";
|
12
10
|
@import "h5bp/media";
|
@@ -1,7 +1,2 @@
|
|
1
|
-
//
|
2
|
-
|
3
|
-
//
|
4
|
-
|
5
|
-
@mixin h5bp-chromeframe {
|
6
|
-
.chromeframe { margin: 0.2em 0; background: #ccc; color: black; padding: 0.2em 0; }
|
7
|
-
}
|
1
|
+
// Deprecation warning
|
2
|
+
@warn "The chromeframe mixin has moved to _main.scss file starting with Boilerplate version 4.0";
|
@@ -1,5 +1,5 @@
|
|
1
1
|
//
|
2
|
-
//
|
2
|
+
// Helper classes
|
3
3
|
//
|
4
4
|
|
5
5
|
@mixin h5bp-helpers {
|
@@ -16,14 +16,25 @@
|
|
16
16
|
|
17
17
|
}
|
18
18
|
|
19
|
-
//
|
19
|
+
// Image replacement
|
20
20
|
@mixin image-replacement($img: none, $x: 50%, $y: 50%) {
|
21
|
-
|
21
|
+
background-color: transparent;
|
22
|
+
border: 0;
|
23
|
+
overflow: hidden;
|
24
|
+
// IE 6/7 fallback
|
25
|
+
*text-indent: -9999px;
|
26
|
+
|
27
|
+
&:before {
|
28
|
+
content: "";
|
29
|
+
display: block;
|
30
|
+
width: 0;
|
31
|
+
height: 100%;
|
32
|
+
}
|
33
|
+
|
22
34
|
@if $img != none {
|
23
35
|
background-image: image-url($img);
|
24
36
|
background-position: $x $y;
|
25
37
|
}
|
26
|
-
br { display: none; }
|
27
38
|
}
|
28
39
|
|
29
40
|
// Uses image dimensions
|
@@ -41,18 +52,56 @@
|
|
41
52
|
|
42
53
|
// Hide only visually, but have it available for screenreaders: h5bp.com/v
|
43
54
|
@mixin visually-hidden {
|
44
|
-
border: 0;
|
45
|
-
|
46
|
-
|
55
|
+
border: 0;
|
56
|
+
clip: rect(0 0 0 0);
|
57
|
+
height: 1px;
|
58
|
+
margin: -1px;
|
59
|
+
overflow: hidden;
|
60
|
+
padding: 0;
|
61
|
+
position: absolute;
|
62
|
+
width: 1px;
|
63
|
+
|
64
|
+
// Extends the .visuallyhidden class to allow the element to be focusable
|
65
|
+
// when navigated to via the keyboard: h5bp.com/p
|
66
|
+
&.focusable:active,
|
67
|
+
&.focusable:focus {
|
68
|
+
clip: auto;
|
69
|
+
height: auto;
|
70
|
+
margin: 0;
|
71
|
+
overflow: visible;
|
72
|
+
position: static;
|
73
|
+
width: auto;
|
47
74
|
}
|
48
75
|
}
|
49
76
|
|
50
77
|
// Hide visually and from screenreaders, but maintain layout
|
51
|
-
@mixin invisible {
|
78
|
+
@mixin invisible {
|
79
|
+
visibility: hidden;
|
80
|
+
}
|
52
81
|
|
53
|
-
//
|
82
|
+
// Clearfix: contain floats
|
83
|
+
//
|
84
|
+
// For modern browsers
|
85
|
+
// 1. The space content is one way to avoid an Opera bug when the
|
86
|
+
// `contenteditable` attribute is included anywhere else in the document.
|
87
|
+
// Otherwise it causes space to appear at the top and bottom of elements
|
88
|
+
// that receive the `clearfix` class.
|
89
|
+
// 2. The use of `table` rather than `block` is only necessary if using
|
90
|
+
// `:before` to contain the top-margins of child elements.
|
54
91
|
@mixin micro-clearfix {
|
55
|
-
&:before,
|
56
|
-
&:after {
|
57
|
-
|
92
|
+
&:before,
|
93
|
+
&:after {
|
94
|
+
content: " "; // 1
|
95
|
+
display: table; // 2
|
96
|
+
}
|
97
|
+
|
98
|
+
&:after {
|
99
|
+
clear: both;
|
100
|
+
}
|
101
|
+
|
102
|
+
// For IE 6/7 only
|
103
|
+
// Include this rule to trigger hasLayout and contain floats.
|
104
|
+
& {
|
105
|
+
*zoom: 1;
|
106
|
+
}
|
58
107
|
}
|
@@ -0,0 +1,83 @@
|
|
1
|
+
$line-height: 1.4 !default;
|
2
|
+
$font-color: #222 !default;
|
3
|
+
$font-family: sans-serif !default;
|
4
|
+
$font-size: 1em !default;
|
5
|
+
$selected-font-color: #fff !default;
|
6
|
+
$selected-background-color: #b3d4fc !default;
|
7
|
+
|
8
|
+
@mixin h5bp-main {
|
9
|
+
@include h5bp-base-styles;
|
10
|
+
@include h5bp-chromeframe;
|
11
|
+
}
|
12
|
+
|
13
|
+
//
|
14
|
+
// Base styles: opinionated defaults
|
15
|
+
//
|
16
|
+
@mixin h5bp-base-styles {
|
17
|
+
|
18
|
+
html,
|
19
|
+
button,
|
20
|
+
input,
|
21
|
+
select,
|
22
|
+
textarea {
|
23
|
+
color: $font-color;
|
24
|
+
}
|
25
|
+
|
26
|
+
body {
|
27
|
+
font-size: $font-size;
|
28
|
+
line-height: $line-height;
|
29
|
+
}
|
30
|
+
|
31
|
+
// Remove text-shadow in selection highlight: h5bp.com/i
|
32
|
+
// These selection declarations have to be separate.
|
33
|
+
// Customize the background color to match your design.
|
34
|
+
::-moz-selection {
|
35
|
+
background: $selected-background-color;
|
36
|
+
text-shadow: none;
|
37
|
+
}
|
38
|
+
|
39
|
+
::selection {
|
40
|
+
background: $selected-background-color;
|
41
|
+
text-shadow: none;
|
42
|
+
}
|
43
|
+
|
44
|
+
// A better looking default horizontal rule
|
45
|
+
hr {
|
46
|
+
display: block;
|
47
|
+
height: 1px;
|
48
|
+
border: 0;
|
49
|
+
border-top: 1px solid #ccc;
|
50
|
+
margin: 1em 0;
|
51
|
+
padding: 0;
|
52
|
+
}
|
53
|
+
|
54
|
+
// Remove the gap between images and the bottom of their containers: h5bp.com/i/440
|
55
|
+
img {
|
56
|
+
vertical-align: middle;
|
57
|
+
}
|
58
|
+
|
59
|
+
// Remove default fieldset styles.
|
60
|
+
fieldset {
|
61
|
+
border: 0;
|
62
|
+
margin: 0;
|
63
|
+
padding: 0;
|
64
|
+
}
|
65
|
+
|
66
|
+
// Allow only vertical resizing of textareas.
|
67
|
+
textarea {
|
68
|
+
resize: vertical;
|
69
|
+
}
|
70
|
+
}
|
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
|
+
}
|
@@ -8,16 +8,68 @@
|
|
8
8
|
}
|
9
9
|
|
10
10
|
@mixin h5bp-media-print {
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
11
|
+
* {
|
12
|
+
background: transparent !important;
|
13
|
+
color: #000 !important; // Black prints faster: h5bp.com/s
|
14
|
+
box-shadow:none !important;
|
15
|
+
text-shadow: none !important;
|
16
|
+
}
|
17
|
+
|
18
|
+
a,
|
19
|
+
a:visited {
|
20
|
+
text-decoration: underline;
|
21
|
+
}
|
22
|
+
|
23
|
+
a[href]:after {
|
24
|
+
content: " (" attr(href) ")";
|
25
|
+
}
|
26
|
+
|
27
|
+
abbr[title]:after {
|
28
|
+
content: " (" attr(title) ")";
|
29
|
+
}
|
30
|
+
|
31
|
+
//
|
32
|
+
// Don't show links for images, or javascript/internal links
|
33
|
+
//
|
34
|
+
|
35
|
+
.ir a:after,
|
36
|
+
a[href^="javascript:"]:after,
|
37
|
+
a[href^="#"]:after {
|
38
|
+
content: "";
|
39
|
+
}
|
40
|
+
|
41
|
+
pre,
|
42
|
+
blockquote {
|
43
|
+
border: 1px solid #999;
|
44
|
+
page-break-inside: avoid;
|
45
|
+
}
|
46
|
+
|
47
|
+
thead {
|
48
|
+
display: table-header-group; // h5bp.com/t
|
49
|
+
}
|
50
|
+
|
51
|
+
tr,
|
52
|
+
img {
|
53
|
+
page-break-inside: avoid;
|
54
|
+
}
|
55
|
+
|
56
|
+
img {
|
57
|
+
max-width: 100% !important;
|
58
|
+
}
|
59
|
+
|
60
|
+
@page {
|
61
|
+
margin: 0.5cm;
|
62
|
+
}
|
63
|
+
|
64
|
+
p,
|
65
|
+
h2,
|
66
|
+
h3 {
|
67
|
+
orphans: 3;
|
68
|
+
widows: 3;
|
69
|
+
}
|
70
|
+
|
71
|
+
h2,
|
72
|
+
h3 {
|
73
|
+
page-break-after: avoid;
|
74
|
+
}
|
23
75
|
}
|
@@ -1,23 +1,10 @@
|
|
1
1
|
//
|
2
|
-
// Normalize
|
2
|
+
// Normalize v1.0.1 | MIT License | git.io/normalize
|
3
3
|
//
|
4
4
|
|
5
|
-
$line-height: 1.4 !default;
|
6
|
-
$font-color: #222 !default;
|
7
|
-
$font-family: sans-serif !default;
|
8
|
-
$font-size: 1em !default;
|
9
|
-
$link-color: #00e !default;
|
10
|
-
$link-hover-color: #06e !default;
|
11
|
-
$link-visited-color: #551a8b !default;
|
12
|
-
$selected-font-color: #fff !default;
|
13
|
-
$selected-background-color: #fe57a1 !default;
|
14
|
-
$invalid-background-color: #f0dddd !default;
|
15
|
-
|
16
|
-
|
17
5
|
@mixin h5bp-normalize {
|
18
6
|
@include h5bp-display;
|
19
7
|
@include h5bp-base;
|
20
|
-
@include h5bp-selection;
|
21
8
|
@include h5bp-links;
|
22
9
|
@include h5bp-typography;
|
23
10
|
@include h5bp-lists;
|
@@ -31,10 +18,43 @@ $invalid-background-color: #f0dddd !default;
|
|
31
18
|
// Html5 display definitions
|
32
19
|
@mixin h5bp-display {
|
33
20
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
21
|
+
// Corrects `block` display not defined in IE 6/7/8/9 and Firefox 3.
|
22
|
+
article,
|
23
|
+
aside,
|
24
|
+
details,
|
25
|
+
figcaption,
|
26
|
+
figure,
|
27
|
+
footer,
|
28
|
+
header,
|
29
|
+
hgroup,
|
30
|
+
nav,
|
31
|
+
section,
|
32
|
+
summary {
|
33
|
+
display: block;
|
34
|
+
}
|
35
|
+
|
36
|
+
// Corrects `inline-block` display not defined in IE 6/7/8/9 and Firefox 3.
|
37
|
+
audio,
|
38
|
+
canvas,
|
39
|
+
video {
|
40
|
+
display: inline-block;
|
41
|
+
*display: inline;
|
42
|
+
*zoom: 1;
|
43
|
+
}
|
44
|
+
|
45
|
+
// Prevents modern browsers from displaying `audio` without controls.
|
46
|
+
// Remove excess height in iOS 5 devices.
|
47
|
+
audio:not([controls]) {
|
48
|
+
display: none;
|
49
|
+
height: 0;
|
50
|
+
}
|
51
|
+
|
52
|
+
// Addresses styling for `hidden` attribute not present in IE 7/8/9, Firefox 3,
|
53
|
+
// and Safari 4.
|
54
|
+
// Known issue: no IE 6 support.
|
55
|
+
[hidden] {
|
56
|
+
display: none;
|
57
|
+
}
|
38
58
|
|
39
59
|
}
|
40
60
|
|
@@ -42,39 +62,53 @@ $invalid-background-color: #f0dddd !default;
|
|
42
62
|
// Base
|
43
63
|
@mixin h5bp-base {
|
44
64
|
|
45
|
-
// 1.
|
46
|
-
//
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
65
|
+
// 1. Corrects text resizing oddly in IE 6/7 when body `font-size` is set using
|
66
|
+
// `em` units.
|
67
|
+
// 2. Prevents iOS text size adjust after orientation change, without disabling
|
68
|
+
// user zoom.
|
69
|
+
html {
|
70
|
+
font-size: 100%; // 1
|
71
|
+
-webkit-text-size-adjust: 100%; // 2
|
72
|
+
-ms-text-size-adjust: 100%; // 2
|
73
|
+
}
|
74
|
+
|
75
|
+
// Addresses `font-family` inconsistency between `textarea` and other form
|
76
|
+
// elements.
|
77
|
+
|
78
|
+
html,
|
79
|
+
button,
|
80
|
+
input,
|
81
|
+
select,
|
82
|
+
textarea {
|
83
|
+
font-family: sans-serif;
|
84
|
+
}
|
85
|
+
|
86
|
+
// Addresses margins handled incorrectly in IE 6/7.
|
87
|
+
|
88
|
+
body {
|
89
|
+
margin: 0;
|
90
|
+
}
|
53
91
|
|
54
92
|
}
|
55
93
|
|
94
|
+
// Deprecation
|
56
95
|
@mixin h5bp-selection {
|
57
|
-
|
58
|
-
// Remove text-shadow in selection highlight: h5bp.com/i
|
59
|
-
// These selection declarations have to be separate
|
60
|
-
// Also: hot pink! (or customize the background color to match your design)
|
61
|
-
|
62
|
-
::-moz-selection { background: $selected-background-color; color: $selected-font-color; text-shadow: none; }
|
63
|
-
::selection { background: $selected-background-color; color: $selected-font-color; text-shadow: none; }
|
64
|
-
|
96
|
+
@warn "The selection mixin has been removed. The selection code is in the h5bp-base-styles mixin starting with Boilerplate version 4.0.";
|
65
97
|
}
|
66
98
|
|
67
|
-
|
68
99
|
// Links
|
69
100
|
@mixin h5bp-links {
|
70
101
|
|
71
|
-
|
72
|
-
a:
|
73
|
-
|
74
|
-
|
102
|
+
// Addresses `outline` inconsistency between Chrome and other browsers.
|
103
|
+
a:focus {
|
104
|
+
outline: thin dotted;
|
105
|
+
}
|
75
106
|
|
76
|
-
//
|
77
|
-
a:
|
107
|
+
// Improves readability when focused and also mouse hovered in all browsers.
|
108
|
+
a:active,
|
109
|
+
a:hover {
|
110
|
+
outline: 0;
|
111
|
+
}
|
78
112
|
|
79
113
|
}
|
80
114
|
|
@@ -82,35 +116,121 @@ $invalid-background-color: #f0dddd !default;
|
|
82
116
|
// Typography
|
83
117
|
@mixin h5bp-typography {
|
84
118
|
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
119
|
+
// Addresses font sizes and margins set differently in IE 6/7.
|
120
|
+
// Addresses font sizes within `section` and `article` in Firefox 4+, Safari 5,
|
121
|
+
// and Chrome.
|
122
|
+
h1 {
|
123
|
+
font-size: 2em;
|
124
|
+
margin: 0.67em 0;
|
125
|
+
}
|
126
|
+
|
127
|
+
h2 {
|
128
|
+
font-size: 1.5em;
|
129
|
+
margin: 0.83em 0;
|
130
|
+
}
|
131
|
+
|
132
|
+
h3 {
|
133
|
+
font-size: 1.17em;
|
134
|
+
margin: 1em 0;
|
135
|
+
}
|
136
|
+
|
137
|
+
h4 {
|
138
|
+
font-size: 1em;
|
139
|
+
margin: 1.33em 0;
|
140
|
+
}
|
141
|
+
|
142
|
+
h5 {
|
143
|
+
font-size: 0.83em;
|
144
|
+
margin: 1.67em 0;
|
145
|
+
}
|
146
|
+
|
147
|
+
h6 {
|
148
|
+
font-size: 0.75em;
|
149
|
+
margin: 2.33em 0;
|
150
|
+
}
|
151
|
+
|
152
|
+
// Addresses styling not present in IE 7/8/9, Safari 5, and Chrome.
|
153
|
+
abbr[title] {
|
154
|
+
border-bottom: 1px dotted;
|
155
|
+
}
|
156
|
+
|
157
|
+
// Addresses style set to `bolder` in Firefox 3+, Safari 4/5, and Chrome.
|
158
|
+
b,
|
159
|
+
strong {
|
160
|
+
font-weight: bold;
|
161
|
+
}
|
162
|
+
|
163
|
+
blockquote {
|
164
|
+
margin: 1em 40px;
|
165
|
+
}
|
166
|
+
|
167
|
+
// Addresses styling not present in Safari 5 and Chrome.
|
168
|
+
dfn {
|
169
|
+
font-style: italic;
|
170
|
+
}
|
171
|
+
|
172
|
+
// Addresses styling not present in IE 6/7/8/9.
|
173
|
+
mark {
|
174
|
+
background: #ff0;
|
175
|
+
color: #000;
|
176
|
+
}
|
177
|
+
|
178
|
+
// Addresses margins set differently in IE 6/7.
|
179
|
+
p,
|
180
|
+
pre {
|
181
|
+
margin: 1em 0;
|
182
|
+
}
|
183
|
+
|
184
|
+
// Corrects font family set oddly in IE 6, Safari 4/5, and Chrome.
|
185
|
+
code,
|
186
|
+
kbd,
|
187
|
+
pre,
|
188
|
+
samp {
|
189
|
+
font-family: monospace, serif;
|
190
|
+
_font-family: 'courier new', monospace;
|
191
|
+
font-size: 1em;
|
192
|
+
}
|
193
|
+
|
194
|
+
// Improves readability of pre-formatted text in all browsers.
|
195
|
+
pre {
|
196
|
+
white-space: pre;
|
197
|
+
white-space: pre-wrap;
|
198
|
+
word-wrap: break-word;
|
199
|
+
}
|
200
|
+
|
201
|
+
// Addresses CSS quotes not supported in IE 6/7.
|
202
|
+
q {
|
203
|
+
quotes: none;
|
204
|
+
}
|
205
|
+
|
206
|
+
// Addresses `quotes` property not supported in Safari 4.
|
207
|
+
q:before,
|
208
|
+
q:after {
|
209
|
+
content: '';
|
210
|
+
content: none;
|
211
|
+
}
|
212
|
+
|
213
|
+
// Addresses inconsistent and variable font size in all browsers.
|
214
|
+
small {
|
215
|
+
font-size: 80%;
|
216
|
+
}
|
217
|
+
|
218
|
+
// Prevents `sub` and `sup` affecting `line-height` in all browsers.
|
219
|
+
sub,
|
220
|
+
sup {
|
221
|
+
font-size: 75%;
|
222
|
+
line-height: 0;
|
223
|
+
position: relative;
|
224
|
+
vertical-align: baseline;
|
225
|
+
}
|
226
|
+
|
227
|
+
sup {
|
228
|
+
top: -0.5em;
|
229
|
+
}
|
230
|
+
|
231
|
+
sub {
|
232
|
+
bottom: -0.25em;
|
233
|
+
}
|
114
234
|
|
115
235
|
}
|
116
236
|
|
@@ -118,9 +238,24 @@ $invalid-background-color: #f0dddd !default;
|
|
118
238
|
// Lists
|
119
239
|
@mixin h5bp-lists {
|
120
240
|
|
121
|
-
|
122
|
-
|
123
|
-
|
241
|
+
// Addresses margins set differently in IE 6/7.
|
242
|
+
dl,
|
243
|
+
menu,
|
244
|
+
ol,
|
245
|
+
ul {
|
246
|
+
margin: 1em 0;
|
247
|
+
}
|
248
|
+
|
249
|
+
dd {
|
250
|
+
margin: 0 0 0 40px;
|
251
|
+
}
|
252
|
+
|
253
|
+
// Addresses paddings set differently in IE 6/7.
|
254
|
+
menu,
|
255
|
+
ol,
|
256
|
+
ul {
|
257
|
+
padding: 0 0 0 40px;
|
258
|
+
}
|
124
259
|
|
125
260
|
}
|
126
261
|
|
@@ -128,14 +263,17 @@ $invalid-background-color: #f0dddd !default;
|
|
128
263
|
// Embedded content
|
129
264
|
@mixin h5bp-embeds {
|
130
265
|
|
131
|
-
// 1.
|
132
|
-
// 2.
|
133
|
-
|
134
|
-
|
266
|
+
// 1. Removes border when inside `a` element in IE 6/7/8/9 and Firefox 3.
|
267
|
+
// 2. Improves image quality when scaled in IE 7.
|
268
|
+
img {
|
269
|
+
border: 0; /* 1 */
|
270
|
+
-ms-interpolation-mode: bicubic; /* 2 */
|
271
|
+
}
|
135
272
|
|
136
|
-
//
|
137
|
-
|
138
|
-
|
273
|
+
// Corrects overflow displayed oddly in IE 9.
|
274
|
+
svg:not(:root) {
|
275
|
+
overflow: hidden;
|
276
|
+
}
|
139
277
|
|
140
278
|
}
|
141
279
|
|
@@ -143,7 +281,10 @@ $invalid-background-color: #f0dddd !default;
|
|
143
281
|
// Figures
|
144
282
|
@mixin h5bp-figures {
|
145
283
|
|
146
|
-
|
284
|
+
// Addresses margin not present in IE 6/7/8/9, Safari 5, and Opera 11.
|
285
|
+
figure {
|
286
|
+
margin: 0;
|
287
|
+
}
|
147
288
|
|
148
289
|
}
|
149
290
|
|
@@ -151,55 +292,112 @@ $invalid-background-color: #f0dddd !default;
|
|
151
292
|
// Forms
|
152
293
|
@mixin h5bp-forms {
|
153
294
|
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
//
|
201
|
-
|
202
|
-
|
295
|
+
// Corrects margin displayed oddly in IE 6/7.
|
296
|
+
form {
|
297
|
+
margin: 0;
|
298
|
+
}
|
299
|
+
|
300
|
+
// Define consistent border, margin, and padding.
|
301
|
+
fieldset {
|
302
|
+
border: 1px solid #c0c0c0;
|
303
|
+
margin: 0 2px;
|
304
|
+
padding: 0.35em 0.625em 0.75em;
|
305
|
+
}
|
306
|
+
|
307
|
+
// 1. Corrects color not being inherited in IE 6/7/8/9.
|
308
|
+
// 2. Corrects text not wrapping in Firefox 3.
|
309
|
+
// 3. Corrects alignment displayed oddly in IE 6/7.
|
310
|
+
legend {
|
311
|
+
border: 0; // 1
|
312
|
+
padding: 0;
|
313
|
+
white-space: normal; // 2
|
314
|
+
*margin-left: -7px; // 3
|
315
|
+
}
|
316
|
+
|
317
|
+
// 1. Corrects font size not being inherited in all browsers.
|
318
|
+
// 2. Addresses margins set differently in IE 6/7, Firefox 3+, Safari 5,
|
319
|
+
// and Chrome.
|
320
|
+
// 3. Improves appearance and consistency in all browsers.button,
|
321
|
+
input,
|
322
|
+
select,
|
323
|
+
textarea {
|
324
|
+
font-size: 100%; // 1
|
325
|
+
margin: 0; // 2
|
326
|
+
vertical-align: baseline; // 3
|
327
|
+
*vertical-align: middle; // 3
|
328
|
+
}
|
329
|
+
|
330
|
+
// Addresses Firefox 3+ setting `line-height` on `input` using `!important` in
|
331
|
+
// the UA stylesheet.
|
332
|
+
button,
|
333
|
+
input {
|
334
|
+
line-height: normal;
|
335
|
+
}
|
336
|
+
|
337
|
+
// 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
|
338
|
+
// and `video` controls.
|
339
|
+
// 2. Corrects inability to style clickable `input` types in iOS.
|
340
|
+
// 3. Improves usability and consistency of cursor style between image-type
|
341
|
+
// `input` and others.
|
342
|
+
// 4. Removes inner spacing in IE 7 without affecting normal text inputs.
|
343
|
+
// Known issue: inner spacing remains in IE 6.
|
344
|
+
button,
|
345
|
+
html input[type="button"], // 1
|
346
|
+
input[type="reset"],
|
347
|
+
input[type="submit"] {
|
348
|
+
-webkit-appearance: button; // 2
|
349
|
+
cursor: pointer; // 3
|
350
|
+
*overflow: visible; // 4
|
351
|
+
}
|
352
|
+
|
353
|
+
// Re-set default cursor for disabled elements.
|
354
|
+
button[disabled],
|
355
|
+
input[disabled] {
|
356
|
+
cursor: default;
|
357
|
+
}
|
358
|
+
|
359
|
+
// 1. Addresses box sizing set to content-box in IE 8/9.
|
360
|
+
// 2. Removes excess padding in IE 8/9.
|
361
|
+
// 3. Removes excess padding in IE 7.
|
362
|
+
// Known issue: excess padding remains in IE 6.
|
363
|
+
input[type="checkbox"],
|
364
|
+
input[type="radio"] {
|
365
|
+
box-sizing: border-box; // 1
|
366
|
+
padding: 0; // 2
|
367
|
+
*height: 13px; // 3
|
368
|
+
*width: 13px; // 3
|
369
|
+
}
|
370
|
+
|
371
|
+
// 1. Addresses `appearance` set to `searchfield` in Safari 5 and Chrome.
|
372
|
+
// 2. Addresses `box-sizing` set to `border-box` in Safari 5 and Chrome
|
373
|
+
// (include `-moz` to future-proof).
|
374
|
+
input[type="search"] {
|
375
|
+
-webkit-appearance: textfield; // 1
|
376
|
+
-moz-box-sizing: content-box;
|
377
|
+
-webkit-box-sizing: content-box; // 2
|
378
|
+
box-sizing: content-box;
|
379
|
+
}
|
380
|
+
|
381
|
+
// Removes inner padding and search cancel button in Safari 5 and Chrome
|
382
|
+
// on OS X.
|
383
|
+
input[type="search"]::-webkit-search-cancel-button,
|
384
|
+
input[type="search"]::-webkit-search-decoration {
|
385
|
+
-webkit-appearance: none;
|
386
|
+
}
|
387
|
+
|
388
|
+
// Removes inner padding and border in Firefox 3+.
|
389
|
+
button::-moz-focus-inner,
|
390
|
+
input::-moz-focus-inner {
|
391
|
+
border: 0;
|
392
|
+
padding: 0;
|
393
|
+
}
|
394
|
+
|
395
|
+
// 1. Removes default vertical scrollbar in IE 6/7/8/9.
|
396
|
+
// 2. Improves readability and alignment in all browsers.
|
397
|
+
textarea {
|
398
|
+
overflow: auto; // 1
|
399
|
+
vertical-align: top; // 2
|
400
|
+
}
|
203
401
|
|
204
402
|
}
|
205
403
|
|
@@ -207,7 +405,10 @@ $invalid-background-color: #f0dddd !default;
|
|
207
405
|
// Tables
|
208
406
|
@mixin h5bp-tables {
|
209
407
|
|
210
|
-
|
211
|
-
|
408
|
+
// Remove most spacing between table cells.
|
409
|
+
table {
|
410
|
+
border-collapse: collapse;
|
411
|
+
border-spacing: 0;
|
412
|
+
}
|
212
413
|
|
213
414
|
}
|