shoulders 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/shoulders.rb +11 -0
- data/stylesheets/_shoulders.scss +9 -0
- data/stylesheets/shoulders/_border-box.scss +9 -0
- data/stylesheets/shoulders/_fluid-media.scss +49 -0
- data/stylesheets/shoulders/_progressive-enhancement.scss +48 -0
- data/stylesheets/shoulders/_selectors.scss +22 -0
- data/stylesheets/shoulders/_triangle.scss +43 -0
- data/stylesheets/shoulders/_units.scss +66 -0
- data/stylesheets/shoulders/_vertical-center.scss +20 -0
- data/templates/project/_base-all.scss +7 -0
- data/templates/project/_elements.scss +486 -0
- data/templates/project/_extendables.scss +2 -0
- data/templates/project/_functions.scss +6 -0
- data/templates/project/_layout-all.scss +1 -0
- data/templates/project/_mixins.scss +2 -0
- data/templates/project/_module-all.scss +1 -0
- data/templates/project/_settings.scss +36 -0
- data/templates/project/_utilities.scss +2 -0
- data/templates/project/_variables.scss +0 -0
- data/templates/project/config.rb.erb +19 -0
- data/templates/project/editorconfig.txt +17 -0
- data/templates/project/gitignore.txt +1 -0
- data/templates/project/index.html +26 -0
- data/templates/project/jquery-1.8.3.min.js +2 -0
- data/templates/project/manifest.rb +43 -0
- data/templates/project/modernizr.custom.js +4 -0
- data/templates/project/oldie.scss +11 -0
- data/templates/project/scripts.js +0 -0
- data/templates/project/style.scss +10 -0
- metadata +90 -0
data/lib/shoulders.rb
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
require 'compass'
|
2
|
+
|
3
|
+
extension_path = File.expand_path(File.join(File.dirname(__FILE__), ".."))
|
4
|
+
Compass::Frameworks.register('shoulders', :path => extension_path)
|
5
|
+
|
6
|
+
module Sass::Script::Functions
|
7
|
+
def str_replace(needle, replace, haystack)
|
8
|
+
result = haystack.value.gsub(needle.value, replace.value)
|
9
|
+
Sass::Script::String.new(result)
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
@import "compass";
|
2
|
+
|
3
|
+
@import "shoulders/border-box";
|
4
|
+
@import "shoulders/fluid-media";
|
5
|
+
@import "shoulders/progressive-enhancement";
|
6
|
+
@import "shoulders/selectors";
|
7
|
+
@import "shoulders/triangle";
|
8
|
+
@import "shoulders/units";
|
9
|
+
@import "shoulders/vertical-center";
|
@@ -0,0 +1,49 @@
|
|
1
|
+
// Fluid Embeds and whatever WITH NO JAVASCIPT!
|
2
|
+
$intrinsic-ratio: 16/9 !default;
|
3
|
+
$intrinsic-ratio-width: 100% !default;
|
4
|
+
$intrinsic-ratio-elements: '*' !default;
|
5
|
+
$intrinsic-ratio-extend: true !default;
|
6
|
+
|
7
|
+
@mixin intrinsic-ratio-parent {
|
8
|
+
position: relative;
|
9
|
+
height: 0;
|
10
|
+
}
|
11
|
+
|
12
|
+
@mixin intrinsic-ratio-child {
|
13
|
+
display: block;
|
14
|
+
position: absolute;
|
15
|
+
width: 100% !important; // Nuke the external styles
|
16
|
+
height: 100% !important; // Nuke the external styles
|
17
|
+
top: 0;
|
18
|
+
margin: 0;
|
19
|
+
padding: 0;
|
20
|
+
}
|
21
|
+
|
22
|
+
@mixin intrinsic-ratio($ratio: $intrinsic-ratio, $width: $intrinsic-ratio-width, $elements: $intrinsic-ratio-elements, $extend: $intrinsic-ratio-extend) {
|
23
|
+
@if not $extend {
|
24
|
+
@include intrinsic-ratio-parent;
|
25
|
+
}
|
26
|
+
@else {
|
27
|
+
@extend %intrinsic-ratio-parent;
|
28
|
+
}
|
29
|
+
padding-top: (1 / $ratio) * $width;
|
30
|
+
width: $width;
|
31
|
+
@each $element in $elements {
|
32
|
+
> #{$element} {
|
33
|
+
@if not $extend {
|
34
|
+
@include intrinsic-ratio-child;
|
35
|
+
}
|
36
|
+
@else {
|
37
|
+
@extend %intrinsic-ratio-child;
|
38
|
+
}
|
39
|
+
}
|
40
|
+
}
|
41
|
+
}
|
42
|
+
|
43
|
+
%intrinsic-ratio-parent {
|
44
|
+
@include intrinsic-ratio-parent;
|
45
|
+
}
|
46
|
+
|
47
|
+
%intrinsic-ratio-child {
|
48
|
+
@include intrinsic-ratio-child;
|
49
|
+
}
|
@@ -0,0 +1,48 @@
|
|
1
|
+
/**
|
2
|
+
* Enhance From.
|
3
|
+
* Modernizr feature (base CSS class name)
|
4
|
+
*/
|
5
|
+
@mixin enhance-with($feature) {
|
6
|
+
.#{$feature} & {
|
7
|
+
@content;
|
8
|
+
}
|
9
|
+
}
|
10
|
+
|
11
|
+
/**
|
12
|
+
* Degrade From.
|
13
|
+
* Modernizr feature (base CSS class name)
|
14
|
+
*/
|
15
|
+
@mixin degrade-from($feature, $no-js: true) {
|
16
|
+
@if $feature == 'js' or not $no-js {
|
17
|
+
.no-#{$feature} & {
|
18
|
+
@content;
|
19
|
+
}
|
20
|
+
}
|
21
|
+
@else {
|
22
|
+
.no-#{$feature} &,
|
23
|
+
.no-js & {
|
24
|
+
@content;
|
25
|
+
}
|
26
|
+
}
|
27
|
+
}
|
28
|
+
|
29
|
+
/**
|
30
|
+
* Completely remove from the flow and screen readers.
|
31
|
+
*/
|
32
|
+
@mixin hidden {
|
33
|
+
display: none !important;
|
34
|
+
visibility: hidden !important;
|
35
|
+
}
|
36
|
+
|
37
|
+
/**
|
38
|
+
* Completely remove from the flow but leave available to screen readers.
|
39
|
+
*/
|
40
|
+
@mixin visible-hidden {
|
41
|
+
position: absolute !important;
|
42
|
+
overflow: hidden;
|
43
|
+
width: 1px;
|
44
|
+
height: 1px;
|
45
|
+
padding: 0;
|
46
|
+
border: 0;
|
47
|
+
clip: rect(1px, 1px, 1px, 1px);
|
48
|
+
}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
// nth-child() support for IE 7 and 8
|
2
|
+
@function nth-child($n) {
|
3
|
+
|
4
|
+
// If a single number for nth.
|
5
|
+
@if type-of($n) == number {
|
6
|
+
$nth-child: first-child;
|
7
|
+
@for $i from 2 through $n {
|
8
|
+
$nth-child: append($nth-child, #{"+*"});
|
9
|
+
}
|
10
|
+
@return #{":"}$nth-child;
|
11
|
+
}
|
12
|
+
|
13
|
+
// If a nth-child string, need to parse the string.
|
14
|
+
@else {
|
15
|
+
$n: nth(children-of-ie-nth($n), 1);
|
16
|
+
$nth-child: first-child;
|
17
|
+
@for $i from 2 through $n {
|
18
|
+
$nth-child: append($nth-child, #{"~*"});
|
19
|
+
}
|
20
|
+
@return #{":"}$nth-child;
|
21
|
+
}
|
22
|
+
}
|
@@ -0,0 +1,43 @@
|
|
1
|
+
// Draw triangles
|
2
|
+
@mixin triangle($color: #000, $height: 1em, $width: 1em, $angle: 0) {
|
3
|
+
|
4
|
+
// Offset 45deg to make each side start at 0
|
5
|
+
$deg: $angle + 45;
|
6
|
+
// If units, remove units
|
7
|
+
@if unit($deg) == deg {
|
8
|
+
$deg: $deg / 1deg;
|
9
|
+
}
|
10
|
+
// Shift to be on a scale from 0 to 90.
|
11
|
+
@while $deg > 90 {
|
12
|
+
$deg: $deg - 90;
|
13
|
+
}
|
14
|
+
@while $deg < 0 {
|
15
|
+
$deg: $deg + 90;
|
16
|
+
}
|
17
|
+
// Get a ratio of 90 to multiply by.
|
18
|
+
$deg: $deg / 90;
|
19
|
+
|
20
|
+
// Make sure metrics are reset
|
21
|
+
display: block;
|
22
|
+
width: 0;
|
23
|
+
height: 0;
|
24
|
+
border: 0 solid transparent;
|
25
|
+
|
26
|
+
// Run through sides
|
27
|
+
@if $angle <= 45 or $angle > 315 {
|
28
|
+
border-bottom-color: $color;
|
29
|
+
border-width: 0 ($width * abs($deg - 1)) $height ($width * $deg);
|
30
|
+
}
|
31
|
+
@if $angle > 45 and $angle <= 135 {
|
32
|
+
border-left-color: $color;
|
33
|
+
border-width: ($height * $deg) 0 ($height * abs($deg - 1)) $width;
|
34
|
+
}
|
35
|
+
@if $angle > 135 and $angle <= 225 {
|
36
|
+
border-top-color: $color;
|
37
|
+
border-width: $height ($width * $deg) 0 ($width * abs($deg - 1));
|
38
|
+
}
|
39
|
+
@if $angle > 225 and $angle <= 315 {
|
40
|
+
border-right-color: $color;
|
41
|
+
border-width: ($height * abs($deg - 1)) $width ($height * $deg) 0;
|
42
|
+
}
|
43
|
+
}
|
@@ -0,0 +1,66 @@
|
|
1
|
+
/**
|
2
|
+
* Convert pixel units to em.
|
3
|
+
*
|
4
|
+
* Example: margin-right: pem(16);
|
5
|
+
*/
|
6
|
+
@function pem($target-px, $context: $base-font-size) {
|
7
|
+
@return ($target-px / $context) * 1em;
|
8
|
+
}
|
9
|
+
|
10
|
+
/**
|
11
|
+
* Mixin that converts pixel values to em values for whatever property is passed to it.
|
12
|
+
*
|
13
|
+
* Example: @include pem("padding", 10px 0 2px 5px);
|
14
|
+
*/
|
15
|
+
@mixin pem($property, $px-values, $context: $base-font-size) {
|
16
|
+
// If there is only one (numeric) value, return the property/value line for it.
|
17
|
+
@if type-of($px-values) == "number" {
|
18
|
+
#{$property}: pem($px-values, $context);
|
19
|
+
}
|
20
|
+
@else {
|
21
|
+
// Create an empty list that we can dump values into
|
22
|
+
$pem-values: unquote("");
|
23
|
+
@each $value in $px-values {
|
24
|
+
// If the value is zero, return 0
|
25
|
+
@if $value == 0 {
|
26
|
+
$pem-values: append($pem-values, $value);
|
27
|
+
}
|
28
|
+
@else {
|
29
|
+
$pem-values: append($pem-values, pem($value, $context));
|
30
|
+
}
|
31
|
+
}
|
32
|
+
// Return the property and its list of converted values
|
33
|
+
#{$property}: $pem-values;
|
34
|
+
}
|
35
|
+
}
|
36
|
+
|
37
|
+
/**
|
38
|
+
* Mixin that converts pixel values to rem values for whatever property is passed to it.
|
39
|
+
*
|
40
|
+
* Example: @include rem("padding", 10px 0 2px 5px);
|
41
|
+
*/
|
42
|
+
@mixin rem($property, $px-values) {
|
43
|
+
// Convert the baseline into rems
|
44
|
+
$baseline-rem: $base-font-size / 1rem;
|
45
|
+
// Print the first line in pixel values
|
46
|
+
#{$property}: $px-values;
|
47
|
+
// If there is only one (numeric) value, return the property/value line for it.
|
48
|
+
@if type-of($px-values) == "number" {
|
49
|
+
#{$property}: $px-values / $baseline-rem;
|
50
|
+
}
|
51
|
+
@else {
|
52
|
+
// Create an empty list that we can dump values into
|
53
|
+
$rem-values: unquote("");
|
54
|
+
@each $value in $px-values {
|
55
|
+
// If the value is zero, return 0
|
56
|
+
@if $value == 0 {
|
57
|
+
$rem-values: append($rem-values, $value);
|
58
|
+
}
|
59
|
+
@else {
|
60
|
+
$rem-values: append($rem-values, $value / $baseline-rem);
|
61
|
+
}
|
62
|
+
}
|
63
|
+
// Return the property and its list of converted values
|
64
|
+
#{$property}: $rem-values;
|
65
|
+
}
|
66
|
+
}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
$legacy-support-for-ie: true !default;
|
2
|
+
|
3
|
+
// Vertical Align of content with IE fallback
|
4
|
+
// Adapted from http://css-tricks.com/vertically-center-multi-lined-text
|
5
|
+
@mixin vertical-center {
|
6
|
+
display: table-cell;
|
7
|
+
vertical-align: middle;
|
8
|
+
|
9
|
+
@if $legacy-support-for-ie {
|
10
|
+
margin-top: inherit;
|
11
|
+
*clear: expression(
|
12
|
+
style.marginTop = "" + (offsetHeight < parentNode.offsetHeight ? parseInt((parentNode.offsetHeight - offsetHeight) / 2) + "px" : "0"),
|
13
|
+
style.clear = "none", 0
|
14
|
+
);
|
15
|
+
}
|
16
|
+
}
|
17
|
+
|
18
|
+
%vertical-center {
|
19
|
+
@include vertical-center;
|
20
|
+
}
|
@@ -0,0 +1,486 @@
|
|
1
|
+
/* normalize.css v2.0.1 | MIT License | git.io/normalize */
|
2
|
+
/* normalize.scss v2.0.1+build.2 | MIT/GPLv2 License | bit.ly/normalize-with-compass */
|
3
|
+
|
4
|
+
|
5
|
+
/* ==========================================================================
|
6
|
+
HTML5 display definitions
|
7
|
+
========================================================================== */
|
8
|
+
|
9
|
+
/**
|
10
|
+
* Correct `block` display not defined in IE 8/9.
|
11
|
+
*/
|
12
|
+
article,
|
13
|
+
aside,
|
14
|
+
details,
|
15
|
+
figcaption,
|
16
|
+
figure,
|
17
|
+
footer,
|
18
|
+
header,
|
19
|
+
hgroup,
|
20
|
+
nav,
|
21
|
+
section,
|
22
|
+
summary {
|
23
|
+
display: block;
|
24
|
+
}
|
25
|
+
|
26
|
+
/**
|
27
|
+
* Correct `inline-block` display not defined in IE 8/9.
|
28
|
+
*/
|
29
|
+
audio,
|
30
|
+
canvas,
|
31
|
+
video {
|
32
|
+
display: inline-block;
|
33
|
+
@if $legacy-support-for-ie6 or $legacy-support-for-ie7 {
|
34
|
+
*display: inline;
|
35
|
+
*zoom: 1;
|
36
|
+
}
|
37
|
+
}
|
38
|
+
|
39
|
+
/**
|
40
|
+
* Prevent modern browsers from displaying `audio` without controls.
|
41
|
+
* Remove excess height in iOS 5 devices.
|
42
|
+
*/
|
43
|
+
audio:not([controls]) {
|
44
|
+
display: none;
|
45
|
+
height: 0;
|
46
|
+
}
|
47
|
+
|
48
|
+
/**
|
49
|
+
* Address styling not present in IE 7/8/9.
|
50
|
+
* Known issue: no IE 6 support.
|
51
|
+
*/
|
52
|
+
[hidden] {
|
53
|
+
display: none;
|
54
|
+
}
|
55
|
+
|
56
|
+
/* ==========================================================================
|
57
|
+
Base
|
58
|
+
========================================================================== */
|
59
|
+
|
60
|
+
/**
|
61
|
+
* 1. Set default font family to sans-serif.
|
62
|
+
* 2. Prevent iOS text size adjust after orientation change, without disabling
|
63
|
+
* user zoom.
|
64
|
+
* 3. Correct text resizing oddly in IE 6/7 when body `font-size` is set using
|
65
|
+
* `em` units.
|
66
|
+
*/
|
67
|
+
html {
|
68
|
+
font-family: $base-font-family; /* 1 */
|
69
|
+
font-size: 100% * ($base-font-size / 16px); /* 3 */
|
70
|
+
-webkit-text-size-adjust: 100%; /* 2 */
|
71
|
+
-ms-text-size-adjust: 100%; /* 2 */
|
72
|
+
/* Establish a vertical rhythm unit using $base-line-height. */
|
73
|
+
@include adjust-leading-to(1);
|
74
|
+
}
|
75
|
+
|
76
|
+
@if $legacy-support-for-ie6 or $legacy-support-for-ie7 {
|
77
|
+
/**
|
78
|
+
* Address `font-family` inconsistency between `textarea` and other form
|
79
|
+
* elements in IE 6/7.
|
80
|
+
*/
|
81
|
+
button,
|
82
|
+
input,
|
83
|
+
select,
|
84
|
+
textarea {
|
85
|
+
font-family: $base-font-family;
|
86
|
+
}
|
87
|
+
}
|
88
|
+
|
89
|
+
/**
|
90
|
+
* Remove default margin.
|
91
|
+
*/
|
92
|
+
body {
|
93
|
+
margin: 0;
|
94
|
+
}
|
95
|
+
|
96
|
+
/* ==========================================================================
|
97
|
+
Links
|
98
|
+
========================================================================== */
|
99
|
+
|
100
|
+
/**
|
101
|
+
* Address `outline` inconsistency between Chrome and other browsers.
|
102
|
+
*/
|
103
|
+
a:focus {
|
104
|
+
outline: thin dotted;
|
105
|
+
}
|
106
|
+
|
107
|
+
/**
|
108
|
+
* Improve readability when focused and also mouse hovered in all browsers.
|
109
|
+
*/
|
110
|
+
a:active,
|
111
|
+
a:hover {
|
112
|
+
outline: 0;
|
113
|
+
}
|
114
|
+
|
115
|
+
/* ==========================================================================
|
116
|
+
Typography
|
117
|
+
========================================================================== */
|
118
|
+
|
119
|
+
/**
|
120
|
+
* Set 1 unit of vertical rhythm on the top and bottom margin.
|
121
|
+
*/
|
122
|
+
p,
|
123
|
+
pre {
|
124
|
+
margin: rhythm(1) 0;
|
125
|
+
}
|
126
|
+
|
127
|
+
blockquote {
|
128
|
+
/* Set 1 unit of vertical rhythm on the top and bottom margin. */
|
129
|
+
margin: rhythm(1) $indent-amount;
|
130
|
+
}
|
131
|
+
|
132
|
+
/**
|
133
|
+
* Address variable `h1` font size within `section` and `article` contexts in
|
134
|
+
* Firefox 4+, Safari 5, and Chrome.
|
135
|
+
*/
|
136
|
+
h1 {
|
137
|
+
/* Set the font-size and line-height while keeping a proper vertical rhythm. */
|
138
|
+
@include adjust-font-size-to( $h1-font-size );
|
139
|
+
|
140
|
+
/* Set 1 unit of vertical rhythm on the top and bottom margins. */
|
141
|
+
@include leader(1, $h1-font-size);
|
142
|
+
@include trailer(1, $h1-font-size);
|
143
|
+
}
|
144
|
+
|
145
|
+
h2 {
|
146
|
+
@include adjust-font-size-to( $h2-font-size );
|
147
|
+
@include leader(1, $h2-font-size);
|
148
|
+
@include trailer(1, $h2-font-size);
|
149
|
+
}
|
150
|
+
|
151
|
+
h3 {
|
152
|
+
@include adjust-font-size-to( $h3-font-size );
|
153
|
+
@include leader(1, $h3-font-size);
|
154
|
+
@include trailer(1, $h3-font-size);
|
155
|
+
}
|
156
|
+
|
157
|
+
h4 {
|
158
|
+
@include adjust-font-size-to( $h4-font-size );
|
159
|
+
@include leader(1, $h4-font-size);
|
160
|
+
@include trailer(1, $h4-font-size);
|
161
|
+
}
|
162
|
+
|
163
|
+
h5 {
|
164
|
+
@include adjust-font-size-to( $h5-font-size );
|
165
|
+
@include leader(1, $h5-font-size);
|
166
|
+
@include trailer(1, $h5-font-size);
|
167
|
+
}
|
168
|
+
|
169
|
+
h6 {
|
170
|
+
@include adjust-font-size-to( $h6-font-size );
|
171
|
+
@include leader(1, $h6-font-size);
|
172
|
+
@include trailer(1, $h6-font-size);
|
173
|
+
}
|
174
|
+
|
175
|
+
/**
|
176
|
+
* Address styling not present in IE 8/9, Safari 5, and Chrome.
|
177
|
+
*/
|
178
|
+
abbr[title] {
|
179
|
+
border-bottom: 1px dotted;
|
180
|
+
}
|
181
|
+
|
182
|
+
/**
|
183
|
+
* Address style set to `bolder` in Firefox 4+, Safari 5, and Chrome.
|
184
|
+
*/
|
185
|
+
b,
|
186
|
+
strong {
|
187
|
+
font-weight: bold;
|
188
|
+
}
|
189
|
+
|
190
|
+
/**
|
191
|
+
* Address styling not present in Safari 5 and Chrome.
|
192
|
+
*/
|
193
|
+
dfn {
|
194
|
+
font-style: italic;
|
195
|
+
}
|
196
|
+
|
197
|
+
/**
|
198
|
+
* Address styling not present in IE 8/9.
|
199
|
+
*/
|
200
|
+
mark {
|
201
|
+
background: #ff0;
|
202
|
+
color: #000;
|
203
|
+
}
|
204
|
+
|
205
|
+
/**
|
206
|
+
* Correct font family set oddly in Safari 5 and Chrome.
|
207
|
+
*/
|
208
|
+
code,
|
209
|
+
kbd,
|
210
|
+
pre,
|
211
|
+
samp {
|
212
|
+
font-family: monospace, serif;
|
213
|
+
@if $legacy-support-for-ie6 {
|
214
|
+
_font-family: 'courier new', monospace;
|
215
|
+
}
|
216
|
+
@include adjust-font-size-to( 1 * $base-font-size );
|
217
|
+
}
|
218
|
+
|
219
|
+
/**
|
220
|
+
* Improve readability of pre-formatted text in all browsers.
|
221
|
+
*/
|
222
|
+
pre {
|
223
|
+
white-space: pre;
|
224
|
+
white-space: pre-wrap;
|
225
|
+
word-wrap: break-word;
|
226
|
+
}
|
227
|
+
|
228
|
+
/**
|
229
|
+
* Set consistent quote types.
|
230
|
+
*/
|
231
|
+
q {
|
232
|
+
quotes: "\201C" "\201D" "\2018" "\2019";
|
233
|
+
}
|
234
|
+
|
235
|
+
/**
|
236
|
+
* Address inconsistent and variable font size in all browsers.
|
237
|
+
*/
|
238
|
+
small {
|
239
|
+
font-size: 80%;
|
240
|
+
}
|
241
|
+
|
242
|
+
/**
|
243
|
+
* Prevent `sub` and `sup` affecting `line-height` in all browsers.
|
244
|
+
*/
|
245
|
+
sub,
|
246
|
+
sup {
|
247
|
+
font-size: 75%;
|
248
|
+
line-height: 0;
|
249
|
+
position: relative;
|
250
|
+
vertical-align: baseline;
|
251
|
+
}
|
252
|
+
|
253
|
+
sup {
|
254
|
+
top: -0.5em;
|
255
|
+
}
|
256
|
+
|
257
|
+
sub {
|
258
|
+
bottom: -0.25em;
|
259
|
+
}
|
260
|
+
|
261
|
+
/* ==========================================================================
|
262
|
+
Lists
|
263
|
+
========================================================================== */
|
264
|
+
|
265
|
+
/**
|
266
|
+
* Set 1 unit of vertical rhythm and a consistent indentation.
|
267
|
+
*/
|
268
|
+
dl,
|
269
|
+
menu,
|
270
|
+
ol,
|
271
|
+
ul {
|
272
|
+
margin: rhythm(1) 0;
|
273
|
+
padding: 0 0 0 $indent-amount;
|
274
|
+
}
|
275
|
+
|
276
|
+
dl {
|
277
|
+
padding: 0;
|
278
|
+
}
|
279
|
+
|
280
|
+
dd {
|
281
|
+
margin: 0 0 0 $indent-amount;
|
282
|
+
}
|
283
|
+
|
284
|
+
@if $legacy-support-for-ie7 {
|
285
|
+
/**
|
286
|
+
* Correct list images handled incorrectly in IE 7.
|
287
|
+
*/
|
288
|
+
nav ul,
|
289
|
+
nav ol {
|
290
|
+
list-style: none;
|
291
|
+
list-style-image: none;
|
292
|
+
}
|
293
|
+
}
|
294
|
+
|
295
|
+
/* ==========================================================================
|
296
|
+
Embedded content
|
297
|
+
========================================================================== */
|
298
|
+
|
299
|
+
/**
|
300
|
+
* Remove border when inside `a` element in IE 8/9.
|
301
|
+
*/
|
302
|
+
img {
|
303
|
+
border: 0;
|
304
|
+
@if $legacy-support-for-ie7 {
|
305
|
+
/* Improve image quality when scaled in IE 7. */
|
306
|
+
-ms-interpolation-mode: bicubic;
|
307
|
+
}
|
308
|
+
}
|
309
|
+
|
310
|
+
/**
|
311
|
+
* Correct overflow displayed oddly in IE 9.
|
312
|
+
*/
|
313
|
+
svg:not(:root) {
|
314
|
+
overflow: hidden;
|
315
|
+
}
|
316
|
+
|
317
|
+
/* ==========================================================================
|
318
|
+
Figures
|
319
|
+
========================================================================== */
|
320
|
+
|
321
|
+
/**
|
322
|
+
* Address margin not present in IE 8/9 and Safari 5.
|
323
|
+
*/
|
324
|
+
figure {
|
325
|
+
margin: 0;
|
326
|
+
}
|
327
|
+
|
328
|
+
/* ==========================================================================
|
329
|
+
Forms
|
330
|
+
========================================================================== */
|
331
|
+
|
332
|
+
@if $legacy-support-for-ie6 or $legacy-support-for-ie7 {
|
333
|
+
/**
|
334
|
+
* Correct margin displayed oddly in IE 6/7.
|
335
|
+
*/
|
336
|
+
form {
|
337
|
+
margin: 0;
|
338
|
+
}
|
339
|
+
}
|
340
|
+
|
341
|
+
/**
|
342
|
+
* Define consistent border, margin, and padding.
|
343
|
+
*/
|
344
|
+
fieldset {
|
345
|
+
border-color: #c0c0c0;
|
346
|
+
margin: 0 2px;
|
347
|
+
/* Apply borders and padding that keep the vertical rhythm. */
|
348
|
+
@include apply-side-rhythm-border(top, $width: 1px, $lines: 0.35);
|
349
|
+
@include apply-side-rhythm-border(bottom, $width: 1px, $lines: 0.65);
|
350
|
+
@include apply-side-rhythm-border(left, $width: 1px, $lines: 0.625);
|
351
|
+
@include apply-side-rhythm-border(right, $width: 1px, $lines: 0.625);
|
352
|
+
}
|
353
|
+
|
354
|
+
/**
|
355
|
+
* 1. Correct `color` not being inherited in IE 8/9.
|
356
|
+
* 2. Remove padding so people aren't caught out if they zero out fieldsets.
|
357
|
+
* 3. Correct alignment displayed oddly in IE 6/7.
|
358
|
+
*/
|
359
|
+
legend {
|
360
|
+
border: 0; /* 1 */
|
361
|
+
padding: 0; /* 2 */
|
362
|
+
@if $legacy-support-for-ie6 or $legacy-support-for-ie7 {
|
363
|
+
*margin-left: -7px; /* 3 */
|
364
|
+
}
|
365
|
+
}
|
366
|
+
|
367
|
+
/**
|
368
|
+
* 1. Correct font family not being inherited in all browsers.
|
369
|
+
* 2. Correct font size not being inherited in all browsers.
|
370
|
+
* 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome.
|
371
|
+
* 4. Improve appearance and consistency with IE 6/7.
|
372
|
+
*/
|
373
|
+
button,
|
374
|
+
input,
|
375
|
+
select,
|
376
|
+
textarea {
|
377
|
+
font-family: inherit; /* 1 */
|
378
|
+
font-size: 100%; /* 2 */
|
379
|
+
margin: 0; /* 3 */
|
380
|
+
@if $legacy-support-for-ie6 or $legacy-support-for-ie7 {
|
381
|
+
vertical-align: baseline; /* 4 */
|
382
|
+
*vertical-align: middle; /* 4 */
|
383
|
+
}
|
384
|
+
}
|
385
|
+
|
386
|
+
/**
|
387
|
+
* Address Firefox 4+ setting `line-height` on `input` using `!important` in
|
388
|
+
* the UA stylesheet.
|
389
|
+
*/
|
390
|
+
button,
|
391
|
+
input {
|
392
|
+
line-height: normal;
|
393
|
+
}
|
394
|
+
|
395
|
+
/**
|
396
|
+
* 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
|
397
|
+
* and `video` controls.
|
398
|
+
* 2. Correct inability to style clickable `input` types in iOS.
|
399
|
+
* 3. Improve usability and consistency of cursor style between image-type
|
400
|
+
* `input` and others.
|
401
|
+
* 4. Remove inner spacing in IE 7 without affecting normal text inputs.
|
402
|
+
* Known issue: inner spacing remains in IE 6.
|
403
|
+
*/
|
404
|
+
button,
|
405
|
+
html input[type="button"], /* 1 */
|
406
|
+
input[type="reset"],
|
407
|
+
input[type="submit"] {
|
408
|
+
-webkit-appearance: button; /* 2 */
|
409
|
+
cursor: pointer; /* 3 */
|
410
|
+
@if $legacy-support-for-ie7 {
|
411
|
+
*overflow: visible; /* 4 */
|
412
|
+
}
|
413
|
+
}
|
414
|
+
|
415
|
+
/**
|
416
|
+
* Re-set default cursor for disabled elements.
|
417
|
+
*/
|
418
|
+
button[disabled],
|
419
|
+
html input[disabled] {
|
420
|
+
cursor: default;
|
421
|
+
}
|
422
|
+
|
423
|
+
/**
|
424
|
+
* 1. Address box sizing set to `content-box` in IE 8/9.
|
425
|
+
* 2. Remove excess padding in IE 8/9.
|
426
|
+
* 3. Remove excess padding in IE 7.
|
427
|
+
* Known issue: excess padding remains in IE 6.
|
428
|
+
*/
|
429
|
+
input[type="checkbox"],
|
430
|
+
input[type="radio"] {
|
431
|
+
@include box-sizing(border-box); /* 1 */
|
432
|
+
padding: 0; /* 2 */
|
433
|
+
@if $legacy-support-for-ie7 {
|
434
|
+
*height: 13px; /* 3 */
|
435
|
+
*width: 13px; /* 3 */
|
436
|
+
}
|
437
|
+
}
|
438
|
+
|
439
|
+
/**
|
440
|
+
* 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome.
|
441
|
+
* 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome
|
442
|
+
* (include `-moz` to future-proof).
|
443
|
+
*/
|
444
|
+
input[type="search"] {
|
445
|
+
-webkit-appearance: textfield; /* 1 */
|
446
|
+
@include box-sizing(content-box); /* 2 */
|
447
|
+
}
|
448
|
+
|
449
|
+
/**
|
450
|
+
* Remove inner padding and search cancel button in Safari 5 and Chrome
|
451
|
+
* on OS X.
|
452
|
+
*/
|
453
|
+
input[type="search"]::-webkit-search-cancel-button,
|
454
|
+
input[type="search"]::-webkit-search-decoration {
|
455
|
+
-webkit-appearance: none;
|
456
|
+
}
|
457
|
+
|
458
|
+
/**
|
459
|
+
* Remove inner padding and border in Firefox 4+.
|
460
|
+
*/
|
461
|
+
button::-moz-focus-inner,
|
462
|
+
input::-moz-focus-inner {
|
463
|
+
border: 0;
|
464
|
+
padding: 0;
|
465
|
+
}
|
466
|
+
|
467
|
+
/**
|
468
|
+
* 1. Remove default vertical scrollbar in IE 8/9.
|
469
|
+
* 2. Improve readability and alignment in all browsers.
|
470
|
+
*/
|
471
|
+
textarea {
|
472
|
+
overflow: auto; /* 1 */
|
473
|
+
vertical-align: top; /* 2 */
|
474
|
+
}
|
475
|
+
|
476
|
+
/* ==========================================================================
|
477
|
+
Tables
|
478
|
+
========================================================================== */
|
479
|
+
|
480
|
+
/**
|
481
|
+
* Remove most spacing between table cells.
|
482
|
+
*/
|
483
|
+
table {
|
484
|
+
border-collapse: collapse;
|
485
|
+
border-spacing: 0;
|
486
|
+
}
|