Skip to content

Commit 75a91f5

Browse files
committed
5.0.0
See CHANGELOG.md
1 parent 876dec6 commit 75a91f5

4 files changed

Lines changed: 40 additions & 38 deletions

File tree

CHANGELOG.md

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
1-
## 4.1.0 (2016-07-01)
1+
# Changes to sanitize.css
22

3-
- Updated: The focus removal on `:hover` now targets `a:hover`.
3+
### 5.0.0 (March 1, 2017)
44

5-
## 4.0.0 (2016-06-20)
5+
- Added: normalize.css v6 parity, including `summary` display
6+
- Added: form elements to inherit line-height from html
7+
- Removed: font styles on `html`
8+
- Removed: unnecessary `border-spacing` zeroing
9+
10+
### 4.1.0 (July 1, 2016)
11+
12+
- Updated: The focus removal on `:hover` now targets `a:hover`
13+
14+
### 4.0.0 (June 20, 2016)
615

716
- Added: All improvements from normalize.css v4.1.1
817
- Added: Documentation for each opinionated feature
@@ -14,14 +23,14 @@
1423
- Updated: `abbr[title]` styled using `border-bottom` over `text-decoration`
1524
- Updated: Tests and linting
1625

17-
### Why are variables removed in v4?
26+
#### Why are variables removed in v4?
1827

1928
Variables were there for developers to override styles in sanitize.css without
2029
editing the original file or overriding the rule. However, you *should* override
2130
the rule so that your change is explicit, and so that your source maps
2231
accurately indicate your changes coming from your files.
2332

24-
## 3.3.0 (2016-03-03)
33+
### 3.3.0 (March 3, 2016)
2534

2635
- Added: `b` and `strong` normalization
2736
- Added: `::-moz-focus-inner` normalization
@@ -31,17 +40,17 @@ accurately indicate your changes coming from your files.
3140
opinionated defaults, and configurable defaults
3241
- Updated: Moved source and compiled libraries
3342

34-
## 3.2.0 (2016-02-03)
43+
### 3.2.0 (February 3, 2016)
3544

3645
- Added: `selection.less`
3746
- Updated: Use `root`-prefixed values across all formats
3847
- Updated: Documentation
3948

40-
## 3.1.1 (2016-02-01)
49+
## 3.1.1 (February 1, 2016)
4150

4251
- Updated: `box-sizing` variable corrected to `border-box` in sass, scss, styl
4352

44-
## 3.1.0 (2016-02-01)
53+
### 3.1.0 (February 1, 2016)
4554

4655
- Added: Project configuration (.editorconfig)
4756
- Added: Style linting rules and tests
@@ -50,7 +59,7 @@ accurately indicate your changes coming from your files.
5059
- Updated: `::selection` color variable corrected to `--selection-color`
5160
- Updated: Use direct nesting
5261

53-
## 3.0.0 (2015-10-23)
62+
### 3.0.0 (October 23, 2015)
5463

5564
- Added: Normalization for **iOS 8+**
5665
- Added: `background-repeat` for all elements
@@ -60,18 +69,18 @@ accurately indicate your changes coming from your files.
6069
- Updated: dist from CSS source using PostCSS, cssnext, and cssnano
6170
- Updated: Documentation
6271

63-
## 2.1.1 (2015-10-05)
72+
### 2.1.1 (October 5, 2015)
6473

6574
- Updated: bower.json
6675

67-
## 2.1.1 (2015-10-05)
76+
### 2.1.1 (October 5, 2015)
6877

6978
- Added: CSS version
7079
- Updated: Use percentage `font-size` on `:root`
7180
- Updated: Documentation
7281
- Removed: `background-color` inheritance
7382

74-
## 2.0.0 (2015-09-03)
83+
### 2.0.0 (September 3, 2015)
7584

7685
- Added: Visually hidden element style `[hidden][aria-hidden="false"]`
7786
- Added: Currently updating element style `[aria-busy="true"]`
@@ -88,7 +97,7 @@ accurately indicate your changes coming from your files.
8897
- Updated: Development dependencies
8998
- Updated: README.md and code documentation
9099

91-
## 1.2.0 (2015-06-16)
100+
### 1.2.0 (June 16, 2015)
92101

93102
- Added: Control over options via Sass variables
94103
- Added: Overflow normalization on :root
@@ -97,13 +106,13 @@ accurately indicate your changes coming from your files.
97106
- Removed: Redundant inheritance in ::before and ::after
98107
- Removed: redundant cursor inheritance in anchor and form elements
99108

100-
## 1.1.0 (2015-03-20)
109+
### 1.1.0 (March 20, 2015)
101110

102111
- Added: Form support
103112
- Updated: Normalization
104113
- Updated: Border assignment
105114

106-
## 1.0.0 (2012-11-06)
115+
### 1.0.0 (11 6, 2012)
107116

108117
- Updated: Moved from normalize.css to sanitize.css
109118

@@ -116,6 +125,6 @@ Where Normalize.css conservatively follows user agent consensus and results
116125
in more pre-styled elements, Sanitize.css liberally follows developer
117126
consensus and results in more unstyled elements.
118127

119-
## 0.0.0 (2011-04-21)
128+
### 0.0.0 (4 21, 2011)
120129

121130
- Added: Normalize.css

README.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -159,15 +159,11 @@ a, area, button, input, label, select, summary, textarea, [tabindex] {
159159
##### Visually hidden content should remain accessible
160160

161161
```css
162-
[aria-hidden="false"][hidden] {
162+
[aria-hidden="false"][hidden]:not(:focus) {
163163
clip: rect(0, 0, 0, 0);
164164
display: inherit;
165165
position: absolute;
166166
}
167-
168-
[aria-hidden="false"][hidden]:focus {
169-
clip: auto;
170-
}
171167
```
172168

173169
## Differences

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": "4.1.0",
3+
"version": "5.0.0",
44
"description": "The best-practices CSS foundation",
55
"author": "Jonathan Neal <[email protected]>",
66
"license": "CC0-1.0",
@@ -16,7 +16,7 @@
1616
"test": "stylelint sanitize.css"
1717
},
1818
"devDependencies": {
19-
"stylelint": "^7.7.0",
19+
"stylelint": "^7.9.0",
2020
"stylelint-config-dev": "^1.0.0"
2121
},
2222
"stylelint": {

sanitize.css

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
/*! sanitize.css v4.1.0 | CC0 License | github.com/jonathantneal/sanitize.css */
1+
/*! sanitize.css v5.0.0 | CC0 License | github.com/jonathantneal/sanitize.css */
22

3-
/* Elements of HTML (https://html.spec.whatwg.org/multipage/semantics.html#semantics)
3+
/* Document (https://html.spec.whatwg.org/multipage/semantics.html#semantics)
44
========================================================================== */
55

66
/**
@@ -29,17 +29,14 @@
2929
/**
3030
* 1. Add border box sizing in all browsers (opinionated).
3131
* 2. Add the default cursor in all browsers (opinionated).
32-
* 3. Add a flattened line height in all browsers (opinionated).
33-
* 4. Prevent font size adjustments after orientation changes in IE and iOS.
32+
* 3. Prevent font size adjustments after orientation changes in IE and iOS.
3433
*/
3534

3635
html {
3736
box-sizing: border-box; /* 1 */
3837
cursor: default; /* 2 */
39-
font-family: sans-serif; /* 3 */
40-
line-height: 1.5; /* 3 */
41-
-ms-text-size-adjust: 100%; /* 4 */
42-
-webkit-text-size-adjust: 100%; /* 4 */
38+
-ms-text-size-adjust: 100%; /* 3 */
39+
-webkit-text-size-adjust: 100%; /* 3 */
4340
}
4441

4542
/* Sections (https://html.spec.whatwg.org/multipage/semantics.html#sections)
@@ -306,6 +303,10 @@ svg:not(:root) {
306303
/* Tabular data (https://html.spec.whatwg.org/multipage/tables.html#tables)
307304
========================================================================== */
308305

306+
/**
307+
* Collapse border spacing
308+
*/
309+
309310
table {
310311
border-collapse: collapse;
311312
}
@@ -326,7 +327,7 @@ textarea {
326327
}
327328

328329
/**
329-
* Remove the default styling in all browsers (opinionated).
330+
* Inherit styling in all browsers (opinionated).
330331
*/
331332

332333
button,
@@ -549,7 +550,7 @@ textarea,
549550
display: none;
550551
}
551552

552-
/* ARIA in HTML (https://w3c.github.io/html-aria/)
553+
/* ARIA (https://w3c.github.io/html-aria/)
553554
========================================================================== */
554555

555556
/**
@@ -572,16 +573,12 @@ textarea,
572573
* Change the display on visually hidden accessible elements (opinionated).
573574
*/
574575

575-
[aria-hidden="false"][hidden] {
576+
[aria-hidden="false"][hidden]:not(:focus) {
576577
clip: rect(0, 0, 0, 0);
577578
display: inherit;
578579
position: absolute;
579580
}
580581

581-
[aria-hidden="false"][hidden]:focus {
582-
clip: auto;
583-
}
584-
585582
/*
586583
* Change the cursor on disabled, not-editable, or otherwise
587584
* inoperable elements (opinionated).

0 commit comments

Comments
 (0)