From df1f5a7c6d58ddb35c83128e8604c0c3b19252af Mon Sep 17 00:00:00 2001 From: Jonathan Neal Date: Sat, 25 Aug 2018 17:40:37 -0400 Subject: [PATCH] 7.0.1 - Support the 4-space tab width in Firefox (opinionated). - Update documentation --- CHANGELOG.md | 19 ++++++++++++------- README.md | 51 ++++++++++++++++++++++++++++++++++++++++++++------- package.json | 2 +- sanitize.css | 15 ++++++++------- 4 files changed, 65 insertions(+), 22 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ea7aba1..ea65e92 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,15 +1,20 @@ # Changes to sanitize.css +### 7.0.1 (August 25, 2018) + +- Support the 4-space tab width in Firefox (opinionated) +- Update documentation + ### 7.0.0 (August 22, 2018) -- Use the default user interface font in all browsers (opinionated). -- Use the default monospace user interface font in all browsers (opinionated). -- Use a 4-space tab width in all browsers (opinionated). +- Use the default user interface font in all browsers (opinionated) +- Use the default monospace user interface font in all browsers (opinionated) +- Use a 4-space tab width in all browsers (opinionated) - Fix correction of cursor style of increment and decrement buttons - in Safari, not Chrome. -- Correct the text style of placeholders in Chrome, Edge, and Safari. -- Remove unnecessary form control margin normalizations in Firefox. -- Remove opinionated fieldset padding in all browsers. + in Safari, not Chrome +- Correct the text style of placeholders in Chrome, Edge, and Safari +- Remove unnecessary form control margin normalizations in Firefox +- Remove opinionated fieldset padding in all browsers - Remove `::-moz-focus-inner` and `:-moz-focusring` normalizations fixed in Firefox 53 https://bugzilla.mozilla.org/show_bug.cgi?id=140562 diff --git a/README.md b/README.md index 5774272..1c4979f 100644 --- a/README.md +++ b/README.md @@ -91,6 +91,34 @@ html { } ``` +##### The default font is the system ui font + +```css +html { + font-family: + system-ui, + /* macOS 10.11-10.12 */ -apple-system, + /* Windows 6+ */ Segoe UI, + /* Android 4+ */ Roboto, + /* Ubuntu 10.10+ */ Ubuntu, + /* Gnome 3+ */ Cantarell, + /* KDE Plasma 4+ */ Oxygen, + /* fallback */ sans-serif, + /* macOS emoji */ "Apple Color Emoji", + /* Windows emoji */ "Segoe UI Emoji", + /* Windows emoji */ "Segoe UI Symbol", + /* Linux emoji */ "Noto Color Emoji"; +} +``` + +##### Tabs appear the same on the web as in a typical editor + +```css +html { + tab-size: 4; +} +``` + ##### Words break to prevent prevent overflow ```css @@ -115,6 +143,21 @@ nav ol, nav ul { } ``` +##### Pre-formatted and code-formatted text uses the monospace system ui font + +```css +code, kbd, pre, samp { + font-family: + /* macOS 10.10+ */ Menlo, + /* Windows 6+ */ Consolas, + /* Android 4+ */ Roboto Mono, + /* Ubuntu 10.10+ */ Ubuntu Monospace, + /* KDE Plasma 4+ */ Oxygen Mono, + /* Linux/OpenOffice fallback */ Liberation Mono, + /* fallback */ monospace; +} +``` + ##### Text selections do not include text shadows ```css @@ -187,7 +230,7 @@ a, area, button, input, label, select, summary, textarea, [tabindex] { cursor: pointer; } -[aria-disabled] { +[aria-disabled], [disabled] { cursor: default; } ``` @@ -226,11 +269,6 @@ maintained in sync. Please read the [contribution guidelines](CONTRIBUTING.md) in order to make the contribution process easy and effective for everyone involved. -## Similar Projects - -- [normalize.css] - A cross-browser css foundation. -- [opinionate.css] - A supplement to normalize.css with opinionated rules - ## Acknowledgements sanitize.css is a project by [Jonathan Neal](https://github.com/jonathantneal), @@ -239,6 +277,5 @@ built upon normalize.css, a project by co-created with [Nicolas Gallagher](https://github.com/necolas). [normalize.css]: https://github.com/csstools/normalize.css -[opinionate.css]: https://github.com/adamgruber/opinionate.css [reset.css]: http://meyerweb.com/eric/tools/css/reset/ [sanitize.css]: https://github.com/csstools/sanitize.css diff --git a/package.json b/package.json index f35bed0..d24ca47 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sanitize.css", - "version": "7.0.0", + "version": "7.0.1", "description": "A best-practices CSS foundation", "author": "Jonathan Neal ", "contributors": [ diff --git a/sanitize.css b/sanitize.css index 2fae353..284ff8f 100644 --- a/sanitize.css +++ b/sanitize.css @@ -1,4 +1,4 @@ -/*! sanitize.css v7.0.0 | CC0 License | github.com/csstools/sanitize.css */ +/*! sanitize.css v7.0.1 | CC0 License | github.com/csstools/sanitize.css */ /* Document * ========================================================================== */ @@ -27,9 +27,9 @@ } /** - * 1. Use the default user interface font in all browsers (opinionated). - * 2. Correct the line height in all browsers. - * 3. Use the default cursor in all browsers (opinionated). + * 1. Use the default cursor in all browsers (opinionated). + * 2. Use the default user interface font in all browsers (opinionated). + * 3. Correct the line height in all browsers. * 4. Use a 4-space tab width in all browsers (opinionated). * 5. Prevent adjustments of font size after orientation changes in * IE on Windows Phone and in iOS. @@ -37,6 +37,7 @@ */ html { + cursor: default; /* 1 */ font-family: system-ui, /* macOS 10.11-10.12 */ -apple-system, @@ -49,10 +50,10 @@ html { /* macOS emoji */ "Apple Color Emoji", /* Windows emoji */ "Segoe UI Emoji", /* Windows emoji */ "Segoe UI Symbol", - /* Linux emoji */ "Noto Color Emoji"; /* 1 */ + /* Linux emoji */ "Noto Color Emoji"; /* 2 */ - line-height: 1.15; /* 2 */ - cursor: default; /* 3 */ + line-height: 1.15; /* 3 */ + -moz-tab-size: 4; /* 4 */ tab-size: 4; /* 4 */ -ms-text-size-adjust: 100%; /* 5 */ -webkit-text-size-adjust: 100%; /* 5 */