diff options
author | Jonathan Neal <jonathantneal@hotmail.com> | 2020-12-03 22:29:09 -0500 |
---|---|---|
committer | Jonathan Neal <jonathantneal@hotmail.com> | 2020-12-03 23:29:48 -0500 |
commit | 4867dabf66ec31c4b7b5be2a92ddee46075a7f40 (patch) | |
tree | 4fdc962b1e850a8f229a2d6a4e7ace7ef4632c8d | |
parent | 41fbcb343a04d3e6e2ab8487462b5a21917a4375 (diff) | |
download | normalize.css-4867dabf66ec31c4b7b5be2a92ddee46075a7f40.tar.gz normalize.css-4867dabf66ec31c4b7b5be2a92ddee46075a7f40.zip |
Use :where() in evergreen.css, remove text-size-adjust
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | CHANGELOG.md | 6 | ||||
-rw-r--r-- | evergreen.css | 85 | ||||
-rw-r--r-- | normalize.css | 12 | ||||
-rw-r--r-- | opinionated.css | 12 | ||||
-rw-r--r-- | opinionated.evergreen.css | 10 | ||||
-rw-r--r-- | package.json | 2 |
7 files changed, 40 insertions, 88 deletions
@@ -1,5 +1,6 @@ node_modules npm-debug.log +yarn.lock .* !.editorconfig !.gitignore diff --git a/CHANGELOG.md b/CHANGELOG.md index ef495cd..fbc5977 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changes to @csstools/normalize.css +### HEAD + +- Changed: Evergreen variations of normalize.css contribute no specificity. +- Removed: `fieldset` padding in Firefox is no longer needed. +- Removed: `text-size-adjust` is no longer needed. + ### 11.0.1 (August 20, 2020) - Fixed: Used case-insensitive attribute selectors in the evergreen variations. diff --git a/evergreen.css b/evergreen.css index ac567a8..faeb1f5 100644 --- a/evergreen.css +++ b/evergreen.css @@ -3,12 +3,10 @@ /** * 1. Correct the line height in all browsers. - * 2. Prevent adjustments of font size after orientation changes in iOS. */ -html { +:where(html) { line-height: 1.15; /* 1 */ - -webkit-text-size-adjust: 100%; /* 2 */ } /* Sections @@ -19,9 +17,10 @@ html { * `article` contexts in Chrome, Edge, Firefox, and Safari. */ -h1 { +:where(h1) { font-size: 2em; - margin: 0.67em 0; + margin-block-end: 0.67em; + margin-block-start: 0.67em; } /* Grouping content @@ -31,12 +30,9 @@ h1 { * Remove the margin on nested lists in Chrome, Edge, and Safari. */ -dl dl, -dl ol, -dl ul, -ol dl, -ul dl { - margin: 0; +:where(dl :is(dl, ol, ul), :is(ol, ul) dl) { + margin-block-end: 0; + margin-block-start: 0; } /** @@ -44,7 +40,7 @@ ul dl { * 2. Correct the inheritance of border color in Firefox. */ -hr { +:where(hr) { box-sizing: content-box; /* 1 */ color: inherit; /* 2 */ height: 0; /* 1 */ @@ -55,7 +51,7 @@ hr { * 2. Correct the odd `em` font sizing in all browsers. */ -pre { +:where(pre) { font-family: monospace, monospace; /* 1 */ font-size: 1em; /* 2 */ } @@ -67,7 +63,7 @@ pre { * Add the correct text decoration in Safari. */ -abbr[title] { +:where(abbr[title]) { text-decoration: underline; text-decoration: underline dotted; } @@ -76,8 +72,7 @@ abbr[title] { * Add the correct font weight in Chrome, Edge, and Safari. */ -b, -strong { +:where(b, strong) { font-weight: bolder; } @@ -86,9 +81,7 @@ strong { * 2. Correct the odd `em` font sizing in all browsers. */ -code, -kbd, -samp { +:where(code, kbd, samp) { font-family: monospace, monospace; /* 1 */ font-size: 1em; /* 2 */ } @@ -97,7 +90,7 @@ samp { * Add the correct font size in all browsers. */ -small { +:where(small) { font-size: 80%; } @@ -108,7 +101,7 @@ small { * Add the correct display in iOS 4-7. */ -audio:not([controls]) { +:where(audio:not([controls])) { display: none; height: 0; } @@ -121,7 +114,7 @@ audio:not([controls]) { * 2. Remove text indentation from table contents in Chrome, Edge, and Safari. */ -table { +:where(table) { border-color: inherit; /* 1 */ text-indent: 0; /* 2 */ } @@ -133,9 +126,7 @@ table { * Remove the margin on controls in Safari. */ -button, -input, -select { +:where(button, input, select) { margin: 0; } @@ -143,7 +134,7 @@ select { * Remove the inheritance of text transform in Firefox. */ -button { +:where(button) { text-transform: none; } @@ -151,26 +142,15 @@ button { * Correct the inability to style buttons in iOS and Safari. */ -button, -[type="button" i], -[type="reset" i], -[type="submit" i] { +:where(button, input:is([type="button" i], [type="reset" i], [type="submit" i])) { -webkit-appearance: button; } /** - * Correct the padding in Firefox. - */ - -fieldset { - padding: 0.35em 0.75em 0.625em; -} - -/** * Add the correct vertical alignment in Chrome, Edge, and Firefox. */ -progress { +:where(progress) { vertical-align: baseline; } @@ -178,7 +158,7 @@ progress { * Remove the inheritance of text transform in Firefox. */ -select { +:where(select) { text-transform: none; } @@ -186,7 +166,7 @@ select { * Remove the margin in Firefox and Safari. */ -textarea { +:where(textarea) { margin: 0; } @@ -195,7 +175,7 @@ textarea { * 2. Correct the outline style in Safari. */ -[type="search" i] { +:where(input[type="search" i]) { -webkit-appearance: textfield; /* 1 */ outline-offset: -2px; /* 2 */ } @@ -204,8 +184,7 @@ textarea { * Correct the cursor style of increment and decrement buttons in Safari. */ -::-webkit-inner-spin-button, -::-webkit-outer-spin-button { +:where(input::-webkit-inner-spin-button, input::-webkit-outer-spin-button) { height: auto; } @@ -213,7 +192,7 @@ textarea { * Correct the text style of placeholders in Chrome, Edge, and Safari. */ -::-webkit-input-placeholder { +:where(input::-webkit-input-placeholder) { color: inherit; opacity: 0.54; } @@ -222,7 +201,7 @@ textarea { * Remove the inner padding in Chrome, Edge, and Safari on macOS. */ -::-webkit-search-decoration { +:where(input[type="search" i]::-webkit-search-decoration) { -webkit-appearance: none; } @@ -231,7 +210,7 @@ textarea { * 2. Change font properties to `inherit` in Safari. */ -::-webkit-file-upload-button { +:where(input[type="file" i]::-webkit-file-upload-button) { -webkit-appearance: button; /* 1 */ font: inherit; /* 2 */ } @@ -240,7 +219,7 @@ textarea { * Remove the inner border and padding of focus outlines in Firefox. */ -::-moz-focus-inner { +:where(:is(button, input:is([type="button" i], [type="color" i], [type="reset" i], [type="submit" i]))::-moz-focus-inner) { border-style: none; padding: 0; } @@ -249,7 +228,7 @@ textarea { * Restore the focus outline styles unset by the previous rule in Firefox. */ -:-moz-focusring { +:where(:is(button, input:is([type="button" i], [type="color" i], [type="reset" i], [type="submit" i])):-moz-focusring) { outline: 1px dotted ButtonText; } @@ -257,7 +236,7 @@ textarea { * Remove the additional :invalid styles in Firefox. */ -:-moz-ui-invalid { +:where(:-moz-ui-invalid) { box-shadow: none; } @@ -268,7 +247,7 @@ textarea { * Add the correct styles in Safari. */ -dialog { +:where(dialog) { background-color: white; border: solid; color: black; @@ -285,7 +264,7 @@ dialog { width: fit-content; } -dialog:not([open]) { +:where(dialog:not([open])) { display: none; } @@ -293,6 +272,6 @@ dialog:not([open]) { * Add the correct display in all browsers. */ -summary { +:where(summary) { display: list-item; } diff --git a/normalize.css b/normalize.css index da84267..f29deaf 100644 --- a/normalize.css +++ b/normalize.css @@ -3,14 +3,10 @@ /** * 1. Correct the line height in all browsers. - * 2. Prevent adjustments of font size after orientation changes in - * IE on Windows Phone and in iOS. */ html { line-height: 1.15; /* 1 */ - -ms-text-size-adjust: 100%; /* 2 */ - -webkit-text-size-adjust: 100%; /* 2 */ } /* Sections @@ -217,14 +213,6 @@ button, } /** - * Correct the padding in Firefox. - */ - -fieldset { - padding: 0.35em 0.75em 0.625em; -} - -/** * Show the overflow in Edge 18- and IE. */ diff --git a/opinionated.css b/opinionated.css index 334168c..6b342c1 100644 --- a/opinionated.css +++ b/opinionated.css @@ -3,14 +3,10 @@ /** * 1. Correct the line height in all browsers. - * 2. Prevent adjustments of font size after orientation changes in - * IE on Windows Phone and in iOS. */ html { line-height: 1.15; /* 1 */ - -ms-text-size-adjust: 100%; /* 2 */ - -webkit-text-size-adjust: 100%; /* 2 */ } /* Sections @@ -225,14 +221,6 @@ button, } /** - * Correct the padding in Firefox. - */ - -fieldset { - padding: 0.35em 0.75em 0.625em; -} - -/** * Show the overflow in Edge 18- and IE. */ diff --git a/opinionated.evergreen.css b/opinionated.evergreen.css index 4d075a4..902c56e 100644 --- a/opinionated.evergreen.css +++ b/opinionated.evergreen.css @@ -3,12 +3,10 @@ /** * 1. Correct the line height in all browsers. - * 2. Prevent adjustments of font size after orientation changes in iOS. */ html { line-height: 1.15; /* 1 */ - -webkit-text-size-adjust: 100%; /* 2 */ } /* Sections @@ -167,14 +165,6 @@ button, } /** - * Correct the padding in Firefox. - */ - -fieldset { - padding: 0.35em 0.75em 0.625em; -} - -/** * Add the correct vertical alignment in Chrome, Edge, and Firefox. */ diff --git a/package.json b/package.json index cf12a21..45f19e6 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "test": "stylelint normalize.css evergreen.css opinionated.css opinionated.evergreen.css" }, "devDependencies": { - "stylelint": "^13.6.1", + "stylelint": "^13.8.0", "stylelint-config-standard": "^20.0.0" }, "stylelint": { |