compass-normalize-plugin 0.1 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,3 +1,14 @@
1
+ v0.2.1 [Mar 31 2012]
2
+ - - - - - - - - - - -
3
+
4
+ Fixes parenthesis.
5
+
6
+
7
+ v0.2.0 [Mar 31 2012]
8
+ - - - - - - - - - - -
9
+
10
+ Adds support for configurable browser optimization.
11
+
1
12
  v0.1.0 [Mar 29 2012]
2
13
  - - - - - - - - - - -
3
14
 
data/Manifest CHANGED
@@ -4,6 +4,7 @@ lib/normalize.rb
4
4
  Manifest
5
5
  Rakefile
6
6
  README.md
7
+ scss/_config.scss
7
8
  scss/_normalize.scss
8
9
  scss/normalize/_base.scss
9
10
  scss/normalize/_embedded.scss
data/README.md CHANGED
@@ -1,43 +1,117 @@
1
1
  # normalize.css - Compass Plugin
2
- A Compass plugin of Nicolas Gallagher's normalize.css project.
2
+ A Compass plugin of [Nicolas Gallagher's normalize.css](https://github.com/necolas/normalize.css/)
3
+ project.
4
+
5
+ ## Installation
6
+ Check out the [gem on rubygems.org](https://rubygems.org/gems/compass-normalize-plugin).
7
+
8
+ $ gem install compass-normalize-plugin
3
9
 
4
10
  ## Usage
5
11
  Execute the following command to create a new project with compass, using normalize.css:
6
12
 
7
- $ compass create my_project -r normalize --using normalize
13
+ $ compass create my_project -r normalize --using normalize
8
14
 
9
15
  To add normalize.css to an existing project, edit `config.rb` and add `compass` to your imports:
10
16
 
11
- require 'normalize'
17
+ require 'normalize'
12
18
 
13
19
  Import the plugin and use the mixin
14
20
 
15
- @import "normalize";
16
-
17
- @include normalize;
18
-
21
+ @import "normalize";
22
+ @include normalize;
23
+
19
24
  or include and use only parts of it:
20
25
 
21
- @import "normalize/html5";
22
- @import "normalize/base";
23
-
24
- @include normalize-html5;
25
- @include normalize-base;
26
+ @import "normalize/html5";
27
+ @import "normalize/base";
28
+
29
+ @include normalize-html5;
30
+ @include normalize-base;
31
+
32
+ ## Configuration
33
+ Version 0.2 introduces some global configuration variables to remove unwanted optimizations for
34
+ different browsers. The default configuration includes support for all browsers. The following
35
+ variables can be set to either `true` of `false` (default is `true`):
36
+
37
+ // Internet Explorer
38
+ $include-ie-normalization
39
+ $include-ie6-normalization
40
+ $include-ie7-normalization
41
+ $include-ie8-normalization
42
+ $include-ie9-normalization
43
+
44
+ // Firefox
45
+ $include-ff-normalization
46
+
47
+ // Safari
48
+ $include-sa-normalization
49
+
50
+ // iOS
51
+ $include-ios-normalization
52
+
53
+ // Chrome
54
+ $include-chr-normalization
55
+
56
+ // Opera
57
+ $include-op-normalization
58
+
59
+ The settings are processed using or, thus settings $include-ie-normalization: true; will include
60
+ all IE normalization, even if $include-ie6-normalization is set to false.
26
61
 
27
62
  ## Available mixins and imports
28
- - normalize-html5 (normalize/html5)
29
- - normalize-base (normalize/base)
30
- - normalize-links (normalize/links)
31
- - normalize-typography (normalize/typography)
32
- - normalize-lists (normalize/lists)
33
- - normalize-embedded (normalize/embedded)
34
- - normalize-figures (normalize/figures)
35
- - normalize-forms (normalize/forms)
36
- - normalize-tables (normalize/tables)
63
+ <table>
64
+ <thead>
65
+ <tr>
66
+ <th>import</th>
67
+ <th>mixin</th>
68
+ </tr>
69
+ </thead>
70
+ <tbody>
71
+ <tr>
72
+ <td>normalize-html5</td>
73
+ <td>normalize/html5</td>
74
+ </tr>
75
+ <tr>
76
+ <td>normalize-base</td>
77
+ <td>normalize/base</td>
78
+ </tr>
79
+ <tr>
80
+ <td>normalize-links</td>
81
+ <td>normalize/links</td>
82
+ </tr>
83
+ <tr>
84
+ <td>normalize-typography</td>
85
+ <td>normalize/typography</td>
86
+ </tr>
87
+ <tr>
88
+ <td>normalize-lists</td>
89
+ <td>normalize/lists</td>
90
+ </tr>
91
+ <tr>
92
+ <td>normalize-embedded</td>
93
+ <td>normalize/embedded</td>
94
+ </tr>
95
+ <tr>
96
+ <td>normalize-figures</td>
97
+ <td>normalize/figures</td>
98
+ </tr>
99
+ <tr>
100
+ <td>normalize-forms</td>
101
+ <td>normalize/forms</td>
102
+ </tr>
103
+ <tr>
104
+ <td>normalize-tables</td>
105
+ <td>normalize/tables</td>
106
+ </tr>
107
+ </table>
37
108
 
38
109
  ## License
39
110
  Public domain
40
111
 
41
112
  ## Acknowledgements
42
- * [Normalize.css](https://github.com/necolas/normalize.css/) is a project by [Nicolas Gallagher](http://github.com/necolas) and [Jonathan Neal](http://github.com/jonathantneal).
43
- * [compass-normalize-plugin](https://github.com/jroettger/compass-normalize-plugin) is a [Compass](http://compass-style.org) plugin by [Johannes Röttger](http://github.com/jroettger).
113
+ * [Normalize.css](https://github.com/necolas/normalize.css/) is a project by
114
+ [Nicolas Gallagher](http://github.com/necolas) and
115
+ [Jonathan Neal](http://github.com/jonathantneal).
116
+ * [compass-normalize-plugin](https://github.com/jroettger/compass-normalize-plugin) is a
117
+ [Compass](http://compass-style.org) plugin by [Johannes Röttger](http://github.com/jroettger).
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1
1
+ 0.2.1
@@ -1,8 +1,8 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
 
3
3
  Gem::Specification.new do |s|
4
- s.version = "0.1"
5
- s.date = %q{2012-03-29}
4
+ s.version = "0.2.1"
5
+ s.date = %q{2012-03-31}
6
6
 
7
7
  s.name = %q{compass-normalize-plugin}
8
8
  s.authors = ["Johannes Roettger", "Nicolas Gallagher", "Jonathan Neal"]
@@ -19,6 +19,7 @@ Gem::Specification.new do |s|
19
19
  "Rakefile",
20
20
  "README.md",
21
21
  "scss/",
22
+ "scss/_config.scss",
22
23
  "scss/_normalize.scss",
23
24
  "scss/normalize/",
24
25
  "scss/normalize/_base.scss",
data/scss/_config.scss ADDED
@@ -0,0 +1,23 @@
1
+ // Configuration
2
+
3
+ // Internet Explorer
4
+ $include-ie-normalization: true !default;
5
+ $include-ie6-normalization: true !default;
6
+ $include-ie7-normalization: true !default;
7
+ $include-ie8-normalization: true !default;
8
+ $include-ie9-normalization: true !default;
9
+
10
+ // Firefox
11
+ $include-ff-normalization: true !default;
12
+
13
+ // Safari
14
+ $include-sa-normalization: true !default;
15
+
16
+ // iOS
17
+ $include-ios-normalization: true !default;
18
+
19
+ // Chrome
20
+ $include-chr-normalization: true !default;
21
+
22
+ // Opera
23
+ $include-op-normalization: true !default;
data/scss/_normalize.scss CHANGED
@@ -1,3 +1,5 @@
1
+ @import "config";
2
+
1
3
  @import "normalize/html5";
2
4
  @import "normalize/base";
3
5
  @import "normalize/links";
@@ -1,12 +1,19 @@
1
1
  @mixin normalize-base {
2
- // 1. Corrects text resizing oddly in IE6/7 when body font-size is set using em units
3
- // http://clagnut.com/blog/348/#c790
4
- // 2. Prevents iOS text size adjust after orientation change, without disabling user zoom
5
- // www.456bereastreet.com/archive/201012/controlling_text_size_in_safari_for_ios_without_disabling_user_zoom/
6
2
  html {
7
- font-size: 100%; /* 1 */
8
- -webkit-text-size-adjust: 100%; /* 2 */
9
- -ms-text-size-adjust: 100%; /* 2 */
3
+ @if ($include-ie-normalization
4
+ or $include-ie6-normalization
5
+ or $include-ie7-normalization) {
6
+ // Corrects text resizing oddly in IE6/7 when body font-size is set using em units
7
+ // http://clagnut.com/blog/348/#c790
8
+ font-size: 100%;
9
+ }
10
+
11
+ @if $include-ios-normalization {
12
+ // Prevents iOS text size adjust after orientation change, without disabling user zoom
13
+ // www.456bereastreet.com/archive/201012/controlling_text_size_in_safari_for_ios_without_disabling_user_zoom/
14
+ -webkit-text-size-adjust: 100%;
15
+ -ms-text-size-adjust: 100%;
16
+ }
10
17
  }
11
18
 
12
19
  // Addresses font-family inconsistency between 'textarea' and other form elements.
@@ -18,8 +25,12 @@
18
25
  font-family: sans-serif;
19
26
  }
20
27
 
21
- // Addresses margins handled incorrectly in IE6/7
22
- body {
23
- margin: 0;
28
+ @if ($include-ie-normalization
29
+ or $include-ie6-normalization
30
+ or $include-ie7-normalization) {
31
+ // Addresses margins handled incorrectly in IE6/7
32
+ body {
33
+ margin: 0;
34
+ }
24
35
  }
25
36
  }
@@ -1,14 +1,28 @@
1
1
  @mixin normalize-embedded {
2
- // 1. Removes border when inside 'a' element in IE6/7/8/9, FF3
3
- // 2. Improves image quality when scaled in IE7
4
- // code.flickr.com/blog/2008/11/12/on-ui-quality-the-little-things-client-side-image-resizing/
5
2
  img {
6
- border: 0; // 1
7
- -ms-interpolation-mode: bicubic; // 2
3
+ @if ($include-ie-normalization
4
+ or $include-ie6-normalization
5
+ or $include-ie7-normalization
6
+ or $include-ie8-normalization
7
+ or $include-ie9-normalization
8
+ or $include-ff-normalization) {
9
+ // Removes border when inside 'a' element in IE6/7/8/9, FF3
10
+ border: 0;
11
+ }
12
+
13
+ @if ($include-ie-normalization
14
+ or $include-ie7-normalization) {
15
+ // Improves image quality when scaled in IE7
16
+ // code.flickr.com/blog/2008/11/12/on-ui-quality-the-little-things-client-side-image-resizing/
17
+ -ms-interpolation-mode: bicubic;
18
+ }
8
19
  }
9
20
 
10
- // Corrects overflow displayed oddly in IE9
11
- svg:not(:root) {
12
- overflow: hidden;
21
+ @if ($include-ie-normalization
22
+ or $include-ie9-normalization) {
23
+ // Corrects overflow displayed oddly in IE9
24
+ svg:not(:root) {
25
+ overflow: hidden;
26
+ }
13
27
  }
14
28
  }
@@ -1,6 +1,14 @@
1
1
  @mixin normalize-figures {
2
- // Addresses margin not present in IE6/7/8/9, S5, O11
3
- figure {
4
- margin: 0;
2
+ @if ($include-ie-normalization
3
+ or $include-ie6-normalization
4
+ or $include-ie7-normalization
5
+ or $include-ie8-normalization
6
+ or $include-ie9-normalization
7
+ or $include-sa-normalization
8
+ or $include-op-normalization) {
9
+ // Addresses margin not present in IE6/7/8/9, S5, O11
10
+ figure {
11
+ margin: 0;
12
+ }
5
13
  }
6
14
  }
@@ -1,7 +1,11 @@
1
1
  @mixin normalize-forms {
2
- // Corrects margin displayed oddly in IE6/7
3
- form {
4
- margin: 0;
2
+ @if ($include-ie-normalization
3
+ or $include-ie6-normalization
4
+ or $include-ie7-normalization) {
5
+ // Corrects margin displayed oddly in IE6/7
6
+ form {
7
+ margin: 0;
8
+ }
5
9
  }
6
10
 
7
11
  // Define consistent border, margin, and padding
@@ -11,46 +15,78 @@
11
15
  padding: 0.35em 0.625em 0.75em;
12
16
  }
13
17
 
14
- // 1. Corrects color not being inherited in IE6/7/8/9
15
- // 2. Corrects text not wrapping in FF3
16
- // 3. Corrects alignment displayed oddly in IE6/7
17
18
  legend {
18
- border: 0; // 1
19
- padding: 0;
20
- white-space: normal; // 2
21
- *margin-left: -7px; // 3
19
+ @if ($include-ie-normalization
20
+ or $include-ie6-normalization
21
+ or $include-ie7-normalization
22
+ or $include-ie8-normalization
23
+ or $include-ie9-normalization) {
24
+ // Corrects color not being inherited in IE6/7/8/9
25
+ border: 0;
26
+ padding: 0;
27
+ }
28
+
29
+ @if $include-ff-normalization {
30
+ // Corrects text not wrapping in FF3
31
+ white-space: normal;
32
+ }
33
+
34
+ @if ($include-ie-normalization
35
+ or $include-ie6-normalization
36
+ or $include-ie7-normalization) {
37
+ // Corrects alignment displayed oddly in IE6/7
38
+ *margin-left: -7px;
39
+ }
22
40
  }
23
41
 
24
- // 1. Corrects font size not being inherited in all browsers
25
- // 2. Addresses margins set differently in IE6/7, FF3+, S5, Chrome
26
- // 3. Improves appearance and consistency in all browsers
27
42
  button,
28
43
  input,
29
44
  select,
30
45
  textarea {
31
- font-size: 100%; // 1
32
- margin: 0; // 2
33
- vertical-align: baseline; // 3
34
- *vertical-align: middle; // 3
46
+ // Corrects font size not being inherited in all browsers
47
+ font-size: 100%;
48
+
49
+ @if ($include-ie-normalization
50
+ or $include-ie6-normalization
51
+ or $include-ie7-normalization
52
+ or $include-ff-normalization
53
+ or $include-sa-normalization
54
+ or $include-chr-normalization) {
55
+ // Addresses margins set differently in IE6/7, FF3+, S5, Chrome
56
+ margin: 0;
57
+ }
58
+
59
+ // Improves appearance and consistency in all browsers
60
+ vertical-align: baseline;
61
+ *vertical-align: middle;
35
62
  }
36
63
 
37
- // Addresses FF3/4 setting line-height on 'input' using !important in the UA stylesheet
38
- button,
39
- input {
40
- line-height: normal;
64
+ @if $include-ff-normalization {
65
+ // Addresses FF3/4 setting line-height on 'input' using !important in the UA stylesheet
66
+ button,
67
+ input {
68
+ line-height: normal;
69
+ }
41
70
  }
42
71
 
43
- // 1. Improves usability and consistency of cursor style between image-type 'input' and others
44
- // 2. Corrects inability to style clickable 'input' types in iOS
45
- // 3. Removes inner spacing in IE7 without affecting normal text inputs
46
- // Known issue: inner spacing remains in IE6
47
72
  button,
48
73
  input[type="button"],
49
74
  input[type="reset"],
50
75
  input[type="submit"] {
51
- cursor: pointer; // 1
52
- -webkit-appearance: button; // 2
53
- *overflow: visible; // 3
76
+ // Improves usability and consistency of cursor style between image-type 'input' and others
77
+ cursor: pointer;
78
+
79
+ @if $include-ios-normalization {
80
+ // Corrects inability to style clickable 'input' types in iOS
81
+ -webkit-appearance: button;
82
+ }
83
+
84
+ @if ($include-ie-normalization
85
+ or $include-ie7-normalization) {
86
+ // Removes inner spacing in IE7 without affecting normal text inputs
87
+ // Known issue: inner spacing remains in IE6
88
+ *overflow: visible;
89
+ }
54
90
  }
55
91
 
56
92
  // Re-set default cursor for disabled elements
@@ -59,45 +95,75 @@
59
95
  cursor: default;
60
96
  }
61
97
 
62
- // 1. Addresses box sizing set to content-box in IE8/9
63
- // 2. Removes excess padding in IE8/9
64
- // 3. Removes excess padding in IE7
65
- // Known issue: excess padding remains in IE6
66
98
  input[type="checkbox"],
67
99
  input[type="radio"] {
68
- box-sizing: border-box; // 1
69
- padding: 0; // 2
70
- *height: 13px; // 3
71
- *width: 13px; // 3
100
+ @if ($include-ie-normalization
101
+ or $include-ie8-normalization
102
+ or $include-ie9-normalization) {
103
+ // Addresses box sizing set to content-box in IE8/9
104
+ box-sizing: border-box;
105
+ }
106
+
107
+ @if ($include-ie-normalization
108
+ or $include-ie8-normalization
109
+ or $include-ie9-normalization) {
110
+ // Removes excess padding in IE8/9
111
+ padding: 0;
112
+ }
113
+
114
+ @if ($include-ie-normalization
115
+ or $include-ie7-normalization) {
116
+ // Removes excess padding in IE7
117
+ // Known issue: excess padding remains in IE6
118
+ *height: 13px;
119
+ *width: 13px;
120
+ }
72
121
  }
73
122
 
74
- // 1. Addresses appearance set to searchfield in S5, Chrome
75
- // 2. Addresses box-sizing set to border-box in S5, Chrome (include -moz to future-proof)
76
123
  input[type="search"] {
77
- -webkit-appearance: textfield; // 1
78
- -moz-box-sizing: content-box;
79
- -webkit-box-sizing: content-box; // 2
124
+ @if ($include-sa-normalization
125
+ or $include-chr-normalization) {
126
+ // Addresses appearance set to searchfield in S5, Chrome
127
+ -webkit-appearance: textfield;
128
+
129
+ // Addresses box-sizing set to border-box in S5, Chrome (include -moz to future-proof)
130
+ -webkit-box-sizing: content-box;
131
+ -moz-box-sizing: content-box;
132
+ }
133
+
80
134
  box-sizing: content-box;
81
135
  }
82
136
 
83
- // Removes inner padding and search cancel button in S5, Chrome on OS X
84
- input[type="search"]::-webkit-search-decoration,
85
- input[type="search"]::-webkit-search-cancel-button {
86
- -webkit-appearance: none;
137
+ @if ($include-sa-normalization
138
+ or $include-chr-normalization) {
139
+ // Removes inner padding and search cancel button in S5, Chrome on OS X
140
+ input[type="search"]::-webkit-search-decoration,
141
+ input[type="search"]::-webkit-search-cancel-button {
142
+ -webkit-appearance: none;
143
+ }
87
144
  }
88
145
 
89
- // Removes inner padding and border in FF3+
90
- // www.sitepen.com/blog/2008/05/14/the-devils-in-the-details-fixing-dojos-toolbar-buttons/
91
- button::-moz-focus-inner,
92
- input::-moz-focus-inner {
93
- border: 0;
94
- padding: 0;
146
+ @if $include-ff-normalization {
147
+ // Removes inner padding and border in FF3+
148
+ // www.sitepen.com/blog/2008/05/14/the-devils-in-the-details-fixing-dojos-toolbar-buttons/
149
+ button::-moz-focus-inner,
150
+ input::-moz-focus-inner {
151
+ border: 0;
152
+ padding: 0;
153
+ }
95
154
  }
96
155
 
97
- // 1. Removes default vertical scrollbar in IE6/7/8/9
98
- // 2. Improves readability and alignment in all browsers
99
156
  textarea {
100
- overflow: auto; // 1
101
- vertical-align: top; // 2
157
+ @if ($include-ie-normalization
158
+ or $include-ie6-normalization
159
+ or $include-ie7-normalization
160
+ or $include-ie8-normalization
161
+ or $include-ie9-normalization) {
162
+ // Removes default vertical scrollbar in IE6/7/8/9
163
+ overflow: auto;
164
+ }
165
+
166
+ // Improves readability and alignment in all browsers
167
+ vertical-align: top;
102
168
  }
103
169
  }
@@ -1,26 +1,33 @@
1
1
  @mixin normalize-html5 {
2
- // Corrects block display not defined in IE6/7/8/9 & FF3
3
- article,
4
- aside,
5
- details,
6
- figcaption,
7
- figure,
8
- footer,
9
- header,
10
- hgroup,
11
- nav,
12
- section,
13
- summary {
14
- display: block;
15
- }
2
+ @if ($include-ie-normalization
3
+ or $include-ie6-normalization
4
+ or $include-ie7-normalization
5
+ or $include-ie8-normalization
6
+ or $include-ie9-normalization
7
+ or $include-ff-normalization) {
8
+ // Corrects block display not defined in IE6/7/8/9 & FF3
9
+ article,
10
+ aside,
11
+ details,
12
+ figcaption,
13
+ figure,
14
+ footer,
15
+ header,
16
+ hgroup,
17
+ nav,
18
+ section,
19
+ summary {
20
+ display: block;
21
+ }
16
22
 
17
- // Corrects inline-block display not defined in IE6/7/8/9 & FF3
18
- audio,
19
- canvas,
20
- video {
21
- display: inline-block;
22
- *display: inline;
23
- *zoom: 1;
23
+ // Corrects inline-block display not defined in IE6/7/8/9 & FF3
24
+ audio,
25
+ canvas,
26
+ video {
27
+ display: inline-block;
28
+ *display: inline;
29
+ *zoom: 1;
30
+ }
24
31
  }
25
32
 
26
33
  // Prevents modern browsers from displaying 'audio' without controls
@@ -30,9 +37,16 @@
30
37
  height: 0;
31
38
  }
32
39
 
33
- // Addresses styling for 'hidden' attribute not present in IE7/8/9, FF3, S4
34
- // Known issue: no IE6 support
35
- [hidden] {
36
- display: none;
40
+ @if ($include-ie-normalization
41
+ or $include-ie7-normalization
42
+ or $include-ie8-normalization
43
+ or $include-ie9-normalization
44
+ or $include-ff-normalization
45
+ or $include-sa-normalization) {
46
+ // Addresses styling for 'hidden' attribute not present in IE7/8/9, FF3, S4
47
+ // Known issue: no IE6 support
48
+ [hidden] {
49
+ display: none;
50
+ }
37
51
  }
38
52
  }
@@ -1,9 +1,11 @@
1
1
  @mixin normalize-links {
2
2
  a {
3
- // Addresses outline displayed oddly in Chrome
4
- &:focus {
5
- outline: thin dotted;
6
- }
3
+ @if $include-chr-normalization {
4
+ // Addresses outline displayed oddly in Chrome
5
+ &:focus {
6
+ outline: thin dotted;
7
+ }
8
+ }
7
9
 
8
10
  // Improves readability when focused and also mouse hovered in all browsers
9
11
  // people.opera.com/patrickl/experiments/keyboard/test
@@ -1,29 +1,36 @@
1
1
  @mixin normalize-lists {
2
- // Addresses margins set differently in IE6/7
3
- dl,
4
- menu,
5
- ol,
6
- ul {
7
- margin: 1em 0;
8
- }
2
+ @if ($include-ie-normalization
3
+ or $include-ie6-normalization
4
+ or $include-ie7-normalization) {
5
+ // Addresses margins set differently in IE6/7
6
+ dl,
7
+ menu,
8
+ ol,
9
+ ul {
10
+ margin: 1em 0;
11
+ }
9
12
 
10
- dd {
11
- margin: 0 0 0 40px;
12
- }
13
+ dd {
14
+ margin: 0 0 0 40px;
15
+ }
13
16
 
14
- // Addresses paddings set differently in IE6/7
15
- menu,
16
- ol,
17
- ul {
18
- padding: 0 0 0 40px;
17
+ // Addresses paddings set differently in IE6/7
18
+ menu,
19
+ ol,
20
+ ul {
21
+ padding: 0 0 0 40px;
22
+ }
19
23
  }
20
24
 
21
- // Corrects list images handled incorrectly in IE7
22
- nav {
23
- ul,
24
- ol {
25
- list-style: none;
26
- list-style-image: none;
27
- }
25
+ @if ($include-ie-normalization
26
+ or $include-ie7-normalization) {
27
+ // Corrects list images handled incorrectly in IE7
28
+ nav {
29
+ ul,
30
+ ol {
31
+ list-style: none;
32
+ list-style-image: none;
33
+ }
34
+ }
28
35
  }
29
36
  }
@@ -1,77 +1,113 @@
1
1
  @mixin normalize-typography {
2
- // Addresses font sizes and margins set differently in IE6/7
3
- // Addresses font sizes within 'section' and 'article' in FF4+, Chrome, S5
4
- h1 {
5
- font-size: 2em;
6
- margin: 0.67em 0;
7
- }
8
-
9
- h2 {
10
- font-size: 1.5em;
11
- margin: 0.83em 0;
12
- }
13
-
14
- h3 {
15
- font-size: 1.17em;
16
- margin: 1em 0;
17
- }
18
-
19
- h4 {
20
- font-size: 1em;
21
- margin: 1.33em 0;
22
- }
23
-
24
- h5 {
25
- font-size: 0.83em;
26
- margin: 1.67em 0;
27
- }
28
-
29
- h6 {
30
- font-size: 0.75em;
31
- margin: 2.33em 0;
32
- }
33
-
34
- // Addresses styling not present in IE7/8/9, S5, Chrome
35
- abbr[title] {
36
- border-bottom: 1px dotted;
37
- }
38
-
39
- // Addresses style set to 'bolder' in FF3+, S4/5, Chrome
40
- b,
41
- strong {
42
- font-weight: bold;
2
+ @if ($include-ie-normalization
3
+ or $include-ie6-normalization
4
+ or $include-ie7-normalization
5
+ or $include-ff-normalization
6
+ or $include-chr-normalization
7
+ or $include-sa-normalization) {
8
+ // Addresses font sizes and margins set differently in IE6/7
9
+ // Addresses font sizes within 'section' and 'article' in FF4+, Chrome, S5
10
+ h1 {
11
+ font-size: 2em;
12
+ margin: 0.67em 0;
13
+ }
14
+
15
+ h2 {
16
+ font-size: 1.5em;
17
+ margin: 0.83em 0;
18
+ }
19
+
20
+ h3 {
21
+ font-size: 1.17em;
22
+ margin: 1em 0;
23
+ }
24
+
25
+ h4 {
26
+ font-size: 1em;
27
+ margin: 1.33em 0;
28
+ }
29
+
30
+ h5 {
31
+ font-size: 0.83em;
32
+ margin: 1.67em 0;
33
+ }
34
+
35
+ h6 {
36
+ font-size: 0.75em;
37
+ margin: 2.33em 0;
38
+ }
39
+ }
40
+
41
+ @if ($include-ie-normalization
42
+ or $include-ie7-normalization
43
+ or $include-ie8-normalization
44
+ or $include-ie9-normalization
45
+ or $include-sa-normalization
46
+ or $include-chr-normalization) {
47
+ // Addresses styling not present in IE7/8/9, S5, Chrome
48
+ abbr[title] {
49
+ border-bottom: 1px dotted;
50
+ }
51
+ }
52
+
53
+ @if ($include-ff-normalization
54
+ or $include-sa-normalization
55
+ or $include-chr-normalization) {
56
+ // Addresses style set to 'bolder' in FF3+, S4/5, Chrome
57
+ b,
58
+ strong {
59
+ font-weight: bold;
60
+ }
43
61
  }
44
62
 
45
63
  blockquote {
46
64
  margin: 1em 40px;
47
65
  }
48
66
 
49
- // Addresses styling not present in S5, Chrome
50
- dfn {
51
- font-style: italic;
52
- }
53
-
54
- // Addresses styling not present in IE6/7/8/9
55
- mark {
56
- background: #ff0;
57
- color: #000;
58
- }
59
-
60
- // Addresses margins set differently in IE6/7
61
- p,
62
- pre {
63
- margin: 1em 0;
64
- }
65
-
66
- // Corrects font family set oddly in IE6, S4/5, Chrome
67
- // en.wikipedia.org/wiki/User:Davidgothberg/Test59
68
- pre,
69
- code,
70
- kbd,
71
- samp {
72
- font-family: monospace, serif;
73
- _font-family: 'courier new', monospace;
74
- font-size: 1em;
67
+ @if ($include-sa-normalization
68
+ or $include-chr-normalization) {
69
+ // Addresses styling not present in S5, Chrome
70
+ dfn {
71
+ font-style: italic;
72
+ }
73
+ }
74
+
75
+ @if ($include-ie-normalization
76
+ or $include-ie6-normalization
77
+ or $include-ie7-normalization
78
+ or $include-ie8-normalization
79
+ or $include-ie9-normalization) {
80
+ // Addresses styling not present in IE6/7/8/9
81
+ mark {
82
+ background: #ff0;
83
+ color: #000;
84
+ }
85
+ }
86
+
87
+ @if ($include-ie-normalization
88
+ or $include-ie6-normalization
89
+ or $include-ie7-normalization) {
90
+ // Addresses margins set differently in IE6/7
91
+ p,
92
+ pre {
93
+ margin: 1em 0;
94
+ }
95
+ }
96
+
97
+ @if ($include-ie-normalization
98
+ or $include-ie6-normalization
99
+ or $include-sa-normalization
100
+ or $include-chr-normalization) {
101
+ // Corrects font family set oddly in IE6, S4/5, Chrome
102
+ // en.wikipedia.org/wiki/User:Davidgothberg/Test59
103
+ pre,
104
+ code,
105
+ kbd,
106
+ samp {
107
+ font-family: monospace, serif;
108
+ _font-family: 'courier new', monospace;
109
+ font-size: 1em;
110
+ }
75
111
  }
76
112
 
77
113
  // Improves readability of pre-formatted text in all browsers
@@ -81,16 +117,22 @@
81
117
  word-wrap: break-word;
82
118
  }
83
119
 
84
- // Addresses CSS quotes not supported in IE6/7
85
- q {
86
- quotes: none;
120
+ @if ($include-ie-normalization
121
+ or $include-ie6-normalization
122
+ or $include-ie7-normalization) {
123
+ // Addresses CSS quotes not supported in IE6/7
124
+ q {
125
+ quotes: none;
126
+ }
87
127
  }
88
128
 
89
- // Addresses quote property not supported in S4
90
- q:before,
91
- q:after {
92
- content: '';
93
- content: none;
129
+ @if $include-sa-normalization {
130
+ // Addresses quote property not supported in S4
131
+ q:before,
132
+ q:after {
133
+ content: '';
134
+ content: none;
135
+ }
94
136
  }
95
137
 
96
138
  small {
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: compass-normalize-plugin
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.1'
4
+ version: 0.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,11 +11,11 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2012-03-29 00:00:00.000000000 Z
14
+ date: 2012-03-31 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: compass
18
- requirement: &70365600613960 !ruby/object:Gem::Requirement
18
+ requirement: &70353196025680 !ruby/object:Gem::Requirement
19
19
  none: false
20
20
  requirements:
21
21
  - - ! '>='
@@ -23,7 +23,7 @@ dependencies:
23
23
  version: 0.11.1
24
24
  type: :runtime
25
25
  prerelease: false
26
- version_requirements: *70365600613960
26
+ version_requirements: *70353196025680
27
27
  description: This is a normalize.css extension for the Compass framework.
28
28
  email: johannes@roettger.us
29
29
  executables: []
@@ -36,6 +36,7 @@ files:
36
36
  - Manifest
37
37
  - Rakefile
38
38
  - README.md
39
+ - scss/_config.scss
39
40
  - scss/_normalize.scss
40
41
  - scss/normalize/_base.scss
41
42
  - scss/normalize/_embedded.scss