|
| 1 | +/** |
| 2 | + * Forms |
| 3 | + * ⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺ |
| 4 | + */ |
| 5 | + |
| 6 | +/* |
| 7 | + * Override normalize.css's opinionated styles, `line-height` is set to |
| 8 | + * 'normal' as that's what most user-agents use. |
| 9 | + * See: https://github.com/necolas/normalize.css/issues/694. |
| 10 | + */ |
| 11 | + |
| 12 | +button, |
| 13 | +input, |
| 14 | +optgroup, |
| 15 | +select, |
| 16 | +textarea { |
| 17 | + line-height: normal; |
| 18 | +} |
| 19 | + |
| 20 | +/* |
| 21 | + * 1. Remove noticeable visual user-agent styles so we have a clean slate. |
| 22 | + * 2. Remove rounded corners that iOS applies to all `<input>` buttons. |
| 23 | + */ |
| 24 | + |
| 25 | +[type="submit"], |
| 26 | +[type="button"], |
| 27 | +[type="reset"], |
| 28 | +button { |
| 29 | + background: transparent; /* 1 */ |
| 30 | + border: 0; /* 1 */ |
| 31 | + border-radius: 0; /* 2 */ |
| 32 | + margin: 0; /* 1 */ |
| 33 | + padding: 0; /* 1 */ |
| 34 | +} |
| 35 | + |
| 36 | +/* |
| 37 | + * 1. Remove top inner shadow that iOS applies to all textual inputs. |
| 38 | + * ✌︎ Credit |
| 39 | + * https://davidwalsh.name/input-shadows-ipad |
| 40 | + * 2. Remove padding (mostly 1px) that most user-agents apply to all textual |
| 41 | + inputs. |
| 42 | + */ |
| 43 | + |
| 44 | +[type="date"], |
| 45 | +[type="datetime-local"], |
| 46 | +[type="email"], |
| 47 | +[type="month"], |
| 48 | +[type="number"], |
| 49 | +[type="password"], |
| 50 | +[type="search"], |
| 51 | +[type="tel"], |
| 52 | +[type="text"], |
| 53 | +[type="time"], |
| 54 | +[type="url"], |
| 55 | +[type="week"] { |
| 56 | + background-clip: padding-box; /* 1 */ |
| 57 | + padding: 0; /* 2 */ |
| 58 | +} |
| 59 | + |
| 60 | +/* |
| 61 | + * Disable horizontal resizing. |
| 62 | + */ |
| 63 | + |
| 64 | +textarea { |
| 65 | + resize: vertical; |
| 66 | +} |
| 67 | + |
| 68 | +/** |
| 69 | + * Override a `<fieldset>`s default `min-width: min-content;` with the more |
| 70 | + * standard `min-width: 0;` so it renders as a block element would. |
| 71 | + * |
| 72 | + * ✌︎ Credit |
| 73 | + * https://thatemil.com/blog/2015/01/03/reset-your-fieldset. |
| 74 | + */ |
| 75 | + |
| 76 | +fieldset { |
| 77 | + min-width: 0; |
| 78 | +} |
| 79 | + |
| 80 | +body:not(:-moz-handler-blocked) fieldset { |
| 81 | + display: table-cell; |
| 82 | +} |
| 83 | + |
| 84 | +/** |
| 85 | + * Remove the clear field button (an "X" icon) and the reveal password button |
| 86 | + * (an "eye" icon) that is generated by IE 10+ for textual inputs. |
| 87 | + * See: http://stackoverflow.com/a/21869433/1116204. |
| 88 | + */ |
| 89 | + |
| 90 | +::-ms-clear, |
| 91 | +::-ms-reveal { |
| 92 | + display: none; |
| 93 | +} |
| 94 | + |
| 95 | +/** |
| 96 | + * Un-style the caret for `<select>` lists in IE 10+. |
| 97 | + */ |
| 98 | + |
| 99 | +::-ms-expand { |
| 100 | + background-color: transparent; |
| 101 | + border: 0; |
| 102 | +} |
| 103 | + |
| 104 | +/** |
| 105 | + * Fixes a bug in Safari Mobile 7.0+ where click events aren't fired on |
| 106 | + * elements that aren't typically interactive. |
| 107 | + * See: https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile. |
| 108 | + */ |
| 109 | + |
| 110 | +[role="button"] { |
| 111 | + cursor: pointer; |
| 112 | +} |
0 commit comments