wp_scaffold 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +6 -0
  3. data/.rspec +2 -0
  4. data/Guardfile +8 -0
  5. data/README.md +9 -1
  6. data/bin/wp +19 -8
  7. data/lib/.DS_Store +0 -0
  8. data/lib/wp_scaffold.rb +27 -8
  9. data/lib/wp_scaffold/helpers/text_helpers.rb +19 -0
  10. data/lib/wp_scaffold/models/generator.rb +43 -0
  11. data/lib/wp_scaffold/models/generators/custom_post_type.rb +26 -0
  12. data/lib/wp_scaffold/models/generators/setting.rb +14 -0
  13. data/lib/wp_scaffold/models/generators/theme.rb +21 -0
  14. data/lib/wp_scaffold/templates/custom_post_type/custom-post-types/custom.php +30 -0
  15. data/lib/wp_scaffold/templates/custom_post_type/page-custom.php.erb +38 -0
  16. data/lib/wp_scaffold/templates/custom_post_type/single-custom.php.erb +25 -0
  17. data/lib/wp_scaffold/templates/setting/wp_scaffold_settings.txt.erb +1 -0
  18. data/lib/wp_scaffold/templates/{theme_base → theme/custom_theme}/README.md +1 -1
  19. data/lib/wp_scaffold/templates/{theme_base → theme/custom_theme}/category.php +0 -0
  20. data/lib/wp_scaffold/templates/{theme_base → theme/custom_theme}/footer.php +0 -0
  21. data/lib/wp_scaffold/templates/{theme_base → theme/custom_theme}/front-page.php +0 -0
  22. data/lib/wp_scaffold/templates/{theme_base → theme/custom_theme}/functions.php +8 -4
  23. data/lib/wp_scaffold/templates/{theme_base → theme/custom_theme}/functions/breadcrumbs.php +0 -0
  24. data/lib/wp_scaffold/templates/{theme_base → theme/custom_theme}/header.php +6 -5
  25. data/lib/wp_scaffold/templates/{theme_base → theme/custom_theme}/home.php +0 -0
  26. data/lib/wp_scaffold/templates/{theme_base → theme/custom_theme}/index.php +0 -0
  27. data/lib/wp_scaffold/templates/theme/custom_theme/js/main.js +7 -0
  28. data/lib/wp_scaffold/templates/{theme_base → theme/custom_theme}/js/vendor/fastclick.js +0 -0
  29. data/lib/wp_scaffold/templates/{theme_base → theme/custom_theme}/js/vendor/html5shiv.js +0 -0
  30. data/lib/wp_scaffold/templates/{theme_base → theme/custom_theme}/js/vendor/jquery.easydropdown.min.js +0 -0
  31. data/lib/wp_scaffold/templates/{theme_base → theme/custom_theme}/js/vendor/retina-1.1.0.min.js +0 -0
  32. data/lib/wp_scaffold/templates/{theme_base → theme/custom_theme}/page.php +0 -0
  33. data/lib/wp_scaffold/templates/{theme_base → theme/custom_theme}/partials/content-post.php +0 -0
  34. data/lib/wp_scaffold/templates/{theme_base → theme/custom_theme}/screenshot.png +0 -0
  35. data/lib/wp_scaffold/templates/{theme_base → theme/custom_theme}/single.php +0 -0
  36. data/lib/wp_scaffold/templates/theme/custom_theme/style.css +7 -0
  37. data/lib/wp_scaffold/usage.txt +2 -1
  38. data/lib/wp_scaffold/version.rb +1 -1
  39. data/spec/models/cpt_spec.rb +38 -0
  40. data/spec/models/generator_spec.rb +38 -0
  41. data/spec/models/setting_spec.rb +33 -0
  42. data/spec/models/theme_spec.rb +35 -0
  43. data/spec/spec_helper.rb +31 -0
  44. data/spec/templates/files/php/test_file_3.php.erb +5 -0
  45. data/spec/templates/files/test_file_1.txt +1 -0
  46. data/spec/templates/files/test_file_2.txt.erb +1 -0
  47. data/spec/wp_scaffold_spec.rb +34 -0
  48. data/wp_scaffold.gemspec +4 -1
  49. metadata +95 -36
  50. data/lib/wp_scaffold/generator.rb +0 -81
  51. data/lib/wp_scaffold/helper.rb +0 -11
  52. data/lib/wp_scaffold/templates/.DS_Store +0 -0
  53. data/lib/wp_scaffold/templates/custom_post_type/page-custom.php +0 -50
  54. data/lib/wp_scaffold/templates/custom_post_type/register-cpt.php +0 -31
  55. data/lib/wp_scaffold/templates/custom_post_type/single-custom.php +0 -18
  56. data/lib/wp_scaffold/templates/theme_base/.gitignore +0 -2
  57. data/lib/wp_scaffold/templates/theme_base/coffee/main.coffee +0 -2
  58. data/lib/wp_scaffold/templates/theme_base/functions/theme-settings.php +0 -60
  59. data/lib/wp_scaffold/templates/theme_base/js/main.js +0 -2
  60. data/lib/wp_scaffold/templates/theme_base/style.css +0 -211
  61. data/lib/wp_scaffold/templates/theme_base/styles/_base.scss +0 -36
  62. data/lib/wp_scaffold/templates/theme_base/styles/_grid.scss +0 -327
  63. data/lib/wp_scaffold/templates/theme_base/styles/_normalize.scss +0 -410
  64. data/lib/wp_scaffold/templates/theme_base/styles/style.scss +0 -19
@@ -1,36 +0,0 @@
1
- /*--- Browser Reset ---*/
2
-
3
- * {
4
- margin:0;
5
- padding:0;
6
- -webkit-box-sizing: border-box;
7
- -moz-box-sizing: border-box;
8
- box-sizing: border-box;
9
- }
10
-
11
- :focus {outline:none;}
12
- ::-moz-focus-inner {border:0;}
13
-
14
- a {
15
- cursor: pointer;
16
- }
17
-
18
- a, img {
19
- border:0;
20
- outline:none;
21
- text-decoration:none;
22
- }
23
-
24
- ul {
25
- list-style:none;
26
- }
27
-
28
- html {
29
- height: 100%;
30
- }
31
-
32
- body {
33
- text-align: center;
34
- height: 100%;
35
- }
36
-
@@ -1,327 +0,0 @@
1
- // Media Queries
2
- $x-small-screen: 640px;
3
- $small-screen: 800px;
4
- $medium-screen: 1024px;
5
- $large-screen: 1280px;
6
- $x-large-screen: 1400px;
7
-
8
- $x-small: "only screen";
9
- $small: "only screen and (min-width: #{$small-screen})";
10
- $medium: "only screen and (min-width: #{$medium-screen})";
11
- $large: "only screen and (min-width: #{$large-screen})";
12
- $x-large: "only screen and (min-width: #{$x-large-screen})";
13
-
14
- $screen: "only screen";
15
- $landscape: "only screen and (orientation: landscape)";
16
- $portrait: "only screen and (orientation: portrait)";
17
-
18
-
19
- // Grid Options
20
- $row-width: 1280px;
21
- $column-gutter: 60px;
22
- $total-columns: 12;
23
-
24
-
25
- // debug
26
- .row.debug {
27
- background: #ffc;
28
-
29
- .columns {
30
- background: #c9b;
31
- margin-bottom: 20px;
32
- min-height: 200px;
33
- }
34
- }
35
-
36
- // .columns {
37
- // border-right: 1px solid #0000ff;
38
- // border-left: 1px solid #0000ff;
39
- // }
40
-
41
-
42
- // ------------------- GRID GENERATOR ------------------- \\
43
-
44
-
45
- // We use this to do clear floats
46
- @mixin clearfix() {
47
- *zoom:1;
48
- &:before, &:after { content: " "; display: table; }
49
- &:after { clear: both; }
50
- }
51
-
52
-
53
- *,
54
- *:before,
55
- *:after {
56
- -webkit-box-sizing: border-box;
57
- -moz-box-sizing: border-box;
58
- box-sizing: border-box;
59
- }
60
-
61
-
62
- // Miscellaneous useful HTML classes
63
- .left { float: left !important; }
64
- .right { float: right !important; }
65
- .text-left { text-align: left !important; }
66
- .text-right { text-align: right !important; }
67
- .text-center { text-align: center !important; }
68
- .text-justify { text-align: justify !important; }
69
- .hide { display: none; }
70
-
71
-
72
- // NOTE: No need to change this conditional statement, $text-direction variable controls it all.
73
- $default-float: left !default;
74
- $opposite-direction: right !default;
75
-
76
-
77
- @function gridCalc($colNumber, $totalColumns) {
78
- @return percentage(($colNumber / $totalColumns));
79
- }
80
-
81
-
82
- // Create default, nested, and collapsed rows
83
- @mixin grid-row($behavior: false) {
84
-
85
- // use @include grid-row(nest); to include a nested row
86
- @if $behavior == nest {
87
- margin-#{$default-float}: -($column-gutter/2);
88
- margin-#{$opposite-direction}: -($column-gutter/2);
89
- max-width: none;
90
- width: auto;
91
- }
92
-
93
- // use @include grid-row(collapse); to collapsed a container row margins
94
- @else if $behavior == collapse {
95
- margin-#{$default-float}: 0;
96
- margin-#{$opposite-direction}: 0;
97
- max-width: $row-width;
98
- width: 100%;
99
- }
100
-
101
- // use @include grid-row(nest-collapse); to collapse outer margins on a nested row
102
- @else if $behavior == nest-collapse {
103
- margin-#{$default-float}: 0;
104
- margin-#{$opposite-direction}: 0;
105
- max-width: none;
106
- width: auto;
107
- }
108
-
109
- // use @include grid-row; to use a container row
110
- @else {
111
- margin-#{$default-float}: auto;
112
- margin-#{$opposite-direction}: auto;
113
- margin-top: 0;
114
- margin-bottom: 0;
115
- max-width: $row-width;
116
- width: 100%;
117
- }
118
-
119
- @include clearfix;
120
- }
121
-
122
-
123
- // For creating columns - @include these inside a media query to control small vs. large grid layouts
124
- @mixin grid-column($columns:false, $last-column:false, $center:false, $offset:false, $push:false, $pull:false, $collapse:false, $float:true, $include-position-relative: false) {
125
-
126
- // If collapsed, get rid of gutter padding
127
- @if $collapse {
128
- padding-left: 0;
129
- padding-right: 0;
130
- }
131
-
132
- // Gutter padding whenever a column isn't set to collapse
133
- // (use $collapse:null to do nothing)
134
- @else if $collapse == false {
135
- padding-left: $column-gutter / 2;
136
- padding-right: $column-gutter / 2;
137
- }
138
-
139
- // If a column number is given, calculate width
140
- @if $columns {
141
- width: gridCalc($columns, $total-columns);
142
-
143
- // If last column, float naturally instead of to the right
144
- @if $last-column { float: $opposite-direction; }
145
- }
146
-
147
- // If offset, calculate appropriate margins
148
- @if $offset { margin-#{$default-float}: gridCalc($offset, $total-columns); }
149
-
150
- // Source Ordering, adds left/right depending on which you use.
151
- @if $push { #{$default-float}: gridCalc($push, $total-columns); #{$opposite-direction}: auto; }
152
- @if $pull { #{$opposite-direction}: gridCalc($pull, $total-columns); #{$default-float}: auto; }
153
-
154
- // If centered, get rid of float and add appropriate margins
155
- @if $center {
156
- margin-#{$default-float}: auto;
157
- margin-#{$opposite-direction}: auto;
158
- float: none !important;
159
- }
160
-
161
- @if $float {
162
- @if $float == left or $float == true { float: $default-float; }
163
- @else if $float == right { float: $opposite-direction; }
164
- @else { float: none; }
165
- }
166
-
167
- // This helps us not need to repeat "position:relative" everywehere
168
- @if $include-position-relative { position: relative; }
169
- }
170
-
171
-
172
- /* Grid HTML Classes */
173
- .row {
174
- @include grid-row;
175
-
176
- &.collapse {
177
- .column,
178
- .columns { @include grid-column($collapse:true); }
179
- }
180
-
181
- .row { @include grid-row($behavior:nest);
182
- &.collapse { @include grid-row($behavior:nest-collapse); }
183
- }
184
- }
185
-
186
- .column,
187
- .columns { @include grid-column($columns:$total-columns, $include-position-relative: true); }
188
-
189
- @media #{$x-small} {
190
-
191
- @for $i from 1 through $total-columns {
192
- .x-small#{-$i} { @include grid-column($columns:$i,$collapse:null,$float:false); }
193
- }
194
-
195
- @for $i from 0 through $total-columns - 2 {
196
- .x-small-offset-#{$i} { @include grid-column($offset:$i, $collapse:null,$float:false); }
197
- }
198
-
199
- [class*="column"] + [class*="column"]:last-child { float: $opposite-direction; }
200
- [class*="column"] + [class*="column"].end { float: $default-float; }
201
-
202
- .x-small-hidden { display: none !important; }
203
- .x-small-show { display: block !important; }
204
-
205
- .column.x-small-centered,
206
- .columns.x-small-centered { @include grid-column($center:true, $collapse:null, $float:false); }
207
- }
208
-
209
- @media #{$small} {
210
-
211
- @for $i from 1 through $total-columns {
212
- .small#{-$i} { @include grid-column($columns:$i,$collapse:null,$float:false); }
213
- }
214
-
215
- @for $i from 0 through $total-columns - 1 {
216
- .small-offset-#{$i} { @include grid-column($offset:$i, $collapse:null,$float:false); }
217
- }
218
-
219
- @for $i from 1 through $total-columns - 1 {
220
- .small-push#{-$i} { @include grid-column($push:$i, $collapse:null, $float:false); }
221
- .small-pull#{-$i} { @include grid-column($pull:$i, $collapse:null, $float:false); }
222
- }
223
-
224
- .small-hidden { display: none !important; }
225
- .small-show { display: block !important; }
226
-
227
- .column.small-centered,
228
- .columns.small-centered { @include grid-column($center:true, $collapse:null, $float:false); }
229
-
230
- .column.small-uncentered,
231
- .columns.small-uncentered {
232
- margin-#{$default-float}: 0;
233
- margin-#{$opposite-direction}: 0;
234
- float: $default-float !important;
235
- }
236
-
237
- }
238
-
239
- @media #{$medium} {
240
-
241
- @for $i from 1 through $total-columns {
242
- .medium#{-$i} { @include grid-column($columns:$i,$collapse:null,$float:false); }
243
- }
244
-
245
- @for $i from 0 through $total-columns - 1 {
246
- .medium-offset-#{$i} { @include grid-column($offset:$i, $collapse:null,$float:false); }
247
- }
248
-
249
- @for $i from 1 through $total-columns - 1 {
250
- .medium-push#{-$i} { @include grid-column($push:$i, $collapse:null, $float:false); }
251
- .medium-pull#{-$i} { @include grid-column($pull:$i, $collapse:null, $float:false); }
252
- }
253
-
254
- .medium-hidden { display: none !important; }
255
- .medium-show { display: block !important; }
256
-
257
- .column.medium-centered,
258
- .columns.medium-centered { @include grid-column($center:true, $collapse:null, $float:false); }
259
-
260
- .column.medium-uncentered,
261
- .columns.medium-uncentered {
262
- margin-#{$default-float}: 0;
263
- margin-#{$opposite-direction}: 0;
264
- float: $default-float !important;
265
- }
266
-
267
- }
268
-
269
- @media #{$large} {
270
-
271
- @for $i from 1 through $total-columns {
272
- .large#{-$i} { @include grid-column($columns:$i,$collapse:null,$float:false); }
273
- }
274
-
275
- @for $i from 0 through $total-columns - 1 {
276
- .large-offset-#{$i} { @include grid-column($offset:$i, $collapse:null,$float:false); }
277
- }
278
-
279
- @for $i from 1 through $total-columns - 1 {
280
- .large-push#{-$i} { @include grid-column($push:$i, $collapse:null, $float:false); }
281
- .large-pull#{-$i} { @include grid-column($pull:$i, $collapse:null, $float:false); }
282
- }
283
-
284
- .large-hidden { display: none !important; }
285
- .large-show { display: block !important; }
286
-
287
- .column.large-centered,
288
- .columns.large-centered { @include grid-column($center:true, $collapse:null, $float:false); }
289
-
290
- .column.large-uncentered,
291
- .columns.large-uncentered {
292
- margin-#{$default-float}: 0;
293
- margin-#{$opposite-direction}: 0;
294
- float: $default-float !important;
295
- }
296
-
297
- }
298
-
299
- @media #{$x-large} {
300
-
301
- @for $i from 1 through $total-columns {
302
- .x-large#{-$i} { @include grid-column($columns:$i,$collapse:null,$float:false); }
303
- }
304
-
305
- @for $i from 0 through $total-columns - 1 {
306
- .x-large-offset-#{$i} { @include grid-column($offset:$i, $collapse:null,$float:false); }
307
- }
308
-
309
- @for $i from 1 through $total-columns - 1 {
310
- .x-large-push#{-$i} { @include grid-column($push:$i, $collapse:null, $float:false); }
311
- .x-large-pull#{-$i} { @include grid-column($pull:$i, $collapse:null, $float:false); }
312
- }
313
-
314
- .x-large-hidden { display: none !important; }
315
- .x-large-show { display: block !important; }
316
-
317
- .column.x-large-centered,
318
- .columns.x-large-centered { @include grid-column($center:true, $collapse:null, $float:false); }
319
-
320
- .column.x-large-uncentered,
321
- .columns.x-large-uncentered {
322
- margin-#{$default-float}: 0;
323
- margin-#{$opposite-direction}: 0;
324
- float: $default-float !important;
325
- }
326
-
327
- }
@@ -1,410 +0,0 @@
1
- /*! normalize.css v2.1.2 | MIT License | git.io/normalize */
2
-
3
- /* ==========================================================================
4
- HTML5 display definitions
5
- ========================================================================== */
6
-
7
- /**
8
- * Correct `block` display not defined in IE 8/9.
9
- */
10
-
11
- article,
12
- aside,
13
- details,
14
- figcaption,
15
- figure,
16
- footer,
17
- header,
18
- hgroup,
19
- main,
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
-
30
- audio,
31
- canvas,
32
- video {
33
- display: inline-block;
34
- }
35
-
36
- /**
37
- * Prevent modern browsers from displaying `audio` without controls.
38
- * Remove excess height in iOS 5 devices.
39
- */
40
-
41
- audio:not([controls]) {
42
- display: none;
43
- height: 0;
44
- }
45
-
46
- /**
47
- * Address `[hidden]` styling not present in IE 8/9.
48
- * Hide the `template` element in IE, Safari, and Firefox < 22.
49
- */
50
-
51
- [hidden],
52
- template {
53
- display: none;
54
- }
55
-
56
- script {
57
- display: none !important;
58
- }
59
-
60
- /* ==========================================================================
61
- Base
62
- ========================================================================== */
63
-
64
- /**
65
- * 1. Set default font family to sans-serif.
66
- * 2. Prevent iOS text size adjust after orientation change, without disabling
67
- * user zoom.
68
- */
69
-
70
- html {
71
- font-family: sans-serif; /* 1 */
72
- -ms-text-size-adjust: 100%; /* 2 */
73
- -webkit-text-size-adjust: 100%; /* 2 */
74
- }
75
-
76
- /**
77
- * Remove default margin.
78
- */
79
-
80
- body {
81
- margin: 0;
82
- }
83
-
84
- /* ==========================================================================
85
- Links
86
- ========================================================================== */
87
-
88
- /**
89
- * Remove the gray background color from active links in IE 10.
90
- */
91
-
92
- a {
93
- background: transparent;
94
- }
95
-
96
- /**
97
- * Address `outline` inconsistency between Chrome and other browsers.
98
- */
99
-
100
- a:focus {
101
- outline: thin dotted;
102
- }
103
-
104
- /**
105
- * Improve readability when focused and also mouse hovered in all browsers.
106
- */
107
-
108
- a:active,
109
- a:hover {
110
- outline: 0;
111
- }
112
-
113
- /* ==========================================================================
114
- Typography
115
- ========================================================================== */
116
-
117
- /**
118
- * Address variable `h1` font-size and margin within `section` and `article`
119
- * contexts in Firefox 4+, Safari 5, and Chrome.
120
- */
121
-
122
- h1 {
123
- font-size: 2em;
124
- margin: 0.67em 0;
125
- }
126
-
127
- /**
128
- * Address styling not present in IE 8/9, Safari 5, and Chrome.
129
- */
130
-
131
- abbr[title] {
132
- border-bottom: 1px dotted;
133
- }
134
-
135
- /**
136
- * Address style set to `bolder` in Firefox 4+, Safari 5, and Chrome.
137
- */
138
-
139
- b,
140
- strong {
141
- font-weight: bold;
142
- }
143
-
144
- /**
145
- * Address styling not present in Safari 5 and Chrome.
146
- */
147
-
148
- dfn {
149
- font-style: italic;
150
- }
151
-
152
- /**
153
- * Address differences between Firefox and other browsers.
154
- */
155
-
156
- hr {
157
- -moz-box-sizing: content-box;
158
- box-sizing: content-box;
159
- height: 0;
160
- }
161
-
162
- /**
163
- * Address styling not present in IE 8/9.
164
- */
165
-
166
- mark {
167
- background: #ff0;
168
- color: #000;
169
- }
170
-
171
- /**
172
- * Correct font family set oddly in Safari 5 and Chrome.
173
- */
174
-
175
- code,
176
- kbd,
177
- pre,
178
- samp {
179
- font-family: monospace, serif;
180
- font-size: 1em;
181
- }
182
-
183
- /**
184
- * Improve readability of pre-formatted text in all browsers.
185
- */
186
-
187
- pre {
188
- white-space: pre-wrap;
189
- }
190
-
191
- /**
192
- * Set consistent quote types.
193
- */
194
-
195
- q {
196
- quotes: "\201C" "\201D" "\2018" "\2019";
197
- }
198
-
199
- /**
200
- * Address inconsistent and variable font size in all browsers.
201
- */
202
-
203
- small {
204
- font-size: 80%;
205
- }
206
-
207
- /**
208
- * Prevent `sub` and `sup` affecting `line-height` in all browsers.
209
- */
210
-
211
- sub,
212
- sup {
213
- font-size: 75%;
214
- line-height: 0;
215
- position: relative;
216
- vertical-align: baseline;
217
- }
218
-
219
- sup {
220
- top: -0.5em;
221
- }
222
-
223
- sub {
224
- bottom: -0.25em;
225
- }
226
-
227
- /* ==========================================================================
228
- Embedded content
229
- ========================================================================== */
230
-
231
- /**
232
- * Remove border when inside `a` element in IE 8/9.
233
- */
234
-
235
- img {
236
- border: 0;
237
- }
238
-
239
- /**
240
- * Correct overflow displayed oddly in IE 9.
241
- */
242
-
243
- svg:not(:root) {
244
- overflow: hidden;
245
- }
246
-
247
- /* ==========================================================================
248
- Figures
249
- ========================================================================== */
250
-
251
- /**
252
- * Address margin not present in IE 8/9 and Safari 5.
253
- */
254
-
255
- figure {
256
- margin: 0;
257
- }
258
-
259
- /* ==========================================================================
260
- Forms
261
- ========================================================================== */
262
-
263
- /**
264
- * Define consistent border, margin, and padding.
265
- */
266
-
267
- fieldset {
268
- border: 1px solid #c0c0c0;
269
- margin: 0 2px;
270
- padding: 0.35em 0.625em 0.75em;
271
- }
272
-
273
- /**
274
- * 1. Correct `color` not being inherited in IE 8/9.
275
- * 2. Remove padding so people aren't caught out if they zero out fieldsets.
276
- */
277
-
278
- legend {
279
- border: 0; /* 1 */
280
- padding: 0; /* 2 */
281
- }
282
-
283
- /**
284
- * 1. Correct font family not being inherited in all browsers.
285
- * 2. Correct font size not being inherited in all browsers.
286
- * 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome.
287
- */
288
-
289
- button,
290
- input,
291
- select,
292
- textarea {
293
- font-family: inherit; /* 1 */
294
- font-size: 100%; /* 2 */
295
- margin: 0; /* 3 */
296
- }
297
-
298
- /**
299
- * Address Firefox 4+ setting `line-height` on `input` using `!important` in
300
- * the UA stylesheet.
301
- */
302
-
303
- button,
304
- input {
305
- line-height: normal;
306
- }
307
-
308
- /**
309
- * Address inconsistent `text-transform` inheritance for `button` and `select`.
310
- * All other form control elements do not inherit `text-transform` values.
311
- * Correct `button` style inheritance in Chrome, Safari 5+, and IE 8+.
312
- * Correct `select` style inheritance in Firefox 4+ and Opera.
313
- */
314
-
315
- button,
316
- select {
317
- text-transform: none;
318
- }
319
-
320
- /**
321
- * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
322
- * and `video` controls.
323
- * 2. Correct inability to style clickable `input` types in iOS.
324
- * 3. Improve usability and consistency of cursor style between image-type
325
- * `input` and others.
326
- */
327
-
328
- button,
329
- html input[type="button"], /* 1 */
330
- input[type="reset"],
331
- input[type="submit"] {
332
- -webkit-appearance: button; /* 2 */
333
- cursor: pointer; /* 3 */
334
- }
335
-
336
- /**
337
- * Re-set default cursor for disabled elements.
338
- */
339
-
340
- button[disabled],
341
- html input[disabled] {
342
- cursor: default;
343
- }
344
-
345
- /**
346
- * 1. Address box sizing set to `content-box` in IE 8/9.
347
- * 2. Remove excess padding in IE 8/9.
348
- */
349
-
350
- input[type="checkbox"],
351
- input[type="radio"] {
352
- box-sizing: border-box; /* 1 */
353
- padding: 0; /* 2 */
354
- }
355
-
356
- /**
357
- * 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome.
358
- * 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome
359
- * (include `-moz` to future-proof).
360
- */
361
-
362
- input[type="search"] {
363
- -webkit-appearance: textfield; /* 1 */
364
- -moz-box-sizing: content-box;
365
- -webkit-box-sizing: content-box; /* 2 */
366
- box-sizing: content-box;
367
- }
368
-
369
- /**
370
- * Remove inner padding and search cancel button in Safari 5 and Chrome
371
- * on OS X.
372
- */
373
-
374
- input[type="search"]::-webkit-search-cancel-button,
375
- input[type="search"]::-webkit-search-decoration {
376
- -webkit-appearance: none;
377
- }
378
-
379
- /**
380
- * Remove inner padding and border in Firefox 4+.
381
- */
382
-
383
- button::-moz-focus-inner,
384
- input::-moz-focus-inner {
385
- border: 0;
386
- padding: 0;
387
- }
388
-
389
- /**
390
- * 1. Remove default vertical scrollbar in IE 8/9.
391
- * 2. Improve readability and alignment in all browsers.
392
- */
393
-
394
- textarea {
395
- overflow: auto; /* 1 */
396
- vertical-align: top; /* 2 */
397
- }
398
-
399
- /* ==========================================================================
400
- Tables
401
- ========================================================================== */
402
-
403
- /**
404
- * Remove most spacing between table cells.
405
- */
406
-
407
- table {
408
- border-collapse: collapse;
409
- border-spacing: 0;
410
- }