Skip to content

Commit b5dbabc

Browse files
committed
7.0.0
1 parent d6035ac commit b5dbabc

3 files changed

Lines changed: 87 additions & 55 deletions

File tree

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
# Changes to sanitize.css
22

3+
### 7.0.0 (August 22, 2018)
4+
5+
- Use the default user interface font in all browsers (opinionated).
6+
- Use the default monospace user interface font in all browsers (opinionated).
7+
- Use a 4-space tab width in all browsers (opinionated).
8+
- Fix correction of cursor style of increment and decrement buttons
9+
in Safari, not Chrome.
10+
- Correct the text style of placeholders in Chrome, Edge, and Safari.
11+
- Remove unnecessary form control margin normalizations in Firefox.
12+
- Remove opinionated fieldset padding in all browsers.
13+
- Remove `::-moz-focus-inner` and `:-moz-focusring` normalizations
14+
fixed in Firefox 53
15+
https://bugzilla.mozilla.org/show_bug.cgi?id=140562
16+
317
### 6.0.0 (June 24, 2018)
418

519
- Added: `word-break: break-word` to `html`

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sanitize.css",
3-
"version": "6.0.0",
3+
"version": "7.0.0",
44
"description": "A best-practices CSS foundation",
55
"author": "Jonathan Neal <[email protected]>",
66
"contributors": [
@@ -21,7 +21,7 @@
2121
"test": "stylelint sanitize.css"
2222
},
2323
"devDependencies": {
24-
"stylelint": "^9.3.0",
24+
"stylelint": "^9.5.0",
2525
"stylelint-config-standard": "^18.2.0"
2626
},
2727
"stylelint": {

sanitize.css

Lines changed: 71 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,36 @@
2727
}
2828

2929
/**
30-
* 1. Correct the line height in all browsers.
31-
* 2. Add the default cursor in all browsers (opinionated).
32-
* 3. Prevent adjustments of font size after orientation changes in
30+
* 1. Use the default user interface font in all browsers (opinionated).
31+
* 2. Correct the line height in all browsers.
32+
* 3. Use the default cursor in all browsers (opinionated).
33+
* 4. Use a 4-space tab width in all browsers (opinionated).
34+
* 5. Prevent adjustments of font size after orientation changes in
3335
* IE on Windows Phone and in iOS.
34-
* 4. Breaks words to prevent overflow in all browsers (opinionated).
36+
* 6. Breaks words to prevent overflow in all browsers (opinionated).
3537
*/
3638

3739
html {
38-
line-height: 1.15; /* 1 */
39-
cursor: default; /* 2 */
40-
-ms-text-size-adjust: 100%; /* 3 */
41-
-webkit-text-size-adjust: 100%; /* 3 */
42-
word-break: break-word; /* 4 */
40+
font-family:
41+
system-ui,
42+
/* macOS 10.11-10.12 */ -apple-system,
43+
/* Windows 6+ */ Segoe UI,
44+
/* Android 4+ */ Roboto,
45+
/* Ubuntu 10.10+ */ Ubuntu,
46+
/* Gnome 3+ */ Cantarell,
47+
/* KDE Plasma 4+ */ Oxygen,
48+
/* fallback */ sans-serif,
49+
/* macOS emoji */ "Apple Color Emoji",
50+
/* Windows emoji */ "Segoe UI Emoji",
51+
/* Windows emoji */ "Segoe UI Symbol",
52+
/* Linux emoji */ "Noto Color Emoji"; /* 1 */
53+
54+
line-height: 1.15; /* 2 */
55+
cursor: default; /* 3 */
56+
tab-size: 4; /* 4 */
57+
-ms-text-size-adjust: 100%; /* 5 */
58+
-webkit-text-size-adjust: 100%; /* 5 */
59+
word-break: break-word; /* 6 */
4360
}
4461

4562
/* Sections
@@ -67,12 +84,11 @@ h1 {
6784
* ========================================================================== */
6885

6986
/**
70-
* 1. Add the correct box sizing in Firefox.
87+
* 1. Add the correct sizing in Firefox.
7188
* 2. Show the overflow in Edge and IE.
7289
*/
7390

7491
hr {
75-
box-sizing: content-box; /* 1 */
7692
height: 0; /* 1 */
7793
overflow: visible; /* 2 */
7894
}
@@ -95,12 +111,21 @@ nav ul {
95111
}
96112

97113
/**
98-
* 1. Correct the inheritance and scaling of font size in all browsers.
114+
* 1. Use the default monospace user interface font
115+
* in all browsers (opinionated).
99116
* 2. Correct the odd `em` font sizing in all browsers.
100117
*/
101118

102119
pre {
103-
font-family: monospace, monospace; /* 1 */
120+
font-family:
121+
/* macOS 10.10+ */ Menlo,
122+
/* Windows 6+ */ Consolas,
123+
/* Android 4+ */ Roboto Mono,
124+
/* Ubuntu 10.10+ */ Ubuntu Monospace,
125+
/* KDE Plasma 4+ */ Oxygen Mono,
126+
/* Linux/OpenOffice fallback */ Liberation Mono,
127+
/* fallback */ monospace; /* 1 */
128+
104129
font-size: 1em; /* 2 */
105130
}
106131

@@ -134,14 +159,23 @@ strong {
134159
}
135160

136161
/**
137-
* 1. Correct the inheritance and scaling of font size in all browsers.
162+
* 1. Use the default monospace user interface font
163+
* in all browsers (opinionated).
138164
* 2. Correct the odd `em` font sizing in all browsers.
139165
*/
140166

141167
code,
142168
kbd,
143169
samp {
144-
font-family: monospace, monospace; /* 1 */
170+
font-family:
171+
/* macOS 10.10+ */ Menlo,
172+
/* Windows 6+ */ Consolas,
173+
/* Android 4+ */ Roboto Mono,
174+
/* Ubuntu 10.10+ */ Ubuntu Monospace,
175+
/* KDE Plasma 4+ */ Oxygen Mono,
176+
/* Linux/OpenOffice fallback */ Liberation Mono,
177+
/* fallback */ monospace; /* 1 */
178+
145179
font-size: 1em; /* 2 */
146180
}
147181

@@ -244,14 +278,12 @@ table {
244278
* ========================================================================== */
245279

246280
/**
247-
* Remove the margin in Firefox and Safari.
281+
* Remove the margin in Safari.
248282
*/
249283

250284
button,
251285
input,
252-
optgroup,
253-
select,
254-
textarea {
286+
select {
255287
margin: 0;
256288
}
257289

@@ -289,26 +321,6 @@ button,
289321
-webkit-appearance: button;
290322
}
291323

292-
/**
293-
* Restore the focus styles unset by the previous rule in Firefox.
294-
*/
295-
296-
button:-moz-focusring,
297-
[type="button"]:-moz-focusring,
298-
[type="reset"]:-moz-focusring,
299-
[type="submit"]:-moz-focusring {
300-
outline: 1px dotted ButtonText;
301-
}
302-
303-
/**
304-
* Remove the inner border and padding in Firefox.
305-
*/
306-
307-
::-moz-focus-inner {
308-
border-style: none;
309-
padding: 0;
310-
}
311-
312324
/**
313325
* Correct the padding in Firefox.
314326
*/
@@ -328,16 +340,12 @@ input {
328340
/**
329341
* 1. Correct the text wrapping in Edge and IE.
330342
* 2. Correct the color inheritance from `fieldset` elements in IE.
331-
* 3. Remove the padding so developers are not caught out when they zero out
332-
* `fieldset` elements in all browsers.
333343
*/
334344

335345
legend {
336-
box-sizing: border-box; /* 1 */
337346
color: inherit; /* 2 */
338347
display: table; /* 1 */
339348
max-width: 100%; /* 1 */
340-
padding: 0; /* 3 */
341349
white-space: normal; /* 1 */
342350
}
343351

@@ -360,28 +368,28 @@ select {
360368
}
361369

362370
/**
363-
* 1. Remove the default vertical scrollbar in IE.
364-
* 2. Change the resize direction on textareas in all browsers (opinionated).
371+
* 1. Remove the margin in Firefox and Safari.
372+
* 2. Remove the default vertical scrollbar in IE.
373+
* 3. Change the resize direction on textareas in all browsers (opinionated).
365374
*/
366375

367376
textarea {
368-
overflow: auto; /* 1 */
369-
resize: vertical; /* 2 */
377+
margin: 0; /* 1 */
378+
overflow: auto; /* 2 */
379+
resize: vertical; /* 3 */
370380
}
371381

372382
/**
373-
* 1. Add the correct box sizing in IE 10-.
374-
* 2. Remove the padding in IE 10-.
383+
* Remove the padding in IE 10-.
375384
*/
376385

377386
[type="checkbox"],
378387
[type="radio"] {
379-
box-sizing: border-box; /* 1 */
380-
padding: 0; /* 2 */
388+
padding: 0;
381389
}
382390

383391
/**
384-
* Correct the cursor style of increment and decrement buttons in Chrome.
392+
* Correct the cursor style of increment and decrement buttons in Safari.
385393
*/
386394

387395
::-webkit-inner-spin-button,
@@ -399,6 +407,15 @@ textarea {
399407
outline-offset: -2px; /* 2 */
400408
}
401409

410+
/**
411+
* Correct the text style of placeholders in Chrome, Edge, and Safari.
412+
*/
413+
414+
::-webkit-input-placeholder {
415+
color: inherit;
416+
opacity: 0.54;
417+
}
418+
402419
/**
403420
* Remove the inner padding in Chrome and Safari on macOS.
404421
*/
@@ -485,7 +502,8 @@ template {
485502
* ========================================================================== */
486503

487504
/*
488-
* 1. Remove the tapping delay on clickable elements in all browsers (opinionated).
505+
* 1. Remove the tapping delay on clickable elements
506+
in all browsers (opinionated).
489507
* 2. Remove the tapping delay in IE 10.
490508
*/
491509

0 commit comments

Comments
 (0)