Skip to content

Commit

Permalink
7.0.1
Browse files Browse the repository at this point in the history
- Support the 4-space tab width in Firefox (opinionated).
- Update documentation
  • Loading branch information
jonathantneal committed Aug 25, 2018
1 parent 7eaa6ef commit df1f5a7
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 22 deletions.
19 changes: 12 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
51 changes: 44 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -187,7 +230,7 @@ a, area, button, input, label, select, summary, textarea, [tabindex] {
cursor: pointer;
}

[aria-disabled] {
[aria-disabled], [disabled] {
cursor: default;
}
```
Expand Down Expand Up @@ -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),
Expand All @@ -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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sanitize.css",
"version": "7.0.0",
"version": "7.0.1",
"description": "A best-practices CSS foundation",
"author": "Jonathan Neal <[email protected]>",
"contributors": [
Expand Down
15 changes: 8 additions & 7 deletions sanitize.css
Original file line number Diff line number Diff line change
@@ -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
* ========================================================================== */
Expand Down Expand Up @@ -27,16 +27,17 @@
}

/**
* 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.
* 6. Breaks words to prevent overflow in all browsers (opinionated).
*/

html {
cursor: default; /* 1 */
font-family:
system-ui,
/* macOS 10.11-10.12 */ -apple-system,
Expand All @@ -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 */
Expand Down

0 comments on commit df1f5a7

Please sign in to comment.