Skip to content

Commit 54a7da3

Browse files
committed
Move sizing restrictions in all browsers to assets.css
1 parent 58990c7 commit 54a7da3

3 files changed

Lines changed: 47 additions & 13 deletions

File tree

README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,16 @@ A separate stylesheet that normalizes form controls without side effects.
2525

2626
[Learn more about `forms.css`](#forms).
2727

28+
#### Assets CSS
29+
30+
A separate stylesheet that applies a comfortable measure to plain documents.
31+
32+
```html
33+
<link href="https://unpkg.com/sanitize.css/assets.css" rel="stylesheet" />
34+
```
35+
36+
[Learn more about `assets.css`](#assets).
37+
2838
#### Typography CSS
2939

3040
A separate stylesheet that normalizes typography using system interface fonts.
@@ -314,6 +324,31 @@ select:not([multiple]):not([size]) {
314324
}
315325
```
316326

327+
## Assets
328+
329+
[sanitize.css] includes a separate stylesheet for normalizing restricting the
330+
size of assets in all browsers.
331+
332+
```html
333+
<link href="https://unpkg.com/sanitize.css" rel="stylesheet" />
334+
<link href="https://unpkg.com/sanitize.css/assets.css" rel="stylesheet" />
335+
```
336+
337+
### Assets Features
338+
339+
##### Assets use a comfortable measure in all browsers
340+
341+
```css
342+
iframe,
343+
img,
344+
input,
345+
select,
346+
textarea {
347+
height: auto;
348+
max-width: 100%;
349+
}
350+
```
351+
317352
## Typography
318353

319354
[sanitize.css] includes a separate stylesheet for normalizing typography using

assets.css

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/**
2+
* Restrict sizing to the page width in all browsers (opinionated).
3+
*/
4+
5+
iframe,
6+
img,
7+
input,
8+
select,
9+
textarea {
10+
height: auto;
11+
max-width: 100%;
12+
}

page.css

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,3 @@ html {
1111
padding: 1em calc(50% - 16em);
1212
}
1313
}
14-
15-
/**
16-
* Restrict sizing to the page width in all browsers (opinionated).
17-
*/
18-
19-
iframe,
20-
img,
21-
input,
22-
select,
23-
textarea {
24-
height: auto;
25-
max-width: 100%;
26-
}

0 commit comments

Comments
 (0)