compass-normalize-plugin 0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/CHANGELOG.md ADDED
@@ -0,0 +1,4 @@
1
+ v0.1.0 [Mar 29 2012]
2
+ - - - - - - - - - - -
3
+
4
+ Initial import of normalize.css
data/Manifest ADDED
@@ -0,0 +1,19 @@
1
+ CHANGELOG.md
2
+ compass-normalize-plugin.gemspec
3
+ lib/normalize.rb
4
+ Manifest
5
+ Rakefile
6
+ README.md
7
+ scss/_normalize.scss
8
+ scss/normalize/_base.scss
9
+ scss/normalize/_embedded.scss
10
+ scss/normalize/_figures.scss
11
+ scss/normalize/_forms.scss
12
+ scss/normalize/_html5.scss
13
+ scss/normalize/_links.scss
14
+ scss/normalize/_lists.scss
15
+ scss/normalize/_tables.scss
16
+ scss/normalize/_typography.scss
17
+ templates/project/manifest.rb
18
+ templates/project/screen.scss
19
+ VERSION
data/README.md ADDED
@@ -0,0 +1,43 @@
1
+ # normalize.css - Compass Plugin
2
+ A Compass plugin of Nicolas Gallagher's normalize.css project.
3
+
4
+ ## Usage
5
+ Execute the following command to create a new project with compass, using normalize.css:
6
+
7
+ $ compass create my_project -r normalize --using normalize
8
+
9
+ To add normalize.css to an existing project, edit `config.rb` and add `compass` to your imports:
10
+
11
+ require 'normalize'
12
+
13
+ Import the plugin and use the mixin
14
+
15
+ @import "normalize";
16
+
17
+ @include normalize;
18
+
19
+ or include and use only parts of it:
20
+
21
+ @import "normalize/html5";
22
+ @import "normalize/base";
23
+
24
+ @include normalize-html5;
25
+ @include normalize-base;
26
+
27
+ ## 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)
37
+
38
+ ## License
39
+ Public domain
40
+
41
+ ## 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).
data/Rakefile ADDED
@@ -0,0 +1,20 @@
1
+ require 'fileutils'
2
+ require 'sass'
3
+
4
+ begin
5
+ require 'echoe'
6
+
7
+ Echoe.new('compass-normalize-plugin', open('VERSION').read) do |p|
8
+ p.summary = "Makes browsers render HTML elements consistently and in line with modern standards."
9
+ p.description = "This is a normalize.css extension for the Compass framework."
10
+ p.url = "http://roettger.us/"
11
+ p.author = "Johannes Roettger"
12
+ p.email = "johannes@roettger.us"
13
+ p.dependencies = ["compass >=0.11.1"]
14
+ p.has_rdoc = false
15
+ end
16
+
17
+ rescue LoadError => boom
18
+ puts "You are missing a dependency required for meta-operations on this gem."
19
+ puts "#{boom.to_s.capitalize}."
20
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.1
@@ -0,0 +1,42 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ Gem::Specification.new do |s|
4
+ s.version = "0.1"
5
+ s.date = %q{2012-03-29}
6
+
7
+ s.name = %q{compass-normalize-plugin}
8
+ s.authors = ["Johannes Roettger", "Nicolas Gallagher", "Jonathan Neal"]
9
+ s.summary = %q{Makes browsers render HTML elements consistently and in line with modern standards.}
10
+ s.description = %q{This is a normalize.css extension for the Compass framework.}
11
+ s.email = %q{johannes@roettger.us}
12
+ s.homepage = %q{http://roettger.us/}
13
+
14
+ s.files = [
15
+ "CHANGELOG.md",
16
+ "compass-normalize-plugin.gemspec",
17
+ "lib/normalize.rb",
18
+ "Manifest",
19
+ "Rakefile",
20
+ "README.md",
21
+ "scss/",
22
+ "scss/_normalize.scss",
23
+ "scss/normalize/",
24
+ "scss/normalize/_base.scss",
25
+ "scss/normalize/_embedded.scss",
26
+ "scss/normalize/_figures.scss",
27
+ "scss/normalize/_forms.scss",
28
+ "scss/normalize/_html5.scss",
29
+ "scss/normalize/_links.scss",
30
+ "scss/normalize/_lists.scss",
31
+ "scss/normalize/_tables.scss",
32
+ "scss/normalize/_typography.scss",
33
+ "templates/",
34
+ "templates/project/",
35
+ "templates/project/manifest.rb",
36
+ "templates/project/screen.scss",
37
+ "VERSION"
38
+ ]
39
+
40
+ s.rubygems_version = %q{1.3.6}
41
+ s.add_dependency(%q<compass>, [">= 0.11.1"])
42
+ end
data/lib/normalize.rb ADDED
@@ -0,0 +1,5 @@
1
+ require 'compass'
2
+ Compass::Frameworks.register('normalize',
3
+ :stylesheets_directory => File.join(File.dirname(__FILE__), '..', 'scss'),
4
+ :templates_directory => File.join(File.dirname(__FILE__), '..', 'templates')
5
+ )
@@ -0,0 +1,21 @@
1
+ @import "normalize/html5";
2
+ @import "normalize/base";
3
+ @import "normalize/links";
4
+ @import "normalize/typography";
5
+ @import "normalize/lists";
6
+ @import "normalize/embedded";
7
+ @import "normalize/figures";
8
+ @import "normalize/forms";
9
+ @import "normalize/tables";
10
+
11
+ @mixin normalize {
12
+ @include normalize-html5;
13
+ @include normalize-base;
14
+ @include normalize-links;
15
+ @include normalize-typography;
16
+ @include normalize-lists;
17
+ @include normalize-embedded;
18
+ @include normalize-figures;
19
+ @include normalize-forms;
20
+ @include normalize-tables;
21
+ }
@@ -0,0 +1,25 @@
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
+ html {
7
+ font-size: 100%; /* 1 */
8
+ -webkit-text-size-adjust: 100%; /* 2 */
9
+ -ms-text-size-adjust: 100%; /* 2 */
10
+ }
11
+
12
+ // Addresses font-family inconsistency between 'textarea' and other form elements.
13
+ html,
14
+ button,
15
+ input,
16
+ select,
17
+ textarea {
18
+ font-family: sans-serif;
19
+ }
20
+
21
+ // Addresses margins handled incorrectly in IE6/7
22
+ body {
23
+ margin: 0;
24
+ }
25
+ }
@@ -0,0 +1,14 @@
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
+ img {
6
+ border: 0; // 1
7
+ -ms-interpolation-mode: bicubic; // 2
8
+ }
9
+
10
+ // Corrects overflow displayed oddly in IE9
11
+ svg:not(:root) {
12
+ overflow: hidden;
13
+ }
14
+ }
@@ -0,0 +1,6 @@
1
+ @mixin normalize-figures {
2
+ // Addresses margin not present in IE6/7/8/9, S5, O11
3
+ figure {
4
+ margin: 0;
5
+ }
6
+ }
@@ -0,0 +1,103 @@
1
+ @mixin normalize-forms {
2
+ // Corrects margin displayed oddly in IE6/7
3
+ form {
4
+ margin: 0;
5
+ }
6
+
7
+ // Define consistent border, margin, and padding
8
+ fieldset {
9
+ border: 1px solid #c0c0c0;
10
+ margin: 0 2px;
11
+ padding: 0.35em 0.625em 0.75em;
12
+ }
13
+
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
+ legend {
18
+ border: 0; // 1
19
+ padding: 0;
20
+ white-space: normal; // 2
21
+ *margin-left: -7px; // 3
22
+ }
23
+
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
+ button,
28
+ input,
29
+ select,
30
+ textarea {
31
+ font-size: 100%; // 1
32
+ margin: 0; // 2
33
+ vertical-align: baseline; // 3
34
+ *vertical-align: middle; // 3
35
+ }
36
+
37
+ // Addresses FF3/4 setting line-height on 'input' using !important in the UA stylesheet
38
+ button,
39
+ input {
40
+ line-height: normal;
41
+ }
42
+
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
+ button,
48
+ input[type="button"],
49
+ input[type="reset"],
50
+ input[type="submit"] {
51
+ cursor: pointer; // 1
52
+ -webkit-appearance: button; // 2
53
+ *overflow: visible; // 3
54
+ }
55
+
56
+ // Re-set default cursor for disabled elements
57
+ button[disabled],
58
+ input[disabled] {
59
+ cursor: default;
60
+ }
61
+
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
+ input[type="checkbox"],
67
+ input[type="radio"] {
68
+ box-sizing: border-box; // 1
69
+ padding: 0; // 2
70
+ *height: 13px; // 3
71
+ *width: 13px; // 3
72
+ }
73
+
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
+ input[type="search"] {
77
+ -webkit-appearance: textfield; // 1
78
+ -moz-box-sizing: content-box;
79
+ -webkit-box-sizing: content-box; // 2
80
+ box-sizing: content-box;
81
+ }
82
+
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;
87
+ }
88
+
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;
95
+ }
96
+
97
+ // 1. Removes default vertical scrollbar in IE6/7/8/9
98
+ // 2. Improves readability and alignment in all browsers
99
+ textarea {
100
+ overflow: auto; // 1
101
+ vertical-align: top; // 2
102
+ }
103
+ }
@@ -0,0 +1,38 @@
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
+ }
16
+
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;
24
+ }
25
+
26
+ // Prevents modern browsers from displaying 'audio' without controls
27
+ // Remove excess height in iOS5 devices
28
+ audio:not([controls]) {
29
+ display: none;
30
+ height: 0;
31
+ }
32
+
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;
37
+ }
38
+ }
@@ -0,0 +1,15 @@
1
+ @mixin normalize-links {
2
+ a {
3
+ // Addresses outline displayed oddly in Chrome
4
+ &:focus {
5
+ outline: thin dotted;
6
+ }
7
+
8
+ // Improves readability when focused and also mouse hovered in all browsers
9
+ // people.opera.com/patrickl/experiments/keyboard/test
10
+ &:hover,
11
+ &:active {
12
+ outline: 0;
13
+ }
14
+ }
15
+ }
@@ -0,0 +1,29 @@
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
+ }
9
+
10
+ dd {
11
+ margin: 0 0 0 40px;
12
+ }
13
+
14
+ // Addresses paddings set differently in IE6/7
15
+ menu,
16
+ ol,
17
+ ul {
18
+ padding: 0 0 0 40px;
19
+ }
20
+
21
+ // Corrects list images handled incorrectly in IE7
22
+ nav {
23
+ ul,
24
+ ol {
25
+ list-style: none;
26
+ list-style-image: none;
27
+ }
28
+ }
29
+ }
@@ -0,0 +1,7 @@
1
+ @mixin normalize-tables {
2
+ // Remove most spacing between table cells
3
+ table {
4
+ border-collapse: collapse;
5
+ border-spacing: 0;
6
+ }
7
+ }
@@ -0,0 +1,117 @@
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;
43
+ }
44
+
45
+ blockquote {
46
+ margin: 1em 40px;
47
+ }
48
+
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;
75
+ }
76
+
77
+ // Improves readability of pre-formatted text in all browsers
78
+ pre {
79
+ white-space: pre;
80
+ white-space: pre-wrap;
81
+ word-wrap: break-word;
82
+ }
83
+
84
+ // Addresses CSS quotes not supported in IE6/7
85
+ q {
86
+ quotes: none;
87
+ }
88
+
89
+ // Addresses quote property not supported in S4
90
+ q:before,
91
+ q:after {
92
+ content: '';
93
+ content: none;
94
+ }
95
+
96
+ small {
97
+ font-size: 75%;
98
+ }
99
+
100
+ // Prevents sub and sup affecting line-height in all browsers
101
+ // gist.github.com/413930
102
+ sub,
103
+ sup {
104
+ font-size: 75%;
105
+ line-height: 0;
106
+ position: relative;
107
+ vertical-align: baseline;
108
+ }
109
+
110
+ sup {
111
+ top: -0.5em;
112
+ }
113
+
114
+ sub {
115
+ bottom: -0.25em;
116
+ }
117
+ }
@@ -0,0 +1,21 @@
1
+ stylesheet 'screen.scss', :media => "screen, projection"
2
+
3
+ description "normalize.css for Compass"
4
+
5
+ help %Q{
6
+ Provides a set of mixins for normalization:
7
+
8
+ - normalize-html5
9
+ - normalize-base
10
+ - normalize-links
11
+ - normalize-typography
12
+ - normalize-lists
13
+ - normalize-embedded
14
+ - normalize-figures
15
+ - normalize-forms
16
+ - normalize-tables
17
+ }
18
+
19
+ welcome_message %Q{
20
+ Please refer to the normalize.css documentation on GitHub.
21
+ }
@@ -0,0 +1,32 @@
1
+ @import "normalize";
2
+
3
+ @include normalize;
4
+
5
+ // It is also possible to use only parts of normalize.css
6
+ //
7
+ // @import "normalize/html5";
8
+ // @include normalize-html5;
9
+ //
10
+ // @import "normalize/base";
11
+ // @include normalize-base;
12
+ //
13
+ // @import "normalize/links";
14
+ // @include normalize-links;
15
+ //
16
+ // @import "normalize/typography";
17
+ // @include normalize-typography;
18
+ //
19
+ // @import "normalize/lists";
20
+ // @include normalize-lists;
21
+ //
22
+ // @import "normalize/embedded";
23
+ // @include normalize-embedded;
24
+ //
25
+ // @import "normalize/figures";
26
+ // @include normalize-figures;
27
+ //
28
+ // @import "normalize/forms";
29
+ // @include normalize-forms;
30
+ //
31
+ // @import "normalize/tables";
32
+ // @include normalize-tables;
metadata ADDED
@@ -0,0 +1,77 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: compass-normalize-plugin
3
+ version: !ruby/object:Gem::Version
4
+ version: '0.1'
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Johannes Roettger
9
+ - Nicolas Gallagher
10
+ - Jonathan Neal
11
+ autorequire:
12
+ bindir: bin
13
+ cert_chain: []
14
+ date: 2012-03-29 00:00:00.000000000 Z
15
+ dependencies:
16
+ - !ruby/object:Gem::Dependency
17
+ name: compass
18
+ requirement: &70365600613960 !ruby/object:Gem::Requirement
19
+ none: false
20
+ requirements:
21
+ - - ! '>='
22
+ - !ruby/object:Gem::Version
23
+ version: 0.11.1
24
+ type: :runtime
25
+ prerelease: false
26
+ version_requirements: *70365600613960
27
+ description: This is a normalize.css extension for the Compass framework.
28
+ email: johannes@roettger.us
29
+ executables: []
30
+ extensions: []
31
+ extra_rdoc_files: []
32
+ files:
33
+ - CHANGELOG.md
34
+ - compass-normalize-plugin.gemspec
35
+ - lib/normalize.rb
36
+ - Manifest
37
+ - Rakefile
38
+ - README.md
39
+ - scss/_normalize.scss
40
+ - scss/normalize/_base.scss
41
+ - scss/normalize/_embedded.scss
42
+ - scss/normalize/_figures.scss
43
+ - scss/normalize/_forms.scss
44
+ - scss/normalize/_html5.scss
45
+ - scss/normalize/_links.scss
46
+ - scss/normalize/_lists.scss
47
+ - scss/normalize/_tables.scss
48
+ - scss/normalize/_typography.scss
49
+ - templates/project/manifest.rb
50
+ - templates/project/screen.scss
51
+ - VERSION
52
+ homepage: http://roettger.us/
53
+ licenses: []
54
+ post_install_message:
55
+ rdoc_options: []
56
+ require_paths:
57
+ - lib
58
+ required_ruby_version: !ruby/object:Gem::Requirement
59
+ none: false
60
+ requirements:
61
+ - - ! '>='
62
+ - !ruby/object:Gem::Version
63
+ version: '0'
64
+ required_rubygems_version: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ requirements: []
71
+ rubyforge_project:
72
+ rubygems_version: 1.8.15
73
+ signing_key:
74
+ specification_version: 3
75
+ summary: Makes browsers render HTML elements consistently and in line with modern
76
+ standards.
77
+ test_files: []