Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/JohnAlbin/normalize-scss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnAlbin <virtually.johnalbin@gmail.com>2016-05-19 16:51:09 +0300
committerJohnAlbin <virtually.johnalbin@gmail.com>2016-05-20 20:10:38 +0300
commit6c3e24cea6b32e34604b8bc8cd7af26a6152841f (patch)
treed71213d56cbdaeed7eee478678cc66302b7196d1 /fork-versions
parentbcc4052f44e686b9f8cab8ac7547b3d4de0b0d37 (diff)
Update to normalize.css 4.1.1. Fixes #55
Diffstat (limited to 'fork-versions')
-rw-r--r--fork-versions/default/_normalize.scss459
-rw-r--r--fork-versions/ruby-sass-compass/_normalize.scss472
-rw-r--r--fork-versions/typey-chroma-kss/base/_html5.scss32
-rw-r--r--fork-versions/typey-chroma-kss/base/_root.scss10
-rw-r--r--fork-versions/typey-chroma-kss/base/embedded/_embedded.scss8
-rw-r--r--fork-versions/typey-chroma-kss/base/forms/_forms.scss164
-rw-r--r--fork-versions/typey-chroma-kss/base/grouping/_grouping.scss55
-rw-r--r--fork-versions/typey-chroma-kss/base/links/_links.scss15
-rw-r--r--fork-versions/typey-chroma-kss/base/text/_text.scss50
-rw-r--r--fork-versions/typey/_normalize.scss413
10 files changed, 839 insertions, 839 deletions
diff --git a/fork-versions/default/_normalize.scss b/fork-versions/default/_normalize.scss
index dab96b7..7a45bb5 100644
--- a/fork-versions/default/_normalize.scss
+++ b/fork-versions/default/_normalize.scss
@@ -19,9 +19,8 @@
}
/**
- * 1. Set default font family to sans-serif.
- * 2. Prevent iOS and IE text size adjust after device orientation change,
- * without disabling user zoom.
+ * 1. Change the default font family in all browsers (opinionated).
+ * 2. Prevent adjustments of font size after orientation changes in IE and iOS.
*/
html {
@@ -39,7 +38,7 @@ html {
}
/**
- * Remove default margin.
+ * Remove the margin in all browsers (opinionated).
*/
body {
@@ -50,10 +49,9 @@ body {
========================================================================== */
/**
- * Correct `block` display not defined for any HTML5 element in IE 8/9.
- * Correct `block` display not defined for `details` or `summary` in IE 10/11
- * and Firefox.
- * Correct `block` display not defined for `main` in IE 11.
+ * Add the correct display in IE <10.
+ * Add the correct display in Edge, IE, and Firefox for `details` or `summary`.
+ * Add the correct display in IE for `main`.
*/
article,
@@ -63,7 +61,6 @@ figcaption,
figure,
footer,
header,
-hgroup,
main,
menu,
nav,
@@ -73,27 +70,22 @@ summary {
}
/**
- * 1. Correct `inline-block` display not defined in IE 8/9.
- * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.
+ * Add the correct display in IE <10.
*/
audio,
canvas,
progress,
video {
- @if support-for(ie, 9) {
- display: inline-block; /* 1 */
- @if support-for(ie, 7) {
- *display: inline;
- *zoom: 1;
- }
+ display: inline-block;
+ @if support-for(ie, 7) {
+ *display: inline;
+ *zoom: 1;
}
- vertical-align: baseline; /* 2 */
}
/**
- * Prevent modern browsers from displaying `audio` without controls.
- * Remove excess height in iOS 5 devices.
+ * Add the correct display and remove excess height in iOS 4-7.
*/
audio:not([controls]) {
@@ -101,69 +93,97 @@ audio:not([controls]) {
height: 0;
}
-@if support-for(ie, 10) {
- /**
- * Address `[hidden]` styling not present in IE 8/9/10.
- */
+/**
+ * Add the correct vertical alignment in Chrome, Firefox, and Opera.
+ */
- [hidden] {
- display: none;
- }
+progress {
+ vertical-align: baseline;
}
/**
- * Hide the `template` element in IE 8/9/10/11, Safari, and Firefox < 22.
+ * Add the correct display in IE <11, Safari <8, and Firefox <22.
+ * 1. Add the correct display in IE.
*/
-template {
+template, /* 1 */
+[hidden] {
display: none;
}
/* Links
========================================================================== */
-@if support-for(ie, 10) {
- /**
- * Remove the gray background color from active links in IE 10.
- */
+/**
+ * 1. Remove the gray background on active links in IE 10.
+ * 2. Remove gaps in links underline in iOS 8+ and Safari 8+.
+ */
- a {
- background-color: transparent;
- }
+a {
+ background-color: transparent; /* 1 */
+ -webkit-text-decoration-skip: objects; /* 2 */
}
/**
- * Improve readability of focused elements when they are also in an
- * active/hover state.
+ * Remove the outline on focused links when they are also active or hovered
+ * in all browsers (opinionated).
*/
a:active,
a:hover {
- outline: 0;
+ outline-width: 0;
}
/* Text-level semantics
========================================================================== */
/**
- * Address styling not present in IE 8/9/10/11, Safari, and Chrome.
+ * 1. Remove the bottom border in Firefox <40.
+ * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
*/
abbr[title] {
- border-bottom: 1px dotted;
+ border-bottom: none; /* 1 */
+ text-decoration: underline; /* 2 */
+ text-decoration: underline dotted; /* 2 */
}
/**
- * Address style set to `bolder` in Firefox 4+, Safari, and Chrome.
+ * Prevent the duplicate application of `bolder` by the next rule in Safari 6.
*/
b,
strong {
- font-weight: bold;
+ font-weight: inherit;
+}
+
+/**
+ * Add the correct font weight in Chrome, Edge, and Safari.
+ */
+
+b,
+strong {
+ font-weight: bolder;
+}
+
+/**
+ * 1. Correct the inheritance and scaling of font size in all browsers.
+ * 2. Correct the odd `em` font sizing in all browsers.
+ */
+
+%monospace,
+code,
+kbd,
+samp {
+ font-family: monospace, monospace; /* 1 */
+ @if support-for(ie, 6) {
+ _font-family: 'courier new', monospace;
+ }
+ font-size: 1em; /* 2 */
}
/**
- * Address styling not present in Safari and Chrome.
+ * Add the correct font style in Android <4.4.
*/
dfn {
@@ -171,8 +191,8 @@ dfn {
}
/**
- * Address variable `h1` font-size and margin within `section` and `article`
- * contexts in Firefox 4+, Safari, and Chrome.
+ * Correct the font size and margin on `h1` elements within `section` and
+ * `article` contexts in Chrome, Firefox, and Safari.
*/
h1 {
@@ -227,19 +247,17 @@ h1 {
}
}
-@if support-for(ie, 9) {
- /**
- * Address styling not present in IE 8/9.
- */
+/**
+ * Add the correct background and color in IE <10.
+ */
- mark {
- background: #ff0;
- color: #000;
- }
+mark {
+ background-color: #ff0;
+ color: #000;
}
/**
- * Address inconsistent and variable font size in all browsers.
+ * Add the correct font size in all browsers.
*/
small {
@@ -247,7 +265,8 @@ small {
}
/**
- * Prevent `sub` and `sup` affecting `line-height` in all browsers.
+ * Prevent `sub` and `sup` elements from affecting the line height in
+ * all browsers.
*/
sub,
@@ -258,33 +277,31 @@ sup {
vertical-align: baseline;
}
-sup {
- top: -0.5em;
-}
-
sub {
bottom: -0.25em;
}
+sup {
+ top: -0.5em;
+}
+
/* Embedded content
========================================================================== */
-@if support-for(ie, 10) {
- /**
- * Remove border when inside `a` element in IE 8/9/10.
- */
+/**
+ * Remove the border on images inside links in IE <11.
+ */
- img {
- border: 0;
- @if support-for(ie, 7) {
- /* Improve image quality when scaled in IE 7. */
- -ms-interpolation-mode: bicubic;
- }
+img {
+ border-style: none;
+ @if support-for(ie, 7) {
+ /* Improve image quality when scaled in IE 7. */
+ -ms-interpolation-mode: bicubic;
}
}
/**
- * Correct overflow not hidden in IE 9/10/11.
+ * Hide the overflow in IE.
*/
svg:not(:root) {
@@ -296,6 +313,14 @@ svg:not(:root) {
@if $normalize-vertical-rhythm or support-for(ie, 7) {
/**
+ * Set 1 unit of vertical rhythm on the top and bottom margin.
+ */
+
+ blockquote {
+ @include normalize-margin(1 $indent-amount);
+ }
+
+ /**
* Address margins set differently in IE 6/7.
*/
@@ -305,23 +330,21 @@ svg:not(:root) {
ul {
@include normalize-margin(1 0);
}
-}
-@if $normalize-vertical-rhythm {
- /**
- * Turn off margins on nested lists.
- */
+ @if $normalize-vertical-rhythm {
+ /**
+ * Turn off margins on nested lists.
+ */
- ol,
- ul {
ol,
ul {
- margin: 0;
+ ol,
+ ul {
+ margin: 0;
+ }
}
}
-}
-@if $normalize-vertical-rhythm or support-for(ie, 7) {
dd {
margin: 0 0 0 $indent-amount;
}
@@ -349,36 +372,23 @@ svg:not(:root) {
}
}
-@if $normalize-vertical-rhythm or support-for(ie, 7) {
- /**
- * Set 1 unit of vertical rhythm on the top and bottom margin.
- */
-
- blockquote {
- @include normalize-margin(1 $indent-amount);
- }
-}
-
-@if $normalize-vertical-rhythm or support-for(ie, 9) or support-for(safari, 6) {
- /**
- * Address margin not present in IE 8/9 and Safari.
- */
+/**
+ * Add the correct margin in IE 8.
+ */
- figure {
- @include normalize-margin(1 $indent-amount);
- }
+figure {
+ @include normalize-margin(1 $indent-amount);
}
/**
- * Address differences between Firefox and other browsers.
+ * 1. Add the correct box sizing in Firefox.
+ * 2. Show the overflow in Edge and IE.
*/
hr {
- @if support-for(firefox, 28) {
- -moz-box-sizing: content-box;
- }
- box-sizing: content-box;
- height: 0;
+ box-sizing: content-box; /* 1 */
+ height: 0; /* 1 */
+ overflow: visible; /* 2 */
}
@if $normalize-vertical-rhythm or support-for(ie, 7) {
@@ -392,35 +402,31 @@ hr {
}
}
-/**
- * Contain overflow in all browsers.
- */
-
pre {
- overflow: auto;
-}
-
-/**
- * Address odd `em`-unit font size rendering in all browsers.
- */
-
-code,
-kbd,
-pre,
-samp {
- font-family: monospace, monospace;
- @if support-for(ie, 6) {
- _font-family: 'courier new', monospace;
- }
- font-size: 1em;
+ @extend %monospace;
}
/* Forms
========================================================================== */
/**
- * Known limitation: by default, Chrome and Safari on OS X allow very limited
- * styling of `select`, unless a `border` property is set.
+ * Known issues:
+ * - By default, Chrome on OS X and Safari on OS X allow very limited styling of
+ * select, unless a border property is set. The default font weight on
+ * optgroup elements cannot safely be changed in Chrome on OSX and Safari on
+ * OS X.
+ * - It is recommended that you do not style checkbox and radio inputs as
+ * Firefox's implementation does not respect box-sizing, padding, or width.
+ * - Certain font size values applied to number inputs cause the cursor style of
+ * the decrement button to change from default to text.
+ * - The search input is not fully stylable by default. In Chrome and Safari on
+ * OSX/iOS you can't control font, padding, border, or background. In Chrome
+ * and Safari on Windows you can't control border properly. It will apply
+ * border-width but will only show a border color (which cannot be controlled)
+ * for the outer 1px of that border. Applying -webkit-appearance: textfield
+ * addresses these issues without removing the benefits of search inputs (e.g.
+ * showing past searches). Safari (but not Chrome) will clip the cancel button
+ * on when it has padding (and textfield appearance).
*/
@if support-for(ie, 7) {
@@ -434,12 +440,10 @@ samp {
}
/**
- * 1. Correct color not being inherited.
- * Known issue: affects color of disabled elements.
- * 2. Correct font properties not being inherited.
- * 3. Address margins set differently in Firefox 4+, Safari, and Chrome.
- * 4. Address `font-family` inconsistency between `textarea` and other form in IE 7
- * 5. Improve appearance and consistency with IE 6/7.
+ * 1. Change font properties to `inherit` in all browsers (opinionated).
+ * 2. Remove the margin in Firefox and Safari.
+ * 3. Address `font-family` inconsistency between `textarea` and other form in IE 7
+ * 4. Improve appearance and consistency with IE 6/7.
*/
button,
@@ -447,17 +451,16 @@ input,
optgroup,
select,
textarea {
- color: inherit; /* 1 */
- font: inherit; /* 2 */
- margin: 0; /* 3 */
+ font: inherit; /* 1 */
+ margin: 0; /* 2 */
@if support-for(ie, 7) {
- *font-family: $base-font-family; /* 4 */
- *vertical-align: middle; /* 5 */
+ *font-family: $base-font-family; /* 3 */
+ *vertical-align: middle; /* 4 */
}
}
/**
- * Address `overflow` set to `hidden` in IE 8/9/10/11.
+ * Show the overflow in IE.
*/
button {
@@ -465,115 +468,100 @@ button {
}
/**
- * Address inconsistent `text-transform` inheritance for `button` and `select`.
- * All other form control elements do not inherit `text-transform` values.
- * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.
- * Correct `select` style inheritance in Firefox.
+ * Remove the inheritance of text transform in Edge, Firefox, and IE.
+ * 1. Remove the inheritance of text transform in Firefox.
*/
button,
-select {
+select { /* 1 */
text-transform: none;
}
/**
- * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
- * and `video` controls.
- * 2. Correct inability to style clickable `input` types in iOS.
- * 3. Improve usability and consistency of cursor style between image-type
- * `input` and others.
- * 4. Remove inner spacing in IE 7 without affecting normal text inputs.
- * Known issue: inner spacing remains in IE 6.
+ * 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
+ * controls in Android 4.
+ * 2. Correct the inability to style clickable types in iOS and Safari.
*/
button,
-html input[type="button"], /* 1 */
-input[type="reset"],
-input[type="submit"] {
+html [type="button"], /* 1 */
+[type="reset"],
+[type="submit"] {
-webkit-appearance: button; /* 2 */
- cursor: pointer; /* 3 */
- @if support-for(ie, 7) {
- *overflow: visible; /* 4 */
- }
}
/**
- * Re-set default cursor for disabled elements.
+ * Remove the inner border and padding in Firefox.
*/
-button[disabled],
-html input[disabled] {
- cursor: default;
+button::-moz-focus-inner,
+[type="button"]::-moz-focus-inner,
+[type="reset"]::-moz-focus-inner,
+[type="submit"]::-moz-focus-inner {
+ border-style: none;
+ padding: 0;
}
/**
- * Remove inner padding and border in Firefox 4+.
+ * Restore the focus styles unset by the previous rule.
*/
-button::-moz-focus-inner,
-input::-moz-focus-inner {
- border: 0;
- padding: 0;
+button:-moz-focusring,
+[type="button"]:-moz-focusring,
+[type="reset"]:-moz-focusring,
+[type="submit"]:-moz-focusring {
+ outline: 1px dotted ButtonText;
}
/**
- * Address Firefox 4+ setting `line-height` on `input` using `!important` in
- * the UA stylesheet.
+ * Show the overflow in Edge.
*/
input {
- line-height: normal;
+ overflow: visible;
+ @if support-for(firefox, 29) {
+ // Firefox sets `line-height` using `!important` in the UA stylesheet.
+ line-height: normal;
+ }
}
-@if support-for(ie, 10) {
- /**
- * It's recommended that you don't attempt to style these elements.
- * Firefox's implementation doesn't respect box-sizing, padding, or width.
- *
- * 1. Address box sizing set to `content-box` in IE 8/9/10.
- * 2. Remove excess padding in IE 8/9/10.
- * 3. Remove excess padding in IE 7.
- * Known issue: excess padding remains in IE 6.
- */
+/**
+ * 1. Add the correct box sizing in IE <11.
+ * 2. Remove the padding in IE <11.
+ * 3. Remove excess padding in IE 7.
+ * Known issue: excess padding remains in IE 6.
+ */
- input[type="checkbox"],
- input[type="radio"] {
- box-sizing: border-box; /* 1 */
- padding: 0; /* 2 */
- @if support-for(ie, 7) {
- *height: 13px; /* 3 */
- *width: 13px; /* 3 */
- }
+[type="checkbox"],
+[type="radio"] {
+ box-sizing: border-box; /* 1 */
+ padding: 0; /* 2 */
+ @if support-for(ie, 7) {
+ *height: 13px; /* 3 */
+ *width: 13px; /* 3 */
}
}
/**
- * Fix the cursor style for Chrome's increment/decrement buttons. For certain
- * `font-size` values of the `input`, it causes the cursor style of the
- * decrement button to change from `default` to `text`.
+ * Correct the cursor style of increment and decrement buttons in Chrome.
*/
-input[type="number"]::-webkit-inner-spin-button,
-input[type="number"]::-webkit-outer-spin-button {
+[type="number"]::-webkit-inner-spin-button,
+[type="number"]::-webkit-outer-spin-button {
height: auto;
}
/**
- * 1. Address `appearance` set to `searchfield` in Safari and Chrome.
- * 2. Address `box-sizing` set to `border-box` in Safari and Chrome.
+ * 1. Correct the odd appearance in Chrome and Safari.
+ * 2. Correct the outline style in Safari.
*/
-input[type="search"] {
+[type="search"] {
-webkit-appearance: textfield; /* 1 */
- @if support-for(safari, 5) or support-for(chrome, 9) {
- -webkit-box-sizing: content-box;
- }
- box-sizing: content-box; /* 2 */
+ outline-offset: -2px; /* 2 */
/**
- * Remove inner padding and search cancel button in Safari and Chrome on OS X.
- * Safari (but not Chrome) clips the cancel button when the search input has
- * padding (and `textfield` appearance).
+ * Remove the inner padding and cancel buttons in Chrome and Safari on OS X.
*/
&::-webkit-search-cancel-button,
@@ -583,7 +571,26 @@ input[type="search"] {
}
/**
- * Define consistent border, margin, and padding.
+ * Correct the text style of placeholders in Chrome, Edge, and Safari.
+ */
+
+::-webkit-input-placeholder {
+ color: inherit;
+ opacity: 0.54;
+}
+
+/**
+ * 1. Correct the inability to style clickable types in iOS and Safari.
+ * 2. Change font properties to `inherit` in Safari.
+ */
+
+::-webkit-file-upload-button {
+ -webkit-appearance: button; /* 1 */
+ font: inherit; /* 2 */
+}
+
+/**
+ * Change the border, margin, and padding in all browsers (opinionated).
*/
fieldset {
@@ -593,51 +600,37 @@ fieldset {
}
/**
- * 1. Correct `color` not being inherited in IE 8/9/10/11.
- * 2. Remove padding so people aren't caught out if they zero out fieldsets.
- * 3. Correct alignment displayed oddly in IE 6/7.
+ * 1. Correct the text wrapping in Edge and IE.
+ * 2. Correct the color inheritance from `fieldset` elements in IE.
+ * 3. Remove the padding so developers are not caught out when they zero out
+ * `fieldset` elements in all browsers.
+ * 4. Correct alignment displayed oddly in IE 6/7.
*/
legend {
- @if support-for(ie, 11) {
- border: 0; /* 1 */
- }
- padding: 0; /* 2 */
+ box-sizing: border-box; /* 1 */
+ display: table; /* 1 */
+ max-width: 100%; /* 1 */
+ white-space: normal; /* 1 */
+ color: inherit; /* 2 */
+ padding: 0; /* 3 */
@if support-for(ie, 7) {
- *margin-left: -7px; /* 3 */
+ *margin-left: -7px; /* 4 */
}
}
/**
- * Remove default vertical scrollbar in IE 8/9/10/11.
- */
-
-textarea {
- overflow: auto;
-}
-
-/**
- * Don't inherit the `font-weight` (applied by a rule above).
- * NOTE: the default cannot safely be changed in Chrome and Safari on OS X.
+ * Restore the font weight unset by a previous rule.
*/
optgroup {
font-weight: bold;
}
-/* Tables
- ========================================================================== */
-
/**
- * Remove most spacing between table cells.
+ * Remove the default vertical scrollbar in IE.
*/
-table {
- border-collapse: collapse;
- border-spacing: 0;
-}
-
-td,
-th {
- padding: 0;
+textarea {
+ overflow: auto;
}
diff --git a/fork-versions/ruby-sass-compass/_normalize.scss b/fork-versions/ruby-sass-compass/_normalize.scss
index 5a0d931..e5abc6c 100644
--- a/fork-versions/ruby-sass-compass/_normalize.scss
+++ b/fork-versions/ruby-sass-compass/_normalize.scss
@@ -18,7 +18,7 @@
or $h5-font-size != 0.83 * $base-font-size
or $h6-font-size != 0.67 * $base-font-size
or $indent-amount != 40px {
- $normalize-vertical-rhythm: true;
+ $normalize-vertical-rhythm: true !global;
}
@if $normalize-vertical-rhythm or support-legacy-browser(ie, "7") {
@@ -32,9 +32,8 @@
}
/**
- * 1. Set default font family to sans-serif.
- * 2. Prevent iOS and IE text size adjust after device orientation change,
- * without disabling user zoom.
+ * 1. Change the default font family in all browsers (opinionated).
+ * 2. Prevent adjustments of font size after orientation changes in IE and iOS.
*/
html {
@@ -46,7 +45,7 @@ html {
}
/**
- * Remove default margin.
+ * Remove the margin in all browsers (opinionated).
*/
body {
@@ -57,10 +56,9 @@ body {
========================================================================== */
/**
- * Correct `block` display not defined for any HTML5 element in IE 8/9.
- * Correct `block` display not defined for `details` or `summary` in IE 10/11
- * and Firefox.
- * Correct `block` display not defined for `main` in IE 11.
+ * Add the correct display in IE <10.
+ * Add the correct display in Edge, IE, and Firefox for `details` or `summary`.
+ * Add the correct display in IE for `main`.
*/
article,
@@ -70,7 +68,6 @@ figcaption,
figure,
footer,
header,
-hgroup,
main,
menu,
nav,
@@ -80,27 +77,22 @@ summary {
}
/**
- * 1. Correct `inline-block` display not defined in IE 8/9.
- * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.
+ * Add the correct display in IE <10.
*/
audio,
canvas,
progress,
video {
- @if support-legacy-browser(ie, "9") {
- display: inline-block; /* 1 */
- @if support-legacy-browser(ie, "7") {
- *display: inline;
- *zoom: 1;
- }
+ display: inline-block;
+ @if support-legacy-browser(ie, "7") {
+ *display: inline;
+ *zoom: 1;
}
- vertical-align: baseline; /* 2 */
}
/**
- * Prevent modern browsers from displaying `audio` without controls.
- * Remove excess height in iOS 5 devices.
+ * Add the correct display and remove excess height in iOS 4-7.
*/
audio:not([controls]) {
@@ -108,79 +100,97 @@ audio:not([controls]) {
height: 0;
}
-@if support-legacy-browser(ie, "10") {
- /**
- * Address `[hidden]` styling not present in IE 8/9/10.
- */
+/**
+ * Add the correct vertical alignment in Chrome, Firefox, and Opera.
+ */
- [hidden] {
- display: none;
- }
+progress {
+ vertical-align: baseline;
}
/**
- * Hide the `template` element in IE 8/9/10/11, Safari, and Firefox < 22.
+ * Add the correct display in IE <11, Safari <8, and Firefox <22.
+ * 1. Add the correct display in IE.
*/
-template {
+template, /* 1 */
+[hidden] {
display: none;
}
/* Links
========================================================================== */
-@if support-legacy-browser(ie, "10") {
- /**
- * Remove the gray background color from active links in IE 10.
- */
+/**
+ * 1. Remove the gray background on active links in IE 10.
+ * 2. Remove gaps in links underline in iOS 8+ and Safari 8+.
+ */
- a {
- background-color: transparent;
- }
+a {
+ background-color: transparent; /* 1 */
+ -webkit-text-decoration-skip: objects; /* 2 */
}
/**
- * Improve readability of focused elements when they are also in an
- * active/hover state.
+ * Remove the outline on focused links when they are also active or hovered
+ * in all browsers (opinionated).
*/
a:active,
a:hover {
- outline: 0;
+ outline-width: 0;
}
/* Text-level semantics
========================================================================== */
/**
- * Address styling not present in IE 8/9/10/11, Safari, and Chrome.
+ * 1. Remove the bottom border in Firefox <40.
+ * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
*/
abbr[title] {
- border-bottom: 1px dotted;
+ border-bottom: none; /* 1 */
+ text-decoration: underline; /* 2 */
+ text-decoration: underline dotted; /* 2 */
}
/**
- * Address style set to `bolder` in Firefox 4+, Safari, and Chrome.
+ * Prevent the duplicate application of `bolder` by the next rule in Safari 6.
*/
b,
strong {
- font-weight: bold;
+ font-weight: inherit;
}
-@if $normalize-vertical-rhythm or support-legacy-browser(ie, "7") {
- /**
- * Set 1 unit of vertical rhythm on the top and bottom margin.
- */
+/**
+ * Add the correct font weight in Chrome, Edge, and Safari.
+ */
- blockquote {
- @include output-rhythm(margin, rhythm(1) $indent-amount);
+b,
+strong {
+ font-weight: bolder;
+}
+
+/**
+ * 1. Correct the inheritance and scaling of font size in all browsers.
+ * 2. Correct the odd `em` font sizing in all browsers.
+ */
+
+%monospace,
+code,
+kbd,
+samp {
+ font-family: monospace, monospace; /* 1 */
+ @if support-legacy-browser(ie, "6") {
+ _font-family: 'courier new', monospace;
}
+ font-size: 1em; /* 2 */
}
/**
- * Address styling not present in Safari and Chrome.
+ * Add the correct font style in Android <4.4.
*/
dfn {
@@ -188,8 +198,8 @@ dfn {
}
/**
- * Address variable `h1` font-size and margin within `section` and `article`
- * contexts in Firefox 4+, Safari, and Chrome.
+ * Correct the font size and margin on `h1` elements within `section` and
+ * `article` contexts in Chrome, Firefox, and Safari.
*/
h1 {
@@ -238,30 +248,17 @@ h1 {
}
}
-@if support-legacy-browser(ie, "9") {
- /**
- * Address styling not present in IE 8/9.
- */
-
- mark {
- background: #ff0;
- color: #000;
- }
-}
-
-@if $normalize-vertical-rhythm or support-legacy-browser(ie, "7") {
- /**
- * Set 1 unit of vertical rhythm on the top and bottom margin.
- */
+/**
+ * Add the correct background and color in IE <10.
+ */
- p,
- pre {
- @include output-rhythm(margin, rhythm(1) 0);
- }
+mark {
+ background-color: #ff0;
+ color: #000;
}
/**
- * Address inconsistent and variable font size in all browsers.
+ * Add the correct font size in all browsers.
*/
small {
@@ -269,7 +266,8 @@ small {
}
/**
- * Prevent `sub` and `sup` affecting `line-height` in all browsers.
+ * Prevent `sub` and `sup` elements from affecting the line height in
+ * all browsers.
*/
sub,
@@ -280,17 +278,48 @@ sup {
vertical-align: baseline;
}
+sub {
+ bottom: -0.25em;
+}
+
sup {
top: -0.5em;
}
-sub {
- bottom: -0.25em;
+/* Embedded content
+ ========================================================================== */
+
+/**
+ * Remove the border on images inside links in IE <11.
+ */
+
+img {
+ border-style: none;
+ @if support-legacy-browser(ie, "7") {
+ /* Improve image quality when scaled in IE 7. */
+ -ms-interpolation-mode: bicubic;
+ }
}
+/**
+ * Hide the overflow in IE.
+ */
+
+svg:not(:root) {
+ overflow: hidden;
+}
+
+/* Grouping content
+ ========================================================================== */
+
@if $normalize-vertical-rhythm or support-legacy-browser(ie, "7") {
- /* Lists
- ========================================================================== */
+ /**
+ * Set 1 unit of vertical rhythm on the top and bottom margin.
+ */
+
+ blockquote {
+ @include output-rhythm(margin, rhythm(1) $indent-amount);
+ }
/**
* Address margins set differently in IE 6/7.
@@ -344,82 +373,61 @@ sub {
}
}
-/* Embedded content
- ========================================================================== */
-
-@if support-legacy-browser(ie, "10") {
- /**
- * Remove border when inside `a` element in IE 8/9/10.
- */
+/**
+ * Add the correct margin in IE 8.
+ */
- img {
- border: 0;
- @if support-legacy-browser(ie, "7") {
- /* Improve image quality when scaled in IE 7. */
- -ms-interpolation-mode: bicubic;
- }
- }
+figure {
+ @include output-rhythm(margin, rhythm(1) $indent-amount);
}
/**
- * Correct overflow not hidden in IE 9/10/11.
+ * 1. Add the correct box sizing in Firefox.
+ * 2. Show the overflow in Edge and IE.
*/
-svg:not(:root) {
- overflow: hidden;
+hr {
+ @include box-sizing(content-box); /* 1 */
+ height: 0; /* 1 */
+ overflow: visible; /* 2 */
}
-/* Grouping content
- ========================================================================== */
-
-@if support-legacy-browser(ie, "9") or support-legacy-browser(safari, "6") {
+@if $normalize-vertical-rhythm or support-legacy-browser(ie, "7") {
/**
- * Address margin not present in IE 8/9 and Safari.
+ * Set 1 unit of vertical rhythm on the top and bottom margin.
*/
- figure {
- @include output-rhythm(margin, rhythm(1) $indent-amount);
+ p,
+ pre {
+ @include output-rhythm(margin, rhythm(1) 0);
}
}
-/**
- * Address differences between Firefox and other browsers.
- */
-
-hr {
- @include box-sizing(content-box);
- height: 0;
-}
-
-/**
- * Contain overflow in all browsers.
- */
-
pre {
- overflow: auto;
-}
-
-/**
- * Address odd `em`-unit font size rendering in all browsers.
- */
-
-code,
-kbd,
-pre,
-samp {
- font-family: monospace, monospace;
- @if support-legacy-browser(ie, "6") {
- _font-family: 'courier new', monospace;
- }
- font-size: 1em;
+ @extend %monospace;
}
/* Forms
========================================================================== */
/**
- * Known limitation: by default, Chrome and Safari on OS X allow very limited
- * styling of `select`, unless a `border` property is set.
+ * Known issues:
+ * - By default, Chrome on OS X and Safari on OS X allow very limited styling of
+ * select, unless a border property is set. The default font weight on
+ * optgroup elements cannot safely be changed in Chrome on OSX and Safari on
+ * OS X.
+ * - It is recommended that you do not style checkbox and radio inputs as
+ * Firefox's implementation does not respect box-sizing, padding, or width.
+ * - Certain font size values applied to number inputs cause the cursor style of
+ * the decrement button to change from default to text.
+ * - The search input is not fully stylable by default. In Chrome and Safari on
+ * OSX/iOS you can't control font, padding, border, or background. In Chrome
+ * and Safari on Windows you can't control border properly. It will apply
+ * border-width but will only show a border color (which cannot be controlled)
+ * for the outer 1px of that border. Applying -webkit-appearance: textfield
+ * addresses these issues without removing the benefits of search inputs (e.g.
+ * showing past searches). Safari (but not Chrome) will clip the cancel button
+ * on when it has padding (and textfield appearance).
*/
@if support-legacy-browser(ie, "7") {
@@ -433,12 +441,10 @@ samp {
}
/**
- * 1. Correct color not being inherited.
- * Known issue: affects color of disabled elements.
- * 2. Correct font properties not being inherited.
- * 3. Address margins set differently in Firefox 4+, Safari, and Chrome.
- * 4. Address `font-family` inconsistency between `textarea` and other form in IE 7
- * 5. Improve appearance and consistency with IE 6/7.
+ * 1. Change font properties to `inherit` in all browsers (opinionated).
+ * 2. Remove the margin in Firefox and Safari.
+ * 3. Address `font-family` inconsistency between `textarea` and other form in IE 7
+ * 4. Improve appearance and consistency with IE 6/7.
*/
button,
@@ -446,17 +452,16 @@ input,
optgroup,
select,
textarea {
- color: inherit; /* 1 */
- font: inherit; /* 2 */
- margin: 0; /* 3 */
+ font: inherit; /* 1 */
+ margin: 0; /* 2 */
@if support-legacy-browser(ie, "7") {
- *font-family: $base-font-family; /* 4 */
- *vertical-align: middle; /* 5 */
+ *font-family: $base-font-family; /* 3 */
+ *vertical-align: middle; /* 4 */
}
}
/**
- * Address `overflow` set to `hidden` in IE 8/9/10/11.
+ * Show the overflow in IE.
*/
button {
@@ -464,112 +469,100 @@ button {
}
/**
- * Address inconsistent `text-transform` inheritance for `button` and `select`.
- * All other form control elements do not inherit `text-transform` values.
- * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.
- * Correct `select` style inheritance in Firefox.
+ * Remove the inheritance of text transform in Edge, Firefox, and IE.
+ * 1. Remove the inheritance of text transform in Firefox.
*/
button,
-select {
+select { /* 1 */
text-transform: none;
}
/**
- * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
- * and `video` controls.
- * 2. Correct inability to style clickable `input` types in iOS.
- * 3. Improve usability and consistency of cursor style between image-type
- * `input` and others.
- * 4. Remove inner spacing in IE 7 without affecting normal text inputs.
- * Known issue: inner spacing remains in IE 6.
+ * 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
+ * controls in Android 4.
+ * 2. Correct the inability to style clickable types in iOS and Safari.
*/
button,
-html input[type="button"], /* 1 */
-input[type="reset"],
-input[type="submit"] {
+html [type="button"], /* 1 */
+[type="reset"],
+[type="submit"] {
-webkit-appearance: button; /* 2 */
- cursor: pointer; /* 3 */
- @if support-legacy-browser(ie, "7") {
- *overflow: visible; /* 4 */
- }
}
/**
- * Re-set default cursor for disabled elements.
+ * Remove the inner border and padding in Firefox.
*/
-button[disabled],
-html input[disabled] {
- cursor: default;
+button::-moz-focus-inner,
+[type="button"]::-moz-focus-inner,
+[type="reset"]::-moz-focus-inner,
+[type="submit"]::-moz-focus-inner {
+ border-style: none;
+ padding: 0;
}
/**
- * Remove inner padding and border in Firefox 4+.
+ * Restore the focus styles unset by the previous rule.
*/
-button::-moz-focus-inner,
-input::-moz-focus-inner {
- border: 0;
- padding: 0;
+button:-moz-focusring,
+[type="button"]:-moz-focusring,
+[type="reset"]:-moz-focusring,
+[type="submit"]:-moz-focusring {
+ outline: 1px dotted ButtonText;
}
/**
- * Address Firefox 4+ setting `line-height` on `input` using `!important` in
- * the UA stylesheet.
+ * Show the overflow in Edge.
*/
input {
- line-height: normal;
+ overflow: visible;
+ @if support-legacy-browser(firefox, "29") {
+ // Firefox sets `line-height` using `!important` in the UA stylesheet.
+ line-height: normal;
+ }
}
-@if support-legacy-browser(ie, "10") {
- /**
- * It's recommended that you don't attempt to style these elements.
- * Firefox's implementation doesn't respect box-sizing, padding, or width.
- *
- * 1. Address box sizing set to `content-box` in IE 8/9/10.
- * 2. Remove excess padding in IE 8/9/10.
- * 3. Remove excess padding in IE 7.
- * Known issue: excess padding remains in IE 6.
- */
+/**
+ * 1. Add the correct box sizing in IE <11.
+ * 2. Remove the padding in IE <11.
+ * 3. Remove excess padding in IE 7.
+ * Known issue: excess padding remains in IE 6.
+ */
- input[type="checkbox"],
- input[type="radio"] {
- @include box-sizing(border-box); /* 1 */
- padding: 0; /* 2 */
- @if support-legacy-browser(ie, "7") {
- *height: 13px; /* 3 */
- *width: 13px; /* 3 */
- }
+[type="checkbox"],
+[type="radio"] {
+ @include box-sizing(border-box); /* 1 */
+ padding: 0; /* 2 */
+ @if support-legacy-browser(ie, "7") {
+ *height: 13px; /* 3 */
+ *width: 13px; /* 3 */
}
}
/**
- * Fix the cursor style for Chrome's increment/decrement buttons. For certain
- * `font-size` values of the `input`, it causes the cursor style of the
- * decrement button to change from `default` to `text`.
+ * Correct the cursor style of increment and decrement buttons in Chrome.
*/
-input[type="number"]::-webkit-inner-spin-button,
-input[type="number"]::-webkit-outer-spin-button {
+[type="number"]::-webkit-inner-spin-button,
+[type="number"]::-webkit-outer-spin-button {
height: auto;
}
/**
- * 1. Address `appearance` set to `searchfield` in Safari and Chrome.
- * 2. Address `box-sizing` set to `border-box` in Safari and Chrome.
+ * 1. Correct the odd appearance in Chrome and Safari.
+ * 2. Correct the outline style in Safari.
*/
-input[type="search"] {
+[type="search"] {
-webkit-appearance: textfield; /* 1 */
- @include box-sizing(content-box); /* 2 */
+ outline-offset: -2px; /* 2 */
/**
- * Remove inner padding and search cancel button in Safari and Chrome on OS X.
- * Safari (but not Chrome) clips the cancel button when the search input has
- * padding (and `textfield` appearance).
+ * Remove the inner padding and cancel buttons in Chrome and Safari on OS X.
*/
&::-webkit-search-cancel-button,
@@ -579,7 +572,26 @@ input[type="search"] {
}
/**
- * Define consistent border, margin, and padding.
+ * Correct the text style of placeholders in Chrome, Edge, and Safari.
+ */
+
+::-webkit-input-placeholder {
+ color: inherit;
+ opacity: 0.54;
+}
+
+/**
+ * 1. Correct the inability to style clickable types in iOS and Safari.
+ * 2. Change font properties to `inherit` in Safari.
+ */
+
+::-webkit-file-upload-button {
+ -webkit-appearance: button; /* 1 */
+ font: inherit; /* 2 */
+}
+
+/**
+ * Change the border, margin, and padding in all browsers (opinionated).
*/
fieldset {
@@ -593,51 +605,37 @@ fieldset {
}
/**
- * 1. Correct `color` not being inherited in IE 8/9/10/11.
- * 2. Remove padding so people aren't caught out if they zero out fieldsets.
- * 3. Correct alignment displayed oddly in IE 6/7.
+ * 1. Correct the text wrapping in Edge and IE.
+ * 2. Correct the color inheritance from `fieldset` elements in IE.
+ * 3. Remove the padding so developers are not caught out when they zero out
+ * `fieldset` elements in all browsers.
+ * 4. Correct alignment displayed oddly in IE 6/7.
*/
legend {
- @if support-legacy-browser(ie, "11") {
- border: 0; /* 1 */
- }
- padding: 0; /* 2 */
+ box-sizing: border-box; /* 1 */
+ display: table; /* 1 */
+ max-width: 100%; /* 1 */
+ white-space: normal; /* 1 */
+ color: inherit; /* 2 */
+ padding: 0; /* 3 */
@if support-legacy-browser(ie, "7") {
- *margin-left: -7px; /* 3 */
+ *margin-left: -7px; /* 4 */
}
}
/**
- * Remove default vertical scrollbar in IE 8/9/10/11.
- */
-
-textarea {
- overflow: auto;
-}
-
-/**
- * Don't inherit the `font-weight` (applied by a rule above).
- * NOTE: the default cannot safely be changed in Chrome and Safari on OS X.
+ * Restore the font weight unset by a previous rule.
*/
optgroup {
font-weight: bold;
}
-/* Tables
- ========================================================================== */
-
/**
- * Remove most spacing between table cells.
+ * Remove the default vertical scrollbar in IE.
*/
-table {
- border-collapse: collapse;
- border-spacing: 0;
-}
-
-td,
-th {
- padding: 0;
+textarea {
+ overflow: auto;
}
diff --git a/fork-versions/typey-chroma-kss/base/_html5.scss b/fork-versions/typey-chroma-kss/base/_html5.scss
index fba788b..2a1a594 100644
--- a/fork-versions/typey-chroma-kss/base/_html5.scss
+++ b/fork-versions/typey-chroma-kss/base/_html5.scss
@@ -1,10 +1,9 @@
// HTML5 display definitions
// ==========================================================================
-// Correct `block` display not defined for any HTML5 element in IE 8/9.
-// Correct `block` display not defined for `details` or `summary` in IE 10/11
-// and Firefox.
-// Correct `block` display not defined for `main` in IE 11.
+// Add the correct display in IE <10.
+// Add the correct display in Edge, IE, and Firefox for `details` or `summary`.
+// Add the correct display in IE for `main`.
article,
aside,
details,
@@ -12,7 +11,6 @@ figcaption,
figure,
footer,
header,
-hgroup,
main,
menu,
nav,
@@ -21,33 +19,27 @@ summary {
display: block;
}
+// Add the correct display in IE <10.
audio,
canvas,
progress,
video {
- @if support-for(ie, 9) {
- // Correct `inline-block` display not defined in IE 8/9.
- display: inline-block;
- }
- // Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.
- vertical-align: baseline;
+ display: inline-block;
}
-// Prevent modern browsers from displaying `audio` without controls.
+// Add the correct display and remove excess height in iOS 4-7.
audio:not([controls]) {
display: none;
- // Remove excess height in iOS 5 devices.
height: 0;
}
-@if support-for(ie, 10) {
- // Address `[hidden]` styling not present in IE 8/9/10.
- [hidden] {
- display: none;
- }
+// Add the correct vertical alignment in Chrome, Firefox, and Opera.
+progress {
+ vertical-align: baseline;
}
-// Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22.
-template {
+// Add the correct display in IE <11, Safari <8, and Firefox <22.
+template,
+[hidden] {
display: none;
}
diff --git a/fork-versions/typey-chroma-kss/base/_root.scss b/fork-versions/typey-chroma-kss/base/_root.scss
index 830d2af..090f090 100644
--- a/fork-versions/typey-chroma-kss/base/_root.scss
+++ b/fork-versions/typey-chroma-kss/base/_root.scss
@@ -1,17 +1,15 @@
// Use the saner border-box model for all elements.
* {
- @if support-for(firefox, 28) {
- -moz-box-sizing: border-box;
- }
box-sizing: border-box;
}
html {
@include define-type-sizing();
- // Set default font family to sans-serif.
+ // Show a background image that can be used to debug your alignments.
+ // @include debug-vertical-alignment();
+ // Change the default font family in all browsers (opinionated).
font-family: $font-body;
- // Prevent iOS text size adjust after orientation change, without disabling
- // user zoom.
+ // Prevent adjustments of font size after orientation changes in IE and iOS.
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
// On short pages, we want any background gradients to fill the entire height
diff --git a/fork-versions/typey-chroma-kss/base/embedded/_embedded.scss b/fork-versions/typey-chroma-kss/base/embedded/_embedded.scss
index db41ca8..8445b3f 100644
--- a/fork-versions/typey-chroma-kss/base/embedded/_embedded.scss
+++ b/fork-versions/typey-chroma-kss/base/embedded/_embedded.scss
@@ -13,10 +13,8 @@
// Style guide: base.embedded.img
img {
- @if support-for(ie, 10) {
- // Remove border when inside `a` element in IE 8/9/10.
- border: 0;
- }
+ // Remove the border on images inside links in IE <11.
+ border-style: none;
@if support-for(ie, 7) {
// Improve image quality when scaled in IE 7.
-ms-interpolation-mode: bicubic;
@@ -42,6 +40,6 @@ svg {
// Style guide: base.embedded.svg
svg:not(:root) {
- // Correct overflow not hidden in IE 9/10/11.
+ // Hide the overflow in IE.
overflow: hidden;
}
diff --git a/fork-versions/typey-chroma-kss/base/forms/_forms.scss b/fork-versions/typey-chroma-kss/base/forms/_forms.scss
index 93940d5..ac9714b 100644
--- a/fork-versions/typey-chroma-kss/base/forms/_forms.scss
+++ b/fork-versions/typey-chroma-kss/base/forms/_forms.scss
@@ -26,12 +26,9 @@ textarea {
// Keep form elements constrained in their containers.
box-sizing: border-box;
max-width: 100%;
- // Correct color not being inherited.
- // Known issue: affects color of disabled elements.
- color: inherit;
- // Correct font properties not being inherited.
+ // Change font properties to `inherit` in all browsers (opinionated).
font: inherit;
- // Address margins set differently in Firefox 4+, Safari, and Chrome.
+ // Remove the margin in Firefox and Safari.
margin: 0;
@if support-for(ie, 7) {
// Address `font-family` inconsistency between `textarea` and other form in IE 7
@@ -41,57 +38,85 @@ textarea {
}
}
-// Address `overflow` set to `hidden` in IE 8/9/10/11.
+// Show the overflow in IE.
button {
overflow: visible;
}
-// Address inconsistent `text-transform` inheritance for `button` and `select`.
-// All other form control elements do not inherit `text-transform` values.
-// Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.
-// Correct `select` style inheritance in Firefox.
+// Remove the inheritance of text transform in Edge, Firefox, and IE.
button,
select {
text-transform: none;
}
-// Remove inner padding and border in Firefox 4+.
+// 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
+// controls in Android 4.
+// 2. Correct the inability to style clickable types in iOS and Safari.
+button,
+html [type="button"], // 1
+[type="reset"],
+[type="submit"] {
+ -webkit-appearance: button; // 2
+}
+
+// Remove the inner border and padding in Firefox.
button::-moz-focus-inner,
-input::-moz-focus-inner {
- border: 0;
+[type="button"]::-moz-focus-inner,
+[type="reset"]::-moz-focus-inner,
+[type="submit"]::-moz-focus-inner {
+ border-style: none;
padding: 0;
}
-// 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
-// and `video` controls.
-// 2. Correct inability to style clickable `input` types in iOS.
-html input[type="button"], // 1
-[type="reset"],
-[type="submit"] {
- -webkit-appearance: button; // 2
+// Restore the focus styles unset by the previous rule.
+button:-moz-focusring,
+[type="button"]:-moz-focusring,
+[type="reset"]:-moz-focusring,
+[type="submit"]:-moz-focusring {
+ outline: 1px dotted ButtonText;
}
-// Fix the cursor style for Chrome's increment/decrement buttons. For certain
-// `font-size` values of the `input`, it causes the cursor style of the
-// decrement button to change from `default` to `text`.
-input[type="number"]::-webkit-inner-spin-button,
-input[type="number"]::-webkit-outer-spin-button {
+// Show the overflow in Edge.
+input {
+ overflow: visible;
+ @if support-for(firefox, 29) {
+ // Firefox sets `line-height` using `!important` in the UA stylesheet.
+ line-height: normal;
+ }
+}
+
+// Correct the cursor style of increment and decrement buttons in Chrome.
+[type="number"]::-webkit-inner-spin-button,
+[type="number"]::-webkit-outer-spin-button {
height: auto;
}
-input[type="search"] {
- // Address `appearance` set to `searchfield` in Safari and Chrome.
+[type="search"] {
+ // Correct the odd appearance in Chrome and Safari.
-webkit-appearance: textfield;
+ // Correct the outline style in Safari.
+ outline-offset: -2px;
- // Remove inner padding and search cancel button in Safari and Chrome on OS X.
- // Safari (but not Chrome) clips the cancel button when the search input has
- // padding (and `textfield` appearance).
+ // Remove the inner padding and cancel buttons in Chrome and Safari on OS X.
&::-webkit-search-cancel-button,
&::-webkit-search-decoration {
-webkit-appearance: none;
}
}
+// Correct the text style of placeholders in Chrome, Edge, and Safari.
+::-webkit-input-placeholder {
+ color: inherit;
+ opacity: 0.54;
+}
+
+::-webkit-file-upload-button {
+ // Correct the inability to style clickable types in iOS and Safari.
+ -webkit-appearance: button;
+ // Change font properties to `inherit` in Safari.
+ font: inherit;
+}
+
// Buttons
//
// Buttons built with the `<button>` element are the most flexible for styling
@@ -118,10 +143,6 @@ button,
// The %text-form-element can be used to style `<input>` text types and
// `<textarea>` elements at the same time.
%text-form-element {
- // Address Firefox 4+ setting `line-height` on `input` using `!important` in
- // the UA stylesheet.
- line-height: inherit;
-
// Add your styles.
}
@@ -135,30 +156,28 @@ button,
//
// Style guide: forms.base.input
-input {
- &[type="text"],
- &[type="search"],
- &[type="tel"],
- &[type="url"],
- &[type="email"],
- &[type="password"],
- &[type="date"],
- &[type="time"],
- &[type="number"] {
- @extend %text-form-element;
- }
+[type="text"],
+[type="search"],
+[type="tel"],
+[type="url"],
+[type="email"],
+[type="password"],
+[type="date"],
+[type="time"],
+[type="number"] {
+ @extend %text-form-element !optional;
+}
- &[type="range"] {
- // Add your styles.
- }
+[type="range"] {
+ // Add your styles.
+}
- &[type="color"] {
- // Add your styles.
- }
+[type="color"] {
+ // Add your styles.
+}
- &[type="file"] {
- // Add your styles.
- }
+[type="file"] {
+ // Add your styles.
}
// Checkboxes
@@ -185,14 +204,12 @@ input {
//
// Style guide: forms.base.input-radio
-input[type="checkbox"],
-input[type="radio"] {
- @if support-for(ie, 10) {
- // Address box sizing set to `content-box` in IE 8/9/10.
- box-sizing: border-box;
- // Remove excess padding in IE 8/9/10.
- padding: 0;
- }
+[type="checkbox"],
+[type="radio"] {
+ // Add the correct box sizing in IE <11.
+ box-sizing: border-box;
+ // Remove the padding in IE <11.
+ padding: 0;
@if support-for(ie, 7) {
// Remove excess padding in IE 7.
// Known issue: excess padding remains in IE 6.
@@ -211,18 +228,20 @@ input[type="radio"] {
// Style guide: forms.base.fieldset
fieldset {
- // Apply borders and padding that keep the vertical rhythm.
+ // Change the border, margin, and padding in all browsers (opinionated).
@include padding(.35 .625 .65);
border: 1px solid color(border);
- // Define consistent border, margin, and padding.
margin: 0 2px;
}
legend {
- // Correct `color` not being inherited in IE 8/9/10/11.
- @if support-for(ie, 11) {
- border: 0;
- }
+ // Correct the text wrapping in Edge and IE.
+ box-sizing: border-box;
+ display: table;
+ max-width: 100%;
+ white-space: normal;
+ // Correct the color inheritance from `fieldset` elements in IE.
+ color: inherit;
// Align legend text with a fieldset's text while removing left padding so
// people aren't caught out if they zero out fieldset padding.
margin-left: -5px;
@@ -264,8 +283,7 @@ select {
}
optgroup {
- // Don't inherit the `font-weight` (applied by a rule above).
- // NOTE: the default cannot safely be changed in Chrome and Safari on OS X.
+ // Restore the font weight unset by a previous rule.
font-weight: bold;
}
@@ -278,7 +296,7 @@ optgroup {
// Style guide: forms.base.textarea
textarea {
- @extend %text-form-element;
- // Remove default vertical scrollbar in IE 8/9/10/11.
+ @extend %text-form-element !optional;
+ // Remove the default vertical scrollbar in IE.
overflow: auto;
}
diff --git a/fork-versions/typey-chroma-kss/base/grouping/_grouping.scss b/fork-versions/typey-chroma-kss/base/grouping/_grouping.scss
index 4205132..3d6fd05 100644
--- a/fork-versions/typey-chroma-kss/base/grouping/_grouping.scss
+++ b/fork-versions/typey-chroma-kss/base/grouping/_grouping.scss
@@ -8,6 +8,26 @@
// Style guide: base.grouping
+// Block quotes
+//
+// The `<blockquote>` element is for quoting blocks of content from another
+// source within your document. Wrap the `<blockquote>` around any <abbr
+// title="HyperText Markup Language">HTML</abbr> as the quote. For straight
+// quotes, we recommend a `<p>`.
+//
+// Optionally, add a `<footer>` to identify the source of the quote, wrapping
+// the name of the source work in `<cite>`.
+//
+// Markup: grouping-blockquote.hbs
+//
+// Style guide: base.grouping.blockquote
+
+blockquote {
+ // Set 1 unit of vertical rhythm on the top and bottom margin.
+ // Also indent the quote on both sides.
+ @include margin(1 $indent-amount);
+}
+
// Lists
//
// Weight: -1
@@ -91,26 +111,6 @@ ul {
}
}
-// Block quotes
-//
-// The `<blockquote>` element is for quoting blocks of content from another
-// source within your document. Wrap the `<blockquote>` around any <abbr
-// title="HyperText Markup Language">HTML</abbr> as the quote. For straight
-// quotes, we recommend a `<p>`.
-//
-// Optionally, add a `<footer>` to identify the source of the quote, wrapping
-// the name of the source work in `<cite>`.
-//
-// Markup: grouping-blockquote.hbs
-//
-// Style guide: base.grouping.blockquote
-
-blockquote {
- // Set 1 unit of vertical rhythm on the top and bottom margin.
- // Also indent the quote on both sides.
- @include margin(1 $indent-amount);
-}
-
// Figures
//
// The `<figure>` element can be used to annotate illustrations, diagrams,
@@ -124,7 +124,7 @@ blockquote {
// Style guide: base.grouping.figure
figure {
- // Address margin not present in IE 8/9 and Safari.
+ // Add the correct margin in IE 8.
@include margin(1 $indent-amount);
}
@@ -144,9 +144,11 @@ figcaption {
hr {
@extend %divider;
- // Address differences between Firefox and other browsers.
+ // Add the correct box sizing in Firefox.
box-sizing: content-box;
height: 0;
+ // Show the overflow in Edge and IE.
+ overflow: visible;
}
// Body copy
@@ -176,15 +178,6 @@ pre {
//
// Style guide: base.grouping.pre
-%monospace {
- // Address odd `em`-unit font size rendering in all browsers.
- // The value of $font-monospace ends with ", serif".
- font-family: $font-monospace;
- font-size: 1em;
-}
-
pre {
@extend %monospace;
- // Contain overflow in all browsers.
- overflow: auto;
}
diff --git a/fork-versions/typey-chroma-kss/base/links/_links.scss b/fork-versions/typey-chroma-kss/base/links/_links.scss
index a1a7562..f76e47d 100644
--- a/fork-versions/typey-chroma-kss/base/links/_links.scss
+++ b/fork-versions/typey-chroma-kss/base/links/_links.scss
@@ -18,6 +18,10 @@
:link,
%link {
color: color(link);
+ // Remove the gray background on active links in IE 10.
+ background-color: transparent;
+ // Remove gaps in links underline in iOS 8+ and Safari 8+.
+ -webkit-text-decoration-skip: objects;
}
:visited {
@@ -31,18 +35,13 @@ a:focus {
a:active {
color: color(link-active);
-
- @if support-for(ie, 10) {
- // Remove the gray background color from active links in IE 10.
- background-color: transparent;
- }
}
-// Improve readability of focused elements when they are also in an
-// active/hover state.
+// Remove the outline on focused links when they are also active or hovered
+// in all browsers (opinionated).
a:active,
a:hover {
- outline: 0;
+ outline-width: 0;
}
@media print {
diff --git a/fork-versions/typey-chroma-kss/base/text/_text.scss b/fork-versions/typey-chroma-kss/base/text/_text.scss
index 83713a9..e00f567 100644
--- a/fork-versions/typey-chroma-kss/base/text/_text.scss
+++ b/fork-versions/typey-chroma-kss/base/text/_text.scss
@@ -16,8 +16,11 @@
// Style guide: base.text.abbr
abbr[title] {
- // Address styling not present in IE 8/9/10/11, Safari, and Chrome.
- border-bottom: 1px dotted;
+ // Remove the bottom border in Firefox <40.
+ border-bottom: none;
+ // Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
+ text-decoration: underline;
+ text-decoration: underline dotted;
@media print {
// Add visible title after abbreviations.
@@ -41,10 +44,17 @@ abbr[title] {
//
// Style guide: base.text.b
+// Prevent the duplicate application of `bolder` by the next rule in Safari 6.
+
b,
strong {
- // Address style set to `bolder` in Firefox 4+, Safari, and Chrome.
- font-weight: bold;
+ font-weight: inherit;
+}
+
+b,
+strong {
+ // Add the correct font weight in Chrome, Edge, and Safari.
+ font-weight: bolder;
}
// Cite
@@ -70,11 +80,16 @@ cite {
//
// Style guide: base.text.code
+%monospace,
code,
kbd,
samp,
var {
- @extend %monospace;
+ // Correct the inheritance and scaling of font size in all browsers.
+ // The value of $font-monospace ends with ", serif".
+ font-family: $font-monospace;
+ // Correct the odd `em` font sizing in all browsers.
+ font-size: 1em;
}
// Deleted text
@@ -98,7 +113,7 @@ del {
// Style guide: base.text.dfn
dfn {
- // Address styling not present in Safari and Chrome.
+ // Add the correct font style in Android <4.4.
font-style: italic;
}
@@ -142,12 +157,10 @@ ins {
//
// Style guide: base.text.mark
-@if support-for(ie, 9) {
- mark {
- // Address styling not present in IE 8/9.
- background: color(mark-bg);
- color: color(text);
- }
+mark {
+ // Add the correct background and color in IE <10.
+ background-color: color(mark-bg);
+ color: color(text);
}
// Quote
@@ -185,7 +198,7 @@ s {
// Style guide: base.text.small
small {
- // Address inconsistent and variable font size in all browsers.
+ // Add the correct font size in all browsers.
@include font-size(s);
}
@@ -200,21 +213,22 @@ small {
sub,
sup {
- // Prevent `sub` and `sup` affecting `line-height` in all browsers.
+ // Prevent `sub` and `sup` elements from affecting the line height in
+ // all browsers.
@include font-size(xs);
line-height: 0;
position: relative;
vertical-align: baseline;
}
-sup {
- top: -.5em;
-}
-
sub {
bottom: -.25em;
}
+sup {
+ top: -.5em;
+}
+
// Underlined text
//
// To underline text use the `<u>` element. Not recommended since underlines are
diff --git a/fork-versions/typey/_normalize.scss b/fork-versions/typey/_normalize.scss
index c948316..908d38a 100644
--- a/fork-versions/typey/_normalize.scss
+++ b/fork-versions/typey/_normalize.scss
@@ -5,9 +5,8 @@
@import 'typey';
/**
- * 1. Set default font family to sans-serif.
- * 2. Prevent iOS and IE text size adjust after device orientation change,
- * without disabling user zoom.
+ * 1. Change the default font family in all browsers (opinionated).
+ * 2. Prevent adjustments of font size after orientation changes in IE and iOS.
*/
html {
@@ -20,7 +19,7 @@ html {
}
/**
- * Remove default margin.
+ * Remove the margin in all browsers (opinionated).
*/
body {
@@ -31,10 +30,9 @@ body {
========================================================================== */
/**
- * Correct `block` display not defined for any HTML5 element in IE 8/9.
- * Correct `block` display not defined for `details` or `summary` in IE 10/11
- * and Firefox.
- * Correct `block` display not defined for `main` in IE 11.
+ * Add the correct display in IE <10.
+ * Add the correct display in Edge, IE, and Firefox for `details` or `summary`.
+ * Add the correct display in IE for `main`.
*/
article,
@@ -44,7 +42,6 @@ figcaption,
figure,
footer,
header,
-hgroup,
main,
menu,
nav,
@@ -54,27 +51,22 @@ summary {
}
/**
- * 1. Correct `inline-block` display not defined in IE 8/9.
- * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.
+ * Add the correct display in IE <10.
*/
audio,
canvas,
progress,
video {
- @if support-for(ie, 9) {
- display: inline-block; /* 1 */
- @if support-for(ie, 7) {
- *display: inline;
- *zoom: 1;
- }
+ display: inline-block;
+ @if support-for(ie, 7) {
+ *display: inline;
+ *zoom: 1;
}
- vertical-align: baseline; /* 2 */
}
/**
- * Prevent modern browsers from displaying `audio` without controls.
- * Remove excess height in iOS 5 devices.
+ * Add the correct display and remove excess height in iOS 4-7.
*/
audio:not([controls]) {
@@ -82,21 +74,21 @@ audio:not([controls]) {
height: 0;
}
-@if support-for(ie, 10) {
- /**
- * Address `[hidden]` styling not present in IE 8/9/10.
- */
+/**
+ * Add the correct vertical alignment in Chrome, Firefox, and Opera.
+ */
- [hidden] {
- display: none;
- }
+progress {
+ vertical-align: baseline;
}
/**
- * Hide the `template` element in IE 8/9/10/11, Safari, and Firefox < 22.
+ * Add the correct display in IE <11, Safari <8, and Firefox <22.
+ * 1. Add the correct display in IE.
*/
-template {
+template, /* 1 */
+[hidden] {
display: none;
}
@@ -104,51 +96,75 @@ template {
========================================================================== */
/**
- * Remove the gray background color from active links in IE 10.
+ * 1. Remove the gray background on active links in IE 10.
+ * 2. Remove gaps in links underline in iOS 8+ and Safari 8+.
*/
a {
- background-color: transparent;
+ background-color: transparent; /* 1 */
+ -webkit-text-decoration-skip: objects; /* 2 */
}
/**
- * Improve readability of focused elements when they are also in an
- * active/hover state.
+ * Remove the outline on focused links when they are also active or hovered
+ * in all browsers (opinionated).
*/
a:active,
a:hover {
- outline: 0;
+ outline-width: 0;
}
/* Text-level semantics
========================================================================== */
/**
- * Address styling not present in IE 8/9/10/11, Safari, and Chrome.
+ * 1. Remove the bottom border in Firefox <40.
+ * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
*/
abbr[title] {
- border-bottom: 1px dotted;
+ border-bottom: none; /* 1 */
+ text-decoration: underline; /* 2 */
+ text-decoration: underline dotted; /* 2 */
}
/**
- * Address style set to `bolder` in Firefox 4+, Safari, and Chrome.
+ * Prevent the duplicate application of `bolder` by the next rule in Safari 6.
*/
b,
strong {
- font-weight: bold;
+ font-weight: inherit;
+}
+
+/**
+ * Add the correct font weight in Chrome, Edge, and Safari.
+ */
+
+b,
+strong {
+ font-weight: bolder;
}
+/**
+ * 1. Correct the inheritance and scaling of font size in all browsers.
+ * 2. Correct the odd `em` font sizing in all browsers.
+ */
+
+%monospace,
code,
kbd,
samp {
- @extend %monospace;
+ font-family: monospace, monospace; /* 1 */
+ @if support-for(ie, 6) {
+ _font-family: 'courier new', monospace;
+ }
+ font-size: 1em; /* 2 */
}
/**
- * Address styling not present in Safari and Chrome.
+ * Add the correct font style in Android <4.4.
*/
dfn {
@@ -156,8 +172,8 @@ dfn {
}
/**
- * Address variable `h1` font-size and margin within `section` and `article`
- * contexts in Firefox 4+, Safari, and Chrome.
+ * Correct the font size and margin on `h1` elements within `section` and
+ * `article` contexts in Chrome, Firefox, and Safari.
*/
h1 {
@@ -192,19 +208,17 @@ h6 {
@include margin(1 0, xs);
}
-@if support-for(ie, 9) {
- /**
- * Address styling not present in IE 8/9.
- */
+/**
+ * Add the correct background and color in IE <10.
+ */
- mark {
- background: #ff0;
- color: #000;
- }
+mark {
+ background-color: #ff0;
+ color: #000;
}
/**
- * Address inconsistent and variable font size in all browsers.
+ * Add the correct font size in all browsers.
*/
small {
@@ -212,7 +226,8 @@ small {
}
/**
- * Prevent `sub` and `sup` affecting `line-height` in all browsers.
+ * Prevent `sub` and `sup` elements from affecting the line height in
+ * all browsers.
*/
sub,
@@ -223,33 +238,31 @@ sup {
vertical-align: baseline;
}
-sup {
- top: -0.5em;
-}
-
sub {
bottom: -0.25em;
}
+sup {
+ top: -0.5em;
+}
+
/* Embedded content
========================================================================== */
-@if support-for(ie, 10) {
- /**
- * Remove border when inside `a` element in IE 8/9/10.
- */
+/**
+ * Remove the border on images inside links in IE <11.
+ */
- img {
- border: 0;
- @if support-for(ie, 7) {
- /* Improve image quality when scaled in IE 7. */
- -ms-interpolation-mode: bicubic;
- }
+img {
+ border-style: none;
+ @if support-for(ie, 7) {
+ /* Improve image quality when scaled in IE 7. */
+ -ms-interpolation-mode: bicubic;
}
}
/**
- * Correct overflow not hidden in IE 9/10/11.
+ * Hide the overflow in IE.
*/
svg:not(:root) {
@@ -260,6 +273,14 @@ svg:not(:root) {
========================================================================== */
/**
+ * Set 1 unit of vertical rhythm on the top and bottom margin.
+ */
+
+blockquote {
+ @include margin(1 $indent-amount);
+}
+
+/**
* Address margins set differently in IE 6/7.
*/
@@ -309,15 +330,7 @@ ul {
}
/**
- * Set 1 unit of vertical rhythm on the top and bottom margin.
- */
-
-blockquote {
- @include margin(1 $indent-amount);
-}
-
-/**
- * Address margin not present in IE 8/9 and Safari.
+ * Add the correct margin in IE 8.
*/
figure {
@@ -325,15 +338,14 @@ figure {
}
/**
- * Address differences between Firefox and other browsers.
+ * 1. Add the correct box sizing in Firefox.
+ * 2. Show the overflow in Edge and IE.
*/
hr {
- @if support-for(firefox, 28) {
- -moz-box-sizing: content-box;
- }
- box-sizing: content-box;
- height: 0;
+ box-sizing: content-box; /* 1 */
+ height: 0; /* 1 */
+ overflow: visible; /* 2 */
}
/**
@@ -345,33 +357,31 @@ pre {
@include margin(1 0);
}
-/**
- * Contain overflow in all browsers.
- */
-
pre {
@extend %monospace;
- overflow: auto;
-}
-
-/**
- * Address odd `em`-unit font size rendering in all browsers.
- */
-
-%monospace {
- font-family: monospace, monospace;
- @if support-for(ie, 6) {
- _font-family: 'courier new', monospace;
- }
- font-size: 1em;
}
/* Forms
========================================================================== */
/**
- * Known limitation: by default, Chrome and Safari on OS X allow very limited
- * styling of `select`, unless a `border` property is set.
+ * Known issues:
+ * - By default, Chrome on OS X and Safari on OS X allow very limited styling of
+ * select, unless a border property is set. The default font weight on
+ * optgroup elements cannot safely be changed in Chrome on OSX and Safari on
+ * OS X.
+ * - It is recommended that you do not style checkbox and radio inputs as
+ * Firefox's implementation does not respect box-sizing, padding, or width.
+ * - Certain font size values applied to number inputs cause the cursor style of
+ * the decrement button to change from default to text.
+ * - The search input is not fully stylable by default. In Chrome and Safari on
+ * OSX/iOS you can't control font, padding, border, or background. In Chrome
+ * and Safari on Windows you can't control border properly. It will apply
+ * border-width but will only show a border color (which cannot be controlled)
+ * for the outer 1px of that border. Applying -webkit-appearance: textfield
+ * addresses these issues without removing the benefits of search inputs (e.g.
+ * showing past searches). Safari (but not Chrome) will clip the cancel button
+ * on when it has padding (and textfield appearance).
*/
@if support-for(ie, 7) {
@@ -385,12 +395,10 @@ pre {
}
/**
- * 1. Correct color not being inherited.
- * Known issue: affects color of disabled elements.
- * 2. Correct font properties not being inherited.
- * 3. Address margins set differently in Firefox 4+, Safari, and Chrome.
- * 4. Address `font-family` inconsistency between `textarea` and other form in IE 7
- * 5. Improve appearance and consistency with IE 6/7.
+ * 1. Change font properties to `inherit` in all browsers (opinionated).
+ * 2. Remove the margin in Firefox and Safari.
+ * 3. Address `font-family` inconsistency between `textarea` and other form in IE 7
+ * 4. Improve appearance and consistency with IE 6/7.
*/
button,
@@ -398,17 +406,16 @@ input,
optgroup,
select,
textarea {
- color: inherit; /* 1 */
- font: inherit; /* 2 */
- margin: 0; /* 3 */
+ font: inherit; /* 1 */
+ margin: 0; /* 2 */
@if support-for(ie, 7) {
- *font-family: $base-font-family; /* 4 */
- *vertical-align: middle; /* 5 */
+ *font-family: $base-font-family; /* 3 */
+ *vertical-align: middle; /* 4 */
}
}
/**
- * Address `overflow` set to `hidden` in IE 8/9/10/11.
+ * Show the overflow in IE.
*/
button {
@@ -416,115 +423,100 @@ button {
}
/**
- * Address inconsistent `text-transform` inheritance for `button` and `select`.
- * All other form control elements do not inherit `text-transform` values.
- * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.
- * Correct `select` style inheritance in Firefox.
+ * Remove the inheritance of text transform in Edge, Firefox, and IE.
+ * 1. Remove the inheritance of text transform in Firefox.
*/
button,
-select {
+select { /* 1 */
text-transform: none;
}
/**
- * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
- * and `video` controls.
- * 2. Correct inability to style clickable `input` types in iOS.
- * 3. Improve usability and consistency of cursor style between image-type
- * `input` and others.
- * 4. Remove inner spacing in IE 7 without affecting normal text inputs.
- * Known issue: inner spacing remains in IE 6.
+ * 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
+ * controls in Android 4.
+ * 2. Correct the inability to style clickable types in iOS and Safari.
*/
button,
-html input[type="button"], /* 1 */
-input[type="reset"],
-input[type="submit"] {
+html [type="button"], /* 1 */
+[type="reset"],
+[type="submit"] {
-webkit-appearance: button; /* 2 */
- cursor: pointer; /* 3 */
- @if support-for(ie, 7) {
- *overflow: visible; /* 4 */
- }
}
/**
- * Re-set default cursor for disabled elements.
+ * Remove the inner border and padding in Firefox.
*/
-button[disabled],
-html input[disabled] {
- cursor: default;
+button::-moz-focus-inner,
+[type="button"]::-moz-focus-inner,
+[type="reset"]::-moz-focus-inner,
+[type="submit"]::-moz-focus-inner {
+ border-style: none;
+ padding: 0;
}
/**
- * Remove inner padding and border in Firefox 4+.
+ * Restore the focus styles unset by the previous rule.
*/
-button::-moz-focus-inner,
-input::-moz-focus-inner {
- border: 0;
- padding: 0;
+button:-moz-focusring,
+[type="button"]:-moz-focusring,
+[type="reset"]:-moz-focusring,
+[type="submit"]:-moz-focusring {
+ outline: 1px dotted ButtonText;
}
/**
- * Address Firefox 4+ setting `line-height` on `input` using `!important` in
- * the UA stylesheet.
+ * Show the overflow in Edge.
*/
input {
- line-height: normal;
+ overflow: visible;
+ @if support-for(firefox, 29) {
+ // Firefox sets `line-height` using `!important` in the UA stylesheet.
+ line-height: normal;
+ }
}
-@if support-for(ie, 10) {
- /**
- * It's recommended that you don't attempt to style these elements.
- * Firefox's implementation doesn't respect box-sizing, padding, or width.
- *
- * 1. Address box sizing set to `content-box` in IE 8/9/10.
- * 2. Remove excess padding in IE 8/9/10.
- * 3. Remove excess padding in IE 7.
- * Known issue: excess padding remains in IE 6.
- */
+/**
+ * 1. Add the correct box sizing in IE <11.
+ * 2. Remove the padding in IE <11.
+ * 3. Remove excess padding in IE 7.
+ * Known issue: excess padding remains in IE 6.
+ */
- input[type="checkbox"],
- input[type="radio"] {
- box-sizing: border-box; /* 1 */
- padding: 0; /* 2 */
- @if support-for(ie, 7) {
- *height: 13px; /* 3 */
- *width: 13px; /* 3 */
- }
+[type="checkbox"],
+[type="radio"] {
+ box-sizing: border-box; /* 1 */
+ padding: 0; /* 2 */
+ @if support-for(ie, 7) {
+ *height: 13px; /* 3 */
+ *width: 13px; /* 3 */
}
}
/**
- * Fix the cursor style for Chrome's increment/decrement buttons. For certain
- * `font-size` values of the `input`, it causes the cursor style of the
- * decrement button to change from `default` to `text`.
+ * Correct the cursor style of increment and decrement buttons in Chrome.
*/
-input[type="number"]::-webkit-inner-spin-button,
-input[type="number"]::-webkit-outer-spin-button {
+[type="number"]::-webkit-inner-spin-button,
+[type="number"]::-webkit-outer-spin-button {
height: auto;
}
/**
- * 1. Address `appearance` set to `searchfield` in Safari and Chrome.
- * 2. Address `box-sizing` set to `border-box` in Safari and Chrome.
+ * 1. Correct the odd appearance in Chrome and Safari.
+ * 2. Correct the outline style in Safari.
*/
-input[type="search"] {
+[type="search"] {
-webkit-appearance: textfield; /* 1 */
- @if support-for(safari, 5) or support-for(chrome, 9) {
- -webkit-box-sizing: content-box;
- }
- box-sizing: content-box; /* 2 */
+ outline-offset: -2px; /* 2 */
/**
- * Remove inner padding and search cancel button in Safari and Chrome on OS X.
- * Safari (but not Chrome) clips the cancel button when the search input has
- * padding (and `textfield` appearance).
+ * Remove the inner padding and cancel buttons in Chrome and Safari on OS X.
*/
&::-webkit-search-cancel-button,
@@ -534,7 +526,26 @@ input[type="search"] {
}
/**
- * Define consistent border, margin, and padding.
+ * Correct the text style of placeholders in Chrome, Edge, and Safari.
+ */
+
+::-webkit-input-placeholder {
+ color: inherit;
+ opacity: 0.54;
+}
+
+/**
+ * 1. Correct the inability to style clickable types in iOS and Safari.
+ * 2. Change font properties to `inherit` in Safari.
+ */
+
+::-webkit-file-upload-button {
+ -webkit-appearance: button; /* 1 */
+ font: inherit; /* 2 */
+}
+
+/**
+ * Change the border, margin, and padding in all browsers (opinionated).
*/
fieldset {
@@ -545,51 +556,37 @@ fieldset {
}
/**
- * 1. Correct `color` not being inherited in IE 8/9/10/11.
- * 2. Remove padding so people aren't caught out if they zero out fieldsets.
- * 3. Correct alignment displayed oddly in IE 6/7.
+ * 1. Correct the text wrapping in Edge and IE.
+ * 2. Correct the color inheritance from `fieldset` elements in IE.
+ * 3. Remove the padding so developers are not caught out when they zero out
+ * `fieldset` elements in all browsers.
+ * 4. Correct alignment displayed oddly in IE 6/7.
*/
legend {
- @if support-for(ie, 11) {
- border: 0; /* 1 */
- }
- padding: 0; /* 2 */
+ box-sizing: border-box; /* 1 */
+ display: table; /* 1 */
+ max-width: 100%; /* 1 */
+ white-space: normal; /* 1 */
+ color: inherit; /* 2 */
+ padding: 0; /* 3 */
@if support-for(ie, 7) {
- *margin-left: -7px; /* 3 */
+ *margin-left: -7px; /* 4 */
}
}
/**
- * Remove default vertical scrollbar in IE 8/9/10/11.
- */
-
-textarea {
- overflow: auto;
-}
-
-/**
- * Don't inherit the `font-weight` (applied by a rule above).
- * NOTE: the default cannot safely be changed in Chrome and Safari on OS X.
+ * Restore the font weight unset by a previous rule.
*/
optgroup {
font-weight: bold;
}
-/* Tables
- ========================================================================== */
-
/**
- * Remove most spacing between table cells.
+ * Remove the default vertical scrollbar in IE.
*/
-table {
- border-collapse: collapse;
- border-spacing: 0;
-}
-
-td,
-th {
- padding: 0;
+textarea {
+ overflow: auto;
}