jekyll 0.12.1 → 1.0.0.beta1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of jekyll might be problematic. Click here for more details.

Files changed (124) hide show
  1. data/CONTRIBUTING.md +67 -0
  2. data/Gemfile +1 -1
  3. data/History.txt +50 -6
  4. data/README.textile +10 -6
  5. data/Rakefile +74 -36
  6. data/bin/jekyll +78 -276
  7. data/cucumber.yml +3 -1
  8. data/features/create_sites.feature +1 -1
  9. data/features/drafts.feature +25 -0
  10. data/features/site_configuration.feature +1 -1
  11. data/features/step_definitions/jekyll_steps.rb +13 -3
  12. data/features/support/env.rb +3 -1
  13. data/jekyll.gemspec +73 -17
  14. data/lib/jekyll.rb +31 -21
  15. data/lib/jekyll/command.rb +12 -0
  16. data/lib/jekyll/commands/build.rb +81 -0
  17. data/lib/jekyll/commands/serve.rb +28 -0
  18. data/lib/jekyll/converter.rb +1 -3
  19. data/lib/jekyll/converters/identity.rb +13 -14
  20. data/lib/jekyll/converters/markdown.rb +128 -128
  21. data/lib/jekyll/converters/textile.rb +37 -37
  22. data/lib/jekyll/convertible.rb +6 -4
  23. data/lib/jekyll/core_ext.rb +9 -1
  24. data/lib/jekyll/draft.rb +35 -0
  25. data/lib/jekyll/errors.rb +1 -3
  26. data/lib/jekyll/filters.rb +13 -4
  27. data/lib/jekyll/generator.rb +1 -4
  28. data/lib/jekyll/generators/pagination.rb +46 -46
  29. data/lib/jekyll/layout.rb +0 -2
  30. data/lib/jekyll/mime.types +1588 -0
  31. data/lib/jekyll/page.rb +24 -8
  32. data/lib/jekyll/plugin.rb +0 -2
  33. data/lib/jekyll/post.rb +66 -40
  34. data/lib/jekyll/site.rb +96 -20
  35. data/lib/jekyll/static_file.rb +0 -2
  36. data/lib/jekyll/tags/gist.rb +19 -0
  37. data/lib/jekyll/tags/highlight.rb +63 -62
  38. data/lib/jekyll/tags/include.rb +25 -25
  39. data/lib/jekyll/tags/post_url.rb +30 -25
  40. data/script/bootstrap +2 -0
  41. data/site/.gitignore +4 -0
  42. data/site/CNAME +1 -0
  43. data/site/README +1 -0
  44. data/site/_config.yml +5 -0
  45. data/site/_includes/analytics.html +32 -0
  46. data/site/_includes/docs_contents.html +82 -0
  47. data/site/_includes/footer.html +15 -0
  48. data/site/_includes/header.html +26 -0
  49. data/site/_includes/section_nav.html +22 -0
  50. data/site/_includes/top.html +14 -0
  51. data/site/_layouts/default.html +12 -0
  52. data/site/_layouts/docs.html +21 -0
  53. data/site/_posts/2012-07-01-configuration.md +277 -0
  54. data/site/_posts/2012-07-01-contributing.md +66 -0
  55. data/site/_posts/2012-07-01-deployment-methods.md +108 -0
  56. data/site/_posts/2012-07-01-extras.md +103 -0
  57. data/site/_posts/2012-07-01-frontmatter.md +120 -0
  58. data/site/_posts/2012-07-01-github-pages.md +34 -0
  59. data/site/_posts/2012-07-01-heroku.md +8 -0
  60. data/site/_posts/2012-07-01-home.md +47 -0
  61. data/site/_posts/2012-07-01-installation.md +43 -0
  62. data/site/_posts/2012-07-01-migrations.md +180 -0
  63. data/site/_posts/2012-07-01-pages.md +62 -0
  64. data/site/_posts/2012-07-01-pagination.md +116 -0
  65. data/site/_posts/2012-07-01-permalinks.md +163 -0
  66. data/site/_posts/2012-07-01-plugins.md +384 -0
  67. data/site/_posts/2012-07-01-posts.md +106 -0
  68. data/site/_posts/2012-07-01-resources.md +49 -0
  69. data/site/_posts/2012-07-01-sites.md +28 -0
  70. data/site/_posts/2012-07-01-structure.md +95 -0
  71. data/site/_posts/2012-07-01-templates.md +217 -0
  72. data/site/_posts/2012-07-01-troubleshooting.md +108 -0
  73. data/site/_posts/2012-07-01-usage.md +38 -0
  74. data/site/_posts/2012-07-01-variables.md +166 -0
  75. data/site/css/grid.css +62 -0
  76. data/site/css/normalize.css +504 -0
  77. data/site/css/pygments.css +70 -0
  78. data/site/css/style.css +697 -0
  79. data/site/docs/index.html +11 -0
  80. data/site/favicon.png +0 -0
  81. data/site/img/article-footer.png +0 -0
  82. data/site/img/footer-arrow.png +0 -0
  83. data/site/img/footer-logo.png +0 -0
  84. data/site/img/logo-2x.png +0 -0
  85. data/site/img/octojekyll.png +0 -0
  86. data/site/img/tube.png +0 -0
  87. data/site/img/tube1x.png +0 -0
  88. data/site/index.html +77 -0
  89. data/site/js/modernizr-2.5.3.min.js +4 -0
  90. data/test/fixtures/broken_front_matter2.erb +4 -0
  91. data/test/fixtures/broken_front_matter3.erb +7 -0
  92. data/test/fixtures/exploit_front_matter.erb +4 -0
  93. data/test/helper.rb +16 -0
  94. data/test/source/_posts/2013-01-12-nil-layout.textile +6 -0
  95. data/test/source/_posts/2013-01-12-no-layout.textile +5 -0
  96. data/test/source/contacts/bar.html +5 -0
  97. data/test/source/contacts/index.html +5 -0
  98. data/test/test_configuration.rb +7 -8
  99. data/test/test_convertible.rb +29 -0
  100. data/test/test_core_ext.rb +22 -0
  101. data/test/test_generated_site.rb +1 -1
  102. data/test/test_kramdown.rb +3 -3
  103. data/test/test_page.rb +88 -2
  104. data/test/test_post.rb +42 -6
  105. data/test/test_rdiscount.rb +1 -1
  106. data/test/test_redcarpet.rb +1 -1
  107. data/test/test_redcloth.rb +6 -6
  108. data/test/test_site.rb +73 -8
  109. data/test/test_tags.rb +36 -13
  110. metadata +150 -19
  111. data/lib/jekyll/migrators/csv.rb +0 -26
  112. data/lib/jekyll/migrators/drupal.rb +0 -103
  113. data/lib/jekyll/migrators/enki.rb +0 -49
  114. data/lib/jekyll/migrators/joomla.rb +0 -53
  115. data/lib/jekyll/migrators/marley.rb +0 -52
  116. data/lib/jekyll/migrators/mephisto.rb +0 -84
  117. data/lib/jekyll/migrators/mt.rb +0 -86
  118. data/lib/jekyll/migrators/posterous.rb +0 -67
  119. data/lib/jekyll/migrators/rss.rb +0 -47
  120. data/lib/jekyll/migrators/textpattern.rb +0 -58
  121. data/lib/jekyll/migrators/tumblr.rb +0 -195
  122. data/lib/jekyll/migrators/typo.rb +0 -51
  123. data/lib/jekyll/migrators/wordpress.rb +0 -294
  124. data/lib/jekyll/migrators/wordpressdotcom.rb +0 -70
@@ -0,0 +1,38 @@
1
+ ---
2
+ layout: docs
3
+ title: Basic Usage
4
+ prev_section: installation
5
+ next_section: structure
6
+ ---
7
+
8
+ The Jekyll gem makes a `jekyll` executable available to you in your Terminal window. You can use this command in a number of ways:
9
+
10
+ {% highlight bash %}
11
+ jekyll build
12
+ #=> The current folder will get generated into ./_site
13
+ jekyll build --destination <destination>
14
+ #=> The current folder will get generated into <destination>
15
+ jekyll build --source <source> --destination <destination>
16
+ #=> The <source> folder will get generated into <destination>
17
+ jekyll build --watch
18
+ #=> The current folder will get generated into ./_site,
19
+ # and watch for changes and regenerate automatically.
20
+ {% endhighlight %}
21
+
22
+ Jekyll also comes with a built-in development server that will allow you to preview what the generated site will look like in your browser locally.
23
+
24
+ {% highlight bash %}
25
+ jekyll serve
26
+ #=> A development server will run at http://localhost:4000/
27
+ jekyll serve --watch
28
+ #=> As above, but watch for changes and regenerate automatically too.
29
+ {% endhighlight %}
30
+
31
+ These are just some of the many [configuration options](../configuration) available. All configuration options can either be specified as flags on the command line, or alternatively (and more commonly) they can be specified in a `_config.yml` file at the root of the source directory. Jekyll will automatically configuration options from this file when run, so placing the following one line in the configuration file will mean that running `jekyll build` or `jekyll serve` would be equivalent to running `jekyll [build|serve] --source _source --destination _deploy`:
32
+
33
+ {% highlight yaml %}
34
+ source: _source
35
+ destination: _deploy
36
+ {% endhighlight %}
37
+
38
+ For more about the possible configuration options, see the [configuration](../configuration) page.
@@ -0,0 +1,166 @@
1
+ ---
2
+ layout: docs
3
+ title: Variables
4
+ prev_section: pages
5
+ next_section: migrations
6
+ ---
7
+
8
+ Jekyll traverses your site looking for files to process. Any files with [YAML Front Matter](../frontmatter) are subject to processing. For each of these files, Jekyll makes a variety of data available to the pages via the [Liquid templating system](http://wiki.github.com/shopify/liquid/liquid-for-designers). The following is a reference of the available data.
9
+
10
+ ## Global Variables
11
+
12
+ <table>
13
+ <thead>
14
+ <tr>
15
+ <td>Variable</td>
16
+ <td>Description</td>
17
+ </tr>
18
+ </thead>
19
+ <tbody>
20
+ <tr>
21
+ <td><p><code>site</code></p></td>
22
+ <td><p>Sitewide information + Configuration settings from <code>_config.yml</code></p></td>
23
+ </tr>
24
+ <tr>
25
+ <td><p><code>page</code></p></td>
26
+ <td><p>This is just the <a href="../frontmatter">YAML Front Matter</a> with 2 additions: <code>url</code> and <code>content</code>.</p></td>
27
+ </tr>
28
+ <tr>
29
+ <td><p><code>content</code></p></td>
30
+ <td><p>In layout files, this contains the content of the subview(s). This is the variable used to insert the rendered content into the layout. This is not used in post files or page files.</p></td>
31
+ </tr>
32
+ <tr>
33
+ <td><p><code>paginator</code></p></td>
34
+ <td><p>When the <code>paginate</code> configuration option is set, this variable becomes available for use.</p></td>
35
+ </tr>
36
+ </tbody>
37
+ </table>
38
+
39
+ ## Site Variables
40
+
41
+ <table>
42
+ <thead>
43
+ <tr>
44
+ <td>Variable</td>
45
+ <td>Description</td>
46
+ </tr>
47
+ </thead>
48
+ <tbody>
49
+ <tr>
50
+ <td><p><code>site.time</code></p></td>
51
+ <td><p>The current time (when you run the <code>jekyll</code> command).</p></td>
52
+ </tr>
53
+ <tr>
54
+ <td><p><code>site.posts</code></p></td>
55
+ <td><p>A reverse chronological list of all Posts.</p></td>
56
+ </tr>
57
+ <tr>
58
+ <td><p><code>site.related_posts</code></p></td>
59
+ <td><p>If the page being processed is a Post, this contains a list of up to ten related Posts. By default, these are low quality but fast to compute. For high quality but slow to compute results, run the <code>jekyll</code> command with the <code>--lsi</code> (latent semantic indexing) option.</p></td>
60
+ </tr>
61
+ <tr>
62
+ <td><p><code>site.categories.CATEGORY</code></p></td>
63
+ <td><p>The list of all Posts in category <code>CATEGORY</code>.</p></td>
64
+ </tr>
65
+ <tr>
66
+ <td><p><code>site.tags.TAG</code></p></td>
67
+ <td><p>The list of all Posts with tag <code>TAG</code>.</p></td>
68
+ </tr>
69
+ <tr>
70
+ <td><p><code>site.[CONFIGURATION_DATA]</code></p></td>
71
+ <td><p>All variables set in your <code>_config.yml</code> are available through the <code>site</code> variable. For example, if you have <code>url: http://mysite.com</code> in your configuration file, then in your posts and pages it can be accessed using <code>{{ "{{ site.url " }}}}</code>. Jekyll does not parse changes to <code>_config.yml</code> in <code>watch</code> mode, you have to restart Jekyll to see changes to variables.</p></td>
72
+ </tr>
73
+ </tbody>
74
+ </table>
75
+
76
+ ## Page Variables
77
+
78
+ <table>
79
+ <thead>
80
+ <tr>
81
+ <td>Variable</td>
82
+ <td>Description</td>
83
+ </tr>
84
+ </thead>
85
+ <tbody>
86
+ <tr>
87
+ <td><p><code>page.content</code></p></td>
88
+ <td><p>The un-rendered content of the Page.</p></td>
89
+ </tr>
90
+ <tr>
91
+ <td><p><code>page.title</code></p></td>
92
+ <td><p>The title of the Post.</p></td>
93
+ </tr>
94
+ <tr>
95
+ <td><p><code>page.url</code></p></td>
96
+ <td><p>The URL of the Post without the domain. e.g. <code>/2008/12/14/my-post.html</code></p></td>
97
+ </tr>
98
+ <tr>
99
+ <td><p><code>page.date</code></p></td>
100
+ <td><p>The Date assigned to the Post. This can be overridden in a post’s front matter by specifying a new date/time in the format <code>YYYY-MM-DD HH:MM:SS</code></p></td>
101
+ </tr>
102
+ <tr>
103
+ <td><p><code>page.id</code></p></td>
104
+ <td><p>An identifier unique to the Post (useful in RSS feeds). e.g. <code>/2008/12/14/my-post</code></p></td>
105
+ </tr>
106
+ <tr>
107
+ <td><p><code>page.categories</code></p></td>
108
+ <td><p>The list of categories to which this post belongs. Categories are derived from the directory structure above the <code>_posts</code> directory. For example, a post at <code>/work/code/_posts/2008-12-24-closures.textile</code> would have this field set to <code>['work', 'code']</code>. These can also be specified in the <a href="../frontmatter">YAML Front Matter</a>.</p></td>
109
+ </tr>
110
+ <tr>
111
+ <td><p><code>page.tags</code></p></td>
112
+ <td><p>The list of tags to which this post belongs. These can be specified in the <a href="../frontmatter">YAML Front Matter</a></p></td>
113
+ </tr>
114
+ </tbody>
115
+ </table>
116
+
117
+ <div class="note">
118
+ <h5>ProTip™: Use custom front-matter</h5>
119
+ <p>Any custom front matter that you specify will be available under <code>page</code>. For example, if you specify <code>custom_css: true</code> in a page’s front matter, that value will be available in templates as <code>page.custom_css</code>.</p>
120
+ </div>
121
+
122
+ ## Paginator
123
+
124
+ <table>
125
+ <thead>
126
+ <tr>
127
+ <td>Variable</td>
128
+ <td>Description</td>
129
+ </tr>
130
+ </thead>
131
+ <tbody>
132
+ <tr>
133
+ <td><p><code>paginator.per_page</code></p></td>
134
+ <td><p>Number of posts per page.</p></td>
135
+ </tr>
136
+ <tr>
137
+ <td><p><code>paginator.posts</code></p></td>
138
+ <td><p>Posts available for that page.</p></td>
139
+ </tr>
140
+ <tr>
141
+ <td><p><code>paginator.total_posts</code></p></td>
142
+ <td><p>Total number of posts.</p></td>
143
+ </tr>
144
+ <tr>
145
+ <td><p><code>paginator.total_pages</code></p></td>
146
+ <td><p>Total number of pages.</p></td>
147
+ </tr>
148
+ <tr>
149
+ <td><p><code>paginator.page</code></p></td>
150
+ <td><p>The number of the current page.</p></td>
151
+ </tr>
152
+ <tr>
153
+ <td><p><code>paginator.previous_page</code></p></td>
154
+ <td><p>The number of the previous page.</p></td>
155
+ </tr>
156
+ <tr>
157
+ <td><p><code>paginator.next_page</code></p></td>
158
+ <td><p>The number of the next page.</p></td>
159
+ </tr>
160
+ </tbody>
161
+ </table>
162
+
163
+ <div class="note info">
164
+ <h5>Paginator variable availability</h5>
165
+ <p>These are only available in index files, however they can be located in a subdirectory, such as <code>/blog/index.html</code>.</p>
166
+ </div>
@@ -0,0 +1,62 @@
1
+ .content {
2
+ width: 978px;
3
+ margin: 0 auto;
4
+ }
5
+ .grid1, .grid2, .grid3, .grid4, .grid5, .grid6, .grid7, .grid8, .grid9, .grid10, .grid11 {
6
+ float: left;
7
+ display: inline;
8
+ margin-left: 30px;
9
+ }
10
+ .grid1 {
11
+ width: 54px;
12
+ }
13
+ .grid2 {
14
+ width: 138px;
15
+ }
16
+ .grid3 {
17
+ width: 222px;
18
+ }
19
+ .grid4 {
20
+ width: 306px;
21
+ }
22
+ .grid5 {
23
+ width: 390px;
24
+ }
25
+ .grid6 {
26
+ width: 474px;
27
+ }
28
+ .grid7 {
29
+ width: 558px;
30
+ }
31
+ .grid8 {
32
+ width: 642px;
33
+ }
34
+ .grid9 {
35
+ width: 726px;
36
+ }
37
+ .grid10 {
38
+ width: 810px;
39
+ }
40
+ .grid11 {
41
+ width: 894px;
42
+ }
43
+ .first {
44
+ margin-left: 0;
45
+ clear: left;
46
+ }
47
+
48
+ /* clearfix */
49
+ .clear:after {
50
+ visibility: hidden;
51
+ display: block;
52
+ font-size: 0;
53
+ content: " ";
54
+ clear: both;
55
+ height: 0;
56
+ }
57
+ * html .clear {
58
+ zoom: 1;
59
+ } /* IE6 */
60
+ *:first-child+html .clear {
61
+ zoom: 1;
62
+ } /* IE7 */
@@ -0,0 +1,504 @@
1
+ /*! normalize.css 2012-03-11T12:53 UTC - http://github.com/necolas/normalize.css */
2
+
3
+ /* =============================================================================
4
+ HTML5 display definitions
5
+ ========================================================================== */
6
+
7
+ /*
8
+ * Corrects block display not defined in IE6/7/8/9 & FF3
9
+ */
10
+
11
+ article,
12
+ aside,
13
+ details,
14
+ figcaption,
15
+ figure,
16
+ footer,
17
+ header,
18
+ hgroup,
19
+ nav,
20
+ section,
21
+ summary {
22
+ display: block;
23
+ }
24
+
25
+ /*
26
+ * Corrects inline-block display not defined in IE6/7/8/9 & FF3
27
+ */
28
+
29
+ audio,
30
+ canvas,
31
+ video {
32
+ display: inline-block;
33
+ *display: inline;
34
+ *zoom: 1;
35
+ }
36
+
37
+ /*
38
+ * Prevents modern browsers from displaying 'audio' without controls
39
+ * Remove excess height in iOS5 devices
40
+ */
41
+
42
+ audio:not([controls]) {
43
+ display: none;
44
+ height: 0;
45
+ }
46
+
47
+ /*
48
+ * Addresses styling for 'hidden' attribute not present in IE7/8/9, FF3, S4
49
+ * Known issue: no IE6 support
50
+ */
51
+
52
+ [hidden] {
53
+ display: none;
54
+ }
55
+
56
+
57
+ /* =============================================================================
58
+ Base
59
+ ========================================================================== */
60
+
61
+ /*
62
+ * 1. Corrects text resizing oddly in IE6/7 when body font-size is set using em units
63
+ * http://clagnut.com/blog/348/#c790
64
+ * 2. Prevents iOS text size adjust after orientation change, without disabling user zoom
65
+ * www.456bereastreet.com/archive/201012/controlling_text_size_in_safari_for_ios_without_disabling_user_zoom/
66
+ */
67
+
68
+ html {
69
+ font-size: 100%; /* 1 */
70
+ -webkit-text-size-adjust: 100%; /* 2 */
71
+ -ms-text-size-adjust: 100%; /* 2 */
72
+ }
73
+
74
+ /*
75
+ * Addresses font-family inconsistency between 'textarea' and other form elements.
76
+ */
77
+
78
+ html,
79
+ button,
80
+ input,
81
+ select,
82
+ textarea {
83
+ font-family: sans-serif;
84
+ }
85
+
86
+ /*
87
+ * Addresses margins handled incorrectly in IE6/7
88
+ */
89
+
90
+ body {
91
+ margin: 0;
92
+ }
93
+
94
+
95
+ /* =============================================================================
96
+ Links
97
+ ========================================================================== */
98
+
99
+ /*
100
+ * Addresses outline displayed oddly in Chrome
101
+ */
102
+
103
+ a:focus {
104
+ outline: thin dotted;
105
+ }
106
+
107
+ /*
108
+ * Improves readability when focused and also mouse hovered in all browsers
109
+ * people.opera.com/patrickl/experiments/keyboard/test
110
+ */
111
+
112
+ a:hover,
113
+ a:active {
114
+ outline: 0;
115
+ }
116
+
117
+
118
+ /* =============================================================================
119
+ Typography
120
+ ========================================================================== */
121
+
122
+ /*
123
+ * Addresses font sizes and margins set differently in IE6/7
124
+ * Addresses font sizes within 'section' and 'article' in FF4+, Chrome, S5
125
+ */
126
+
127
+ h1 {
128
+ font-size: 2em;
129
+ margin: 0.67em 0;
130
+ }
131
+
132
+ h2 {
133
+ font-size: 1.5em;
134
+ margin: 0.83em 0;
135
+ }
136
+
137
+ h3 {
138
+ font-size: 1.17em;
139
+ margin: 1em 0;
140
+ }
141
+
142
+ h4 {
143
+ font-size: 1em;
144
+ margin: 1.33em 0;
145
+ }
146
+
147
+ h5 {
148
+ font-size: 0.83em;
149
+ margin: 1.67em 0;
150
+ }
151
+
152
+ h6 {
153
+ font-size: 0.75em;
154
+ margin: 2.33em 0;
155
+ }
156
+
157
+ /*
158
+ * Addresses styling not present in IE7/8/9, S5, Chrome
159
+ */
160
+
161
+ abbr[title] {
162
+ border-bottom: 1px dotted;
163
+ }
164
+
165
+ /*
166
+ * Addresses style set to 'bolder' in FF3+, S4/5, Chrome
167
+ */
168
+
169
+ b,
170
+ strong {
171
+ font-weight: bold;
172
+ }
173
+
174
+ blockquote {
175
+ margin: 1em 40px;
176
+ }
177
+
178
+ /*
179
+ * Addresses styling not present in S5, Chrome
180
+ */
181
+
182
+ dfn {
183
+ font-style: italic;
184
+ }
185
+
186
+ /*
187
+ * Addresses styling not present in IE6/7/8/9
188
+ */
189
+
190
+ mark {
191
+ background: #ff0;
192
+ color: #000;
193
+ }
194
+
195
+ /*
196
+ * Addresses margins set differently in IE6/7
197
+ */
198
+
199
+ p,
200
+ pre {
201
+ margin: 1em 0;
202
+ }
203
+
204
+ /*
205
+ * Corrects font family set oddly in IE6, S4/5, Chrome
206
+ * en.wikipedia.org/wiki/User:Davidgothberg/Test59
207
+ */
208
+
209
+ pre,
210
+ code,
211
+ kbd,
212
+ samp {
213
+ font-family: monospace, serif;
214
+ _font-family: 'courier new', monospace;
215
+ font-size: 1em;
216
+ }
217
+
218
+ /*
219
+ * Improves readability of pre-formatted text in all browsers
220
+ */
221
+
222
+ pre {
223
+ white-space: pre;
224
+ white-space: pre-wrap;
225
+ word-wrap: break-word;
226
+ }
227
+
228
+ /*
229
+ * 1. Addresses CSS quotes not supported in IE6/7
230
+ * 2. Addresses quote property not supported in S4
231
+ */
232
+
233
+ /* 1 */
234
+
235
+ q {
236
+ quotes: none;
237
+ }
238
+
239
+ /* 2 */
240
+
241
+ q:before,
242
+ q:after {
243
+ content: '';
244
+ content: none;
245
+ }
246
+
247
+ small {
248
+ font-size: 75%;
249
+ }
250
+
251
+ /*
252
+ * Prevents sub and sup affecting line-height in all browsers
253
+ * gist.github.com/413930
254
+ */
255
+
256
+ sub,
257
+ sup {
258
+ font-size: 75%;
259
+ line-height: 0;
260
+ position: relative;
261
+ vertical-align: baseline;
262
+ }
263
+
264
+ sup {
265
+ top: -0.5em;
266
+ }
267
+
268
+ sub {
269
+ bottom: -0.25em;
270
+ }
271
+
272
+
273
+ /* =============================================================================
274
+ Lists
275
+ ========================================================================== */
276
+
277
+ /*
278
+ * Addresses margins set differently in IE6/7
279
+ */
280
+
281
+ dl,
282
+ menu,
283
+ ol,
284
+ ul {
285
+ margin: 1em 0;
286
+ }
287
+
288
+ dd {
289
+ margin: 0 0 0 40px;
290
+ }
291
+
292
+ /*
293
+ * Addresses paddings set differently in IE6/7
294
+ */
295
+
296
+ menu,
297
+ ol,
298
+ ul {
299
+ padding: 0 0 0 40px;
300
+ }
301
+
302
+ /*
303
+ * Corrects list images handled incorrectly in IE7
304
+ */
305
+
306
+ nav ul,
307
+ nav ol {
308
+ list-style: none;
309
+ list-style-image: none;
310
+ }
311
+
312
+
313
+ /* =============================================================================
314
+ Embedded content
315
+ ========================================================================== */
316
+
317
+ /*
318
+ * 1. Removes border when inside 'a' element in IE6/7/8/9, FF3
319
+ * 2. Improves image quality when scaled in IE7
320
+ * code.flickr.com/blog/2008/11/12/on-ui-quality-the-little-things-client-side-image-resizing/
321
+ */
322
+
323
+ img {
324
+ border: 0; /* 1 */
325
+ -ms-interpolation-mode: bicubic; /* 2 */
326
+ }
327
+
328
+ /*
329
+ * Corrects overflow displayed oddly in IE9
330
+ */
331
+
332
+ svg:not(:root) {
333
+ overflow: hidden;
334
+ }
335
+
336
+
337
+ /* =============================================================================
338
+ Figures
339
+ ========================================================================== */
340
+
341
+ /*
342
+ * Addresses margin not present in IE6/7/8/9, S5, O11
343
+ */
344
+
345
+ figure {
346
+ margin: 0;
347
+ }
348
+
349
+
350
+ /* =============================================================================
351
+ Forms
352
+ ========================================================================== */
353
+
354
+ /*
355
+ * Corrects margin displayed oddly in IE6/7
356
+ */
357
+
358
+ form {
359
+ margin: 0;
360
+ }
361
+
362
+ /*
363
+ * Define consistent border, margin, and padding
364
+ */
365
+
366
+ fieldset {
367
+ border: 1px solid #c0c0c0;
368
+ margin: 0 2px;
369
+ padding: 0.35em 0.625em 0.75em;
370
+ }
371
+
372
+ /*
373
+ * 1. Corrects color not being inherited in IE6/7/8/9
374
+ * 2. Corrects text not wrapping in FF3
375
+ * 3. Corrects alignment displayed oddly in IE6/7
376
+ */
377
+
378
+ legend {
379
+ border: 0; /* 1 */
380
+ padding: 0;
381
+ white-space: normal; /* 2 */
382
+ *margin-left: -7px; /* 3 */
383
+ }
384
+
385
+ /*
386
+ * 1. Corrects font size not being inherited in all browsers
387
+ * 2. Addresses margins set differently in IE6/7, FF3+, S5, Chrome
388
+ * 3. Improves appearance and consistency in all browsers
389
+ */
390
+
391
+ button,
392
+ input,
393
+ select,
394
+ textarea {
395
+ font-size: 100%; /* 1 */
396
+ margin: 0; /* 2 */
397
+ vertical-align: baseline; /* 3 */
398
+ *vertical-align: middle; /* 3 */
399
+ }
400
+
401
+ /*
402
+ * Addresses FF3/4 setting line-height on 'input' using !important in the UA stylesheet
403
+ */
404
+
405
+ button,
406
+ input {
407
+ line-height: normal; /* 1 */
408
+ }
409
+
410
+ /*
411
+ * 1. Improves usability and consistency of cursor style between image-type 'input' and others
412
+ * 2. Corrects inability to style clickable 'input' types in iOS
413
+ * 3. Removes inner spacing in IE7 without affecting normal text inputs
414
+ * Known issue: inner spacing remains in IE6
415
+ */
416
+
417
+ button,
418
+ input[type="button"],
419
+ input[type="reset"],
420
+ input[type="submit"] {
421
+ cursor: pointer; /* 1 */
422
+ -webkit-appearance: button; /* 2 */
423
+ *overflow: visible; /* 3 */
424
+ }
425
+
426
+ /*
427
+ * Re-set default cursor for disabled elements
428
+ */
429
+
430
+ button[disabled],
431
+ input[disabled] {
432
+ cursor: default;
433
+ }
434
+
435
+ /*
436
+ * 1. Addresses box sizing set to content-box in IE8/9
437
+ * 2. Removes excess padding in IE8/9
438
+ * 3. Removes excess padding in IE7
439
+ Known issue: excess padding remains in IE6
440
+ */
441
+
442
+ input[type="checkbox"],
443
+ input[type="radio"] {
444
+ box-sizing: border-box; /* 1 */
445
+ padding: 0; /* 2 */
446
+ *height: 13px; /* 3 */
447
+ *width: 13px; /* 3 */
448
+ }
449
+
450
+ /*
451
+ * 1. Addresses appearance set to searchfield in S5, Chrome
452
+ * 2. Addresses box-sizing set to border-box in S5, Chrome (include -moz to future-proof)
453
+ */
454
+
455
+ input[type="search"] {
456
+ -webkit-appearance: textfield; /* 1 */
457
+ -moz-box-sizing: content-box;
458
+ -webkit-box-sizing: content-box; /* 2 */
459
+ box-sizing: content-box;
460
+ }
461
+
462
+ /*
463
+ * Removes inner padding and search cancel button in S5, Chrome on OS X
464
+ */
465
+
466
+ input[type="search"]::-webkit-search-decoration,
467
+ input[type="search"]::-webkit-search-cancel-button {
468
+ -webkit-appearance: none;
469
+ }
470
+
471
+ /*
472
+ * Removes inner padding and border in FF3+
473
+ * www.sitepen.com/blog/2008/05/14/the-devils-in-the-details-fixing-dojos-toolbar-buttons/
474
+ */
475
+
476
+ button::-moz-focus-inner,
477
+ input::-moz-focus-inner {
478
+ border: 0;
479
+ padding: 0;
480
+ }
481
+
482
+ /*
483
+ * 1. Removes default vertical scrollbar in IE6/7/8/9
484
+ * 2. Improves readability and alignment in all browsers
485
+ */
486
+
487
+ textarea {
488
+ overflow: auto; /* 1 */
489
+ vertical-align: top; /* 2 */
490
+ }
491
+
492
+
493
+ /* =============================================================================
494
+ Tables
495
+ ========================================================================== */
496
+
497
+ /*
498
+ * Remove most spacing between table cells
499
+ */
500
+
501
+ table {
502
+ border-collapse: collapse;
503
+ border-spacing: 0;
504
+ }