titon-toolkit 1.2.2 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/changelog.md +42 -122
  3. data/readme.md +1 -1
  4. data/roadmap.md +7 -8
  5. data/scss/normalize.scss +157 -138
  6. data/scss/toolkit.scss +2 -0
  7. data/scss/toolkit/_common.scss +3 -19
  8. data/scss/toolkit/components/accordion.scss +1 -1
  9. data/scss/toolkit/components/blackout.scss +2 -2
  10. data/scss/toolkit/components/button-group.scss +3 -1
  11. data/scss/toolkit/components/button.scss +0 -6
  12. data/scss/toolkit/components/carousel.scss +6 -6
  13. data/scss/toolkit/components/drop.scss +13 -18
  14. data/scss/toolkit/components/flyout.scss +6 -6
  15. data/scss/toolkit/components/grid.scss +7 -4
  16. data/scss/toolkit/components/icon.scss +5 -5
  17. data/scss/toolkit/components/input.scss +3 -3
  18. data/scss/toolkit/components/lazy-load.scss +1 -1
  19. data/scss/toolkit/components/loader.scss +24 -24
  20. data/scss/toolkit/components/mask.scss +2 -2
  21. data/scss/toolkit/components/matrix.scss +4 -3
  22. data/scss/toolkit/components/modal.scss +26 -26
  23. data/scss/toolkit/components/pagination.scss +2 -2
  24. data/scss/toolkit/components/pin.scss +2 -2
  25. data/scss/toolkit/components/progress.scss +1 -1
  26. data/scss/toolkit/components/showcase.scss +9 -9
  27. data/scss/toolkit/components/step.scss +65 -0
  28. data/scss/toolkit/components/switch.scss +123 -0
  29. data/scss/toolkit/components/table.scss +5 -5
  30. data/scss/toolkit/components/tooltip.scss +11 -11
  31. data/scss/toolkit/components/type-ahead.scss +7 -10
  32. data/scss/toolkit/effects/pill.scss +10 -0
  33. data/scss/toolkit/effects/visual.scss +3 -3
  34. data/scss/toolkit/layout/base.scss +8 -8
  35. data/scss/toolkit/layout/code.scss +1 -1
  36. data/scss/toolkit/layout/form.scss +6 -12
  37. data/scss/toolkit/mixins/_layout.scss +1 -1
  38. data/scss/toolkit/mixins/_state.scss +13 -13
  39. data/scss/toolkit/themes/demo.scss +55 -10
  40. data/version.md +1 -1
  41. metadata +4 -16
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d413ce70c7079b44d459f834d3d637bcbea3d7bb
4
- data.tar.gz: 2ea9a84f877320b46f7707aa0fcad89f1482d9ec
3
+ metadata.gz: ce926ac41da8fea1a16eae9bffb316a6db9885a5
4
+ data.tar.gz: bf26b72d2ad436c8e70752c5edfecc16a41a42e6
5
5
  SHA512:
6
- metadata.gz: d4b81970cc8b02b1ec6ca2b9e306e648edaed42212ec18a7a9e8ea7ac94670efde6b53ea512d30ad536fa657a847e82cd8a9883fd27ba817b63613aee2f874d3
7
- data.tar.gz: b31044ad955c73fbd1be7c5f92b960fec80669d37be74e8e30fb89c463b4d3e42c86fa8b04e04717f4a272f6d0aed9c5b2c0ee534f8da2f8f111d21cfab240f2
6
+ metadata.gz: 5c5e466f72c7eef9988112e0e9bf90076d85c7cc085cda545d18413bbcd13917c9b38115eac334d83717438e290d5ebb829585bb3bda5e05ca01db12a76858f9
7
+ data.tar.gz: 3ebbc0599d1d6bf3406e1f14c7811e7bfbb3c39cc30f389c37e0bd86121518cd090ba1535edbf26152cf9a52ea2ee9f76350f52506fc45e715d5fd5186cafc6d
data/changelog.md CHANGED
@@ -2,132 +2,52 @@
2
2
 
3
3
  Older versions can be found in the documentation changelogs.
4
4
 
5
- ## 1.2.2 ##
6
- * Added z-index variables to all applicable components for easier layering
7
- * Fixed a bug where data attribute selectors were not being delegated to the document [[#20](https://github.com/titon/toolkit/issues/20)]
8
- * Fixed a bug where tooltips would not show above modals [[#20](https://github.com/titon/toolkit/issues/20)]
9
- * Fixed a bug where the blackout could be closed while the modal is loading [[#16](https://github.com/titon/toolkit/issues/16)]
5
+ ## 1.3.0 ##
6
+ This minor release includes 2 new components, automatic ARIA support for all applicable components,
7
+ replacing Compass with autoprefixer, removal of state prefixing, and many more bug fixes and improvements.
10
8
 
11
- ## 1.2.1 ##
12
- * Fixed a bug with `throttle()` when 0 is passed as the delay
13
- * Pin
14
- * Moved `onScroll()` logic into a new `pin()` method
15
- * Updated to use `height()` instead of `outerHeight()` to take into account parent padding
16
- * Updated to trigger pinning on page load
17
- * Type Ahead
18
- * Added `preventDefault()` when enter is pressed to stop form submissions
19
- * Fixed incorrect `cycle` and `select` events being triggered
20
-
21
- ## 1.2.0 ##
22
- This minor release includes thorough documentation for all components,
23
- a refactored event binding and management layer, a data attribute option inheritance layer,
24
- and an optimization and cleanup pass. Also bug fixes.
25
-
26
- * Added `join-classes()` function
27
- * Added `grunt production` command to compress for production purposes
28
- * Updated `grunt` command to not compress for development purposes
29
- * Renamed all `__*` methods to `on*`
30
- * Renamed `currentIndex` to `index` in all components
31
- * Removed `content-spacing()` mixin
32
- * Removed `previousIndex` properties
33
- * Removed `loadingMessage` and `errorMessage` options
34
- * Removed `.medium` class support
35
- * Removed automatic setting of `animation` and `className` CSS classes for embedded elements
36
- * Removed background and font colors from CSS to reduce CSS filesize
9
+ * Added new Step component for step based navigation
10
+ * Added new Switch component for visual checkbox switches
11
+ * Added ARIA support to all components with supported documentation
12
+ * Added CSS vendor prefixing support through [autoprefixer](https://github.com/ai/autoprefixer)
13
+ * Added namespace event triggering support to the activating node
14
+ * Removed is and has state prefixing from the CSS and JS layers
15
+ * Removed `$state-is-prefix` and `$state-has-prefix` Sass variables
16
+ * Removed individual JavaScript distribution files
17
+ * Removed Compass dependency in favor of autoprefixer
18
+ * Updated to normalize.css v3.0.1
19
+ * jQuery
20
+ * Updated `$.fn.item()` to return an empty jQuery collection if index out of range
21
+ * Refactored the `clickout` event to support delegated elements
22
+ * Removed `$.hyphenate()`
23
+ * Removed event helper methods like `clickout()`, `swipeleft()`, etc
37
24
  * Toolkit
38
- * Added `bound()` to bound a number
39
- * Added `isRetina` flag
40
- * Updated `positionTo()` to re-position if the element falls outside the viewport
25
+ * Added `aria` property to toggle support
26
+ * Added `aria()` collection method that can set ARIA attributes
27
+ * Removed `Toolkit.options.isPrefix` and `Toolkit.options.hasPrefix`
28
+ * Renamed `Toolkit.options.vendor` to `Toolkit.vendor`
29
+ * Renamed `Toolkit.createComponent()` to `Toolkit.create()`
41
30
  * Component
42
- * Refactored that event management layer within all components
43
- * Added `bindEvents()` to handle event attaching and detaching (paired with change above)
44
- * Called automatically from `enable()` and `disable()`
45
- * Added option inheritance from data attributes found on target elements and nodes
46
- * Possible through new `inheritOptions()`
47
- * Added option inheritance from parent component
48
- * Added `readOption` to find an option via data attribute of option object
49
- * Merged `setElement()` logic into `createElement()`
50
- * Removed `setElement()`
51
- * Accordion
52
- * Updated `show` event arguments to `[section, node, index]`
53
- * Base
54
- * Added `.no-scroll`
55
- * Removed `.inline`, `.inline-block`, `.static`, `.relative`, and `.absolute`
56
- * Blackout
57
- * Added a `shown` argument to the `show` event
58
- * Added `showLoader` and `hideLoader` events
59
- * Renamed `loaderMessage` option to `loadingMessage`
60
- * Button
61
- * Added outline none to `:focus` styles
62
- * Fixed a bug with `input` buttons
63
- * Button Group
64
- * Removed `!important` from negative margin properties
31
+ * Added global `cache` option to toggle AJAX response caching
32
+ * Added static `count` property to each component that tracks the number of instances in the page
33
+ * Added `uid` property that represents the current instance count
34
+ * Added `cssClass` property that represents the component name in CSS class form
35
+ * Added `id()` method to generate unique CSS class names
36
+ * Removed error and loading template generation from components (wasn't being used)
37
+ * Carousel
38
+ * Fixed a bug where `swipedown` would not trigger
39
+ * Merged `itemsElement` and `itemElement` options
40
+ * Merged `tabsElement` and `tabElement` options
41
+ * Removed `itemsWrapper`, `itemsList`, `tabsWrapper` properties
65
42
  * Drop
66
- * Added support for drops built with `ol`
67
- * Updated `show` and `hide` event arguments to `[element, node]`
68
- * Flyout
69
- * Fixed a bug where data items were being mapped with no URL
70
- * Removed `load` event from `show()` as it was being used incorrectly
71
- * Form
72
- * Renamed `.is-legendless` to `.no-legend`
73
- * Cleaned up some basic styles
43
+ * Added a global `.drop` class that all menus require
74
44
  * Grid
75
- * Changed `$grid-columns-medium` to 12
76
- * Added `$grid-push-pull` to toggle push and pull classes in output
77
- * Icon
78
- * Removed `.icon--rotate`
79
- * Input
80
- * Updated build methods to be private
81
- * Fixed an issue where select event names were incorrect
82
- * Input Group
83
- * Added small and large size support
84
- * Lazy Load
85
- * Instantiation will need to be set on a container instead of the items being loaded
86
- * Added `data-src-retina` support
87
- * Added support for lazy loading within an overflown element
88
- * Fixed a bug where hidden images were being loaded
89
- * Renamed `data-lazyload` to `data-src`
90
- * Loader
91
- * Renamed `.spinner` to `.loader-spinner`
92
- * Matrix
93
- * Replaced `.matrix-item` with `li`
94
- * Removed `selector` option
95
- * Removed inline `img` styles, use `.fluid` instead
45
+ * Added `%row` placeholder to extend row styles from
46
+ * Added `%col` placeholder to extend column styles from
47
+ * Removed `.row` (reserved now for another component)
96
48
  * Modal
97
- * Added `$modal-animation` to filter the animations in the CSS output
98
- * Updated `.modal-close` to use a `button`
99
- * Updated `ajax` and `getContent` options to be inheritable at runtime through the activating node
100
- * Refactored markup and CSS to support large height modals
101
- * Removed `flip` and `flip-vert` animations
102
- * Removed dragging (temporarily)
49
+ * Fixed a bug where a modal opened on the same modal causes the blackout to persist
103
50
  * Pin
104
- * Fixed a bug where `.is-pinned` was not being removed
105
- * Popover & Tooltip
106
- * Added `$popover-tooltip-animation` to filter the animations in the CSS output
107
- * Added `$popover-arrow-width` and `$tooltip-arrow-width` to alter the arrow sizes
108
- * Added automatic compatibility of `title` attributes
109
- * Fixed a bug where node was being set and used incorrectly
110
- * Fixed a bug with mouseleave events
111
- * Options `className` and `position` are added and removed dynamically each reveal
112
- * Updated options to be inheritable at runtime through the activating node
113
- * Updated `position` values to be dashed instead of camel case
114
- * Removed `slide-in` animation
115
- * Progress
116
- * Added multiple progress bar support
117
- * Removed `.medium` size
118
- * Refactored state classes
119
- * Responsive
120
- * Added `.fluid` class for images, audio, canvas, etc
121
- * Showcase
122
- * Updated options to be inheritable at runtime through the activating node
123
- * Replaced `a` with `button`
124
- * Stalker
125
- * Added nested marker support
126
- * Added `targetBy` and `markBy` options
127
- * Removed `marker` and `target` properties
128
- * Table
129
- * Moved zebra-striping into an `.is-striped` class
130
- * Tabs
131
- * Renamed `sectionsElement` option to `sectionElement`
132
- * Type Ahead
133
- * Renamed `process()` to `source()`
51
+ * Added `lock` option to disable pinning if element is taller than the viewport
52
+ * Added `$pin-transition` variable
53
+ * Fixed a bug where the pin element margin was not included in the total height
data/readme.md CHANGED
@@ -6,7 +6,7 @@
6
6
  \/_/ \/_____/\/_____/\/_____/\/_/\/_/ \/_/ \/_/
7
7
  ```
8
8
 
9
- # Toolkit v1.2.2 #
9
+ # Toolkit v1.3.0 #
10
10
 
11
11
  Titon Toolkit is a collection of very powerful user interface components and utility classes
12
12
  for the responsive, mobile, and modern web. Each component represents encapsulated HTML, CSS,
data/roadmap.md CHANGED
@@ -2,19 +2,17 @@
2
2
 
3
3
  All releases will contain bug fixing and polishing for current features.
4
4
 
5
- ### 1.3.0 ###
5
+ ### 1.4.0 ###
6
+ * Off Canvas - A component for displaying side menus off the canvas (viewport). Useful for sliding mobile navigations.
6
7
  * Marquee - A component that displays multiple slides at once and allows for cycling through a variable amount. A sister component to the carousel.
7
- * Step - A component that highlights a step in a series of consecutive steps (represented by an arrow based navigation).
8
- * Dialog - A component that prompts the user for an action. Sister to the modal component.
9
- * Remove is and has state prefixing.
8
+ * Divider - A component for dividing content horizontally or vertically.
10
9
  * Add destroy method to clean up and remove the component.
11
- * Add aria attributes where applicable.
12
- * Add deferred/promise integration.
13
10
 
14
- ### 1.4.0 ###
11
+ ### 1.5.0 ###
12
+ * Dialog - A component that prompts the user for an action. Sister to the modal component.
15
13
  * Toast - A component to display toast notifications.
16
14
  * Guide - A component that displays introduction guides (popovers) in a sequential order. Useful for show casing new features and functionality.
17
- * Divider - A component for dividing content horizontally or vertically.
15
+ * Add deferred/promise integration.
18
16
 
19
17
  ### 2.0.0 ###
20
18
  * Remove the MooTools port.
@@ -24,6 +22,7 @@ All releases will contain bug fixing and polishing for current features.
24
22
  * Switch to Gulp.
25
23
  * Updated to Sass 3.
26
24
  * Refactor events for before/after conditions.
25
+ * RTL support.
27
26
 
28
27
  ### 3.0.0 ###
29
28
  * Remove jQuery dependency and go straight vanilla?
data/scss/normalize.scss CHANGED
@@ -1,11 +1,32 @@
1
- /*! normalize.css v2.1.3 | MIT License | git.io/normalize */
1
+ /*! normalize.css v3.0.1 | MIT License | git.io/normalize */
2
2
 
3
- /* ==========================================================================
4
- HTML5 display definitions
3
+ /**
4
+ * 1. Set default font family to sans-serif.
5
+ * 2. Prevent iOS text size adjust after orientation change, without disabling
6
+ * user zoom.
7
+ */
8
+
9
+ html {
10
+ font-family: sans-serif; /* 1 */
11
+ -ms-text-size-adjust: 100%; /* 2 */
12
+ -webkit-text-size-adjust: 100%; /* 2 */
13
+ }
14
+
15
+ /**
16
+ * Remove default margin.
17
+ */
18
+
19
+ body {
20
+ margin: 0;
21
+ }
22
+
23
+ /* HTML5 display definitions
5
24
  ========================================================================== */
6
25
 
7
26
  /**
8
- * Correct `block` display not defined in IE 8/9.
27
+ * Correct `block` display not defined for any HTML5 element in IE 8/9.
28
+ * Correct `block` display not defined for `details` or `summary` in IE 10/11 and Firefox.
29
+ * Correct `block` display not defined for `main` in IE 11.
9
30
  */
10
31
 
11
32
  article,
@@ -24,13 +45,16 @@ summary {
24
45
  }
25
46
 
26
47
  /**
27
- * Correct `inline-block` display not defined in IE 8/9.
48
+ * 1. Correct `inline-block` display not defined in IE 8/9.
49
+ * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.
28
50
  */
29
51
 
30
52
  audio,
31
53
  canvas,
54
+ progress,
32
55
  video {
33
- display: inline-block;
56
+ display: inline-block; /* 1 */
57
+ vertical-align: baseline; /* 2 */
34
58
  }
35
59
 
36
60
  /**
@@ -44,8 +68,8 @@ audio:not([controls]) {
44
68
  }
45
69
 
46
70
  /**
47
- * Address `[hidden]` styling not present in IE 8/9.
48
- * Hide the `template` element in IE, Safari, and Firefox < 22.
71
+ * Address `[hidden]` styling not present in IE 8/9/10.
72
+ * Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22.
49
73
  */
50
74
 
51
75
  [hidden],
@@ -53,32 +77,7 @@ template {
53
77
  display: none;
54
78
  }
55
79
 
56
- /* ==========================================================================
57
- Base
58
- ========================================================================== */
59
-
60
- /**
61
- * 1. Set default font family to sans-serif.
62
- * 2. Prevent iOS text size adjust after orientation change, without disabling
63
- * user zoom.
64
- */
65
-
66
- html {
67
- font-family: sans-serif; /* 1 */
68
- -ms-text-size-adjust: 100%; /* 2 */
69
- -webkit-text-size-adjust: 100%; /* 2 */
70
- }
71
-
72
- /**
73
- * Remove default margin.
74
- */
75
-
76
- body {
77
- margin: 0;
78
- }
79
-
80
- /* ==========================================================================
81
- Links
80
+ /* Links
82
81
  ========================================================================== */
83
82
 
84
83
  /**
@@ -89,14 +88,6 @@ a {
89
88
  background: transparent;
90
89
  }
91
90
 
92
- /**
93
- * Address `outline` inconsistency between Chrome and other browsers.
94
- */
95
-
96
- a:focus {
97
- outline: thin dotted;
98
- }
99
-
100
91
  /**
101
92
  * Improve readability when focused and also mouse hovered in all browsers.
102
93
  */
@@ -106,22 +97,11 @@ a:hover {
106
97
  outline: 0;
107
98
  }
108
99
 
109
- /* ==========================================================================
110
- Typography
100
+ /* Text-level semantics
111
101
  ========================================================================== */
112
102
 
113
103
  /**
114
- * Address variable `h1` font-size and margin within `section` and `article`
115
- * contexts in Firefox 4+, Safari 5, and Chrome.
116
- */
117
-
118
- h1 {
119
- font-size: 2em;
120
- margin: 0.67em 0;
121
- }
122
-
123
- /**
124
- * Address styling not present in IE 8/9, Safari 5, and Chrome.
104
+ * Address styling not present in IE 8/9/10/11, Safari, and Chrome.
125
105
  */
126
106
 
127
107
  abbr[title] {
@@ -129,7 +109,7 @@ abbr[title] {
129
109
  }
130
110
 
131
111
  /**
132
- * Address style set to `bolder` in Firefox 4+, Safari 5, and Chrome.
112
+ * Address style set to `bolder` in Firefox 4+, Safari, and Chrome.
133
113
  */
134
114
 
135
115
  b,
@@ -138,7 +118,7 @@ strong {
138
118
  }
139
119
 
140
120
  /**
141
- * Address styling not present in Safari 5 and Chrome.
121
+ * Address styling not present in Safari and Chrome.
142
122
  */
143
123
 
144
124
  dfn {
@@ -146,13 +126,13 @@ dfn {
146
126
  }
147
127
 
148
128
  /**
149
- * Address differences between Firefox and other browsers.
129
+ * Address variable `h1` font-size and margin within `section` and `article`
130
+ * contexts in Firefox 4+, Safari, and Chrome.
150
131
  */
151
132
 
152
- hr {
153
- -moz-box-sizing: content-box;
154
- box-sizing: content-box;
155
- height: 0;
133
+ h1 {
134
+ font-size: 2em;
135
+ margin: 0.67em 0;
156
136
  }
157
137
 
158
138
  /**
@@ -164,34 +144,6 @@ mark {
164
144
  color: #000;
165
145
  }
166
146
 
167
- /**
168
- * Correct font family set oddly in Safari 5 and Chrome.
169
- */
170
-
171
- code,
172
- kbd,
173
- pre,
174
- samp {
175
- font-family: monospace, serif;
176
- font-size: 1em;
177
- }
178
-
179
- /**
180
- * Improve readability of pre-formatted text in all browsers.
181
- */
182
-
183
- pre {
184
- white-space: pre-wrap;
185
- }
186
-
187
- /**
188
- * Set consistent quote types.
189
- */
190
-
191
- q {
192
- quotes: "\201C" "\201D" "\2018" "\2019";
193
- }
194
-
195
147
  /**
196
148
  * Address inconsistent and variable font size in all browsers.
197
149
  */
@@ -220,12 +172,11 @@ sub {
220
172
  bottom: -0.25em;
221
173
  }
222
174
 
223
- /* ==========================================================================
224
- Embedded content
175
+ /* Embedded content
225
176
  ========================================================================== */
226
177
 
227
178
  /**
228
- * Remove border when inside `a` element in IE 8/9.
179
+ * Remove border when inside `a` element in IE 8/9/10.
229
180
  */
230
181
 
231
182
  img {
@@ -233,79 +184,92 @@ img {
233
184
  }
234
185
 
235
186
  /**
236
- * Correct overflow displayed oddly in IE 9.
187
+ * Correct overflow not hidden in IE 9/10/11.
237
188
  */
238
189
 
239
190
  svg:not(:root) {
240
191
  overflow: hidden;
241
192
  }
242
193
 
243
- /* ==========================================================================
244
- Figures
194
+ /* Grouping content
245
195
  ========================================================================== */
246
196
 
247
197
  /**
248
- * Address margin not present in IE 8/9 and Safari 5.
198
+ * Address margin not present in IE 8/9 and Safari.
249
199
  */
250
200
 
251
201
  figure {
252
- margin: 0;
202
+ margin: 1em 40px;
253
203
  }
254
204
 
255
- /* ==========================================================================
256
- Forms
257
- ========================================================================== */
205
+ /**
206
+ * Address differences between Firefox and other browsers.
207
+ */
208
+
209
+ hr {
210
+ -moz-box-sizing: content-box;
211
+ box-sizing: content-box;
212
+ height: 0;
213
+ }
258
214
 
259
215
  /**
260
- * Define consistent border, margin, and padding.
216
+ * Contain overflow in all browsers.
261
217
  */
262
218
 
263
- fieldset {
264
- border: 1px solid #c0c0c0;
265
- margin: 0 2px;
266
- padding: 0.35em 0.625em 0.75em;
219
+ pre {
220
+ overflow: auto;
267
221
  }
268
222
 
269
223
  /**
270
- * 1. Correct `color` not being inherited in IE 8/9.
271
- * 2. Remove padding so people aren't caught out if they zero out fieldsets.
224
+ * Address odd `em`-unit font size rendering in all browsers.
272
225
  */
273
226
 
274
- legend {
275
- border: 0; /* 1 */
276
- padding: 0; /* 2 */
227
+ code,
228
+ kbd,
229
+ pre,
230
+ samp {
231
+ font-family: monospace, monospace;
232
+ font-size: 1em;
277
233
  }
278
234
 
235
+ /* Forms
236
+ ========================================================================== */
237
+
279
238
  /**
280
- * 1. Correct font family not being inherited in all browsers.
281
- * 2. Correct font size not being inherited in all browsers.
282
- * 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome.
239
+ * Known limitation: by default, Chrome and Safari on OS X allow very limited
240
+ * styling of `select`, unless a `border` property is set.
241
+ */
242
+
243
+ /**
244
+ * 1. Correct color not being inherited.
245
+ * Known issue: affects color of disabled elements.
246
+ * 2. Correct font properties not being inherited.
247
+ * 3. Address margins set differently in Firefox 4+, Safari, and Chrome.
283
248
  */
284
249
 
285
250
  button,
286
251
  input,
252
+ optgroup,
287
253
  select,
288
254
  textarea {
289
- font-family: inherit; /* 1 */
290
- font-size: 100%; /* 2 */
255
+ color: inherit; /* 1 */
256
+ font: inherit; /* 2 */
291
257
  margin: 0; /* 3 */
292
258
  }
293
259
 
294
260
  /**
295
- * Address Firefox 4+ setting `line-height` on `input` using `!important` in
296
- * the UA stylesheet.
261
+ * Address `overflow` set to `hidden` in IE 8/9/10/11.
297
262
  */
298
263
 
299
- button,
300
- input {
301
- line-height: normal;
264
+ button {
265
+ overflow: visible;
302
266
  }
303
267
 
304
268
  /**
305
269
  * Address inconsistent `text-transform` inheritance for `button` and `select`.
306
270
  * All other form control elements do not inherit `text-transform` values.
307
- * Correct `button` style inheritance in Chrome, Safari 5+, and IE 8+.
308
- * Correct `select` style inheritance in Firefox 4+ and Opera.
271
+ * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.
272
+ * Correct `select` style inheritance in Firefox.
309
273
  */
310
274
 
311
275
  button,
@@ -339,6 +303,28 @@ html input[disabled] {
339
303
  }
340
304
 
341
305
  /**
306
+ * Remove inner padding and border in Firefox 4+.
307
+ */
308
+
309
+ button::-moz-focus-inner,
310
+ input::-moz-focus-inner {
311
+ border: 0;
312
+ padding: 0;
313
+ }
314
+
315
+ /**
316
+ * Address Firefox 4+ setting `line-height` on `input` using `!important` in
317
+ * the UA stylesheet.
318
+ */
319
+
320
+ input {
321
+ line-height: normal;
322
+ }
323
+
324
+ /**
325
+ * It's recommended that you don't attempt to style these elements.
326
+ * Firefox's implementation doesn't respect box-sizing, padding, or width.
327
+ *
342
328
  * 1. Address box sizing set to `content-box` in IE 8/9/10.
343
329
  * 2. Remove excess padding in IE 8/9/10.
344
330
  */
@@ -350,8 +336,19 @@ input[type="radio"] {
350
336
  }
351
337
 
352
338
  /**
353
- * 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome.
354
- * 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome
339
+ * Fix the cursor style for Chrome's increment/decrement buttons. For certain
340
+ * `font-size` values of the `input`, it causes the cursor style of the
341
+ * decrement button to change from `default` to `text`.
342
+ */
343
+
344
+ input[type="number"]::-webkit-inner-spin-button,
345
+ input[type="number"]::-webkit-outer-spin-button {
346
+ height: auto;
347
+ }
348
+
349
+ /**
350
+ * 1. Address `appearance` set to `searchfield` in Safari and Chrome.
351
+ * 2. Address `box-sizing` set to `border-box` in Safari and Chrome
355
352
  * (include `-moz` to future-proof).
356
353
  */
357
354
 
@@ -363,8 +360,9 @@ input[type="search"] {
363
360
  }
364
361
 
365
362
  /**
366
- * Remove inner padding and search cancel button in Safari 5 and Chrome
367
- * on OS X.
363
+ * Remove inner padding and search cancel button in Safari and Chrome on OS X.
364
+ * Safari (but not Chrome) clips the cancel button when the search input has
365
+ * padding (and `textfield` appearance).
368
366
  */
369
367
 
370
368
  input[type="search"]::-webkit-search-cancel-button,
@@ -373,27 +371,43 @@ input[type="search"]::-webkit-search-decoration {
373
371
  }
374
372
 
375
373
  /**
376
- * Remove inner padding and border in Firefox 4+.
374
+ * Define consistent border, margin, and padding.
377
375
  */
378
376
 
379
- button::-moz-focus-inner,
380
- input::-moz-focus-inner {
381
- border: 0;
382
- padding: 0;
377
+ fieldset {
378
+ border: 1px solid #c0c0c0;
379
+ margin: 0 2px;
380
+ padding: 0.35em 0.625em 0.75em;
383
381
  }
384
382
 
385
383
  /**
386
- * 1. Remove default vertical scrollbar in IE 8/9.
387
- * 2. Improve readability and alignment in all browsers.
384
+ * 1. Correct `color` not being inherited in IE 8/9/10/11.
385
+ * 2. Remove padding so people aren't caught out if they zero out fieldsets.
386
+ */
387
+
388
+ legend {
389
+ border: 0; /* 1 */
390
+ padding: 0; /* 2 */
391
+ }
392
+
393
+ /**
394
+ * Remove default vertical scrollbar in IE 8/9/10/11.
388
395
  */
389
396
 
390
397
  textarea {
391
- overflow: auto; /* 1 */
392
- vertical-align: top; /* 2 */
398
+ overflow: auto;
399
+ }
400
+
401
+ /**
402
+ * Don't inherit the `font-weight` (applied by a rule above).
403
+ * NOTE: the default cannot safely be changed in Chrome and Safari on OS X.
404
+ */
405
+
406
+ optgroup {
407
+ font-weight: bold;
393
408
  }
394
409
 
395
- /* ==========================================================================
396
- Tables
410
+ /* Tables
397
411
  ========================================================================== */
398
412
 
399
413
  /**
@@ -404,3 +418,8 @@ table {
404
418
  border-collapse: collapse;
405
419
  border-spacing: 0;
406
420
  }
421
+
422
+ td,
423
+ th {
424
+ padding: 0;
425
+ }