chore: Update sanitize.css resets

This commit is contained in:
Lucas Larroche 2022-03-06 10:53:20 +07:00
parent 9b0dda8b94
commit 4c914d1807
32 changed files with 201 additions and 249 deletions

View file

@ -5,14 +5,16 @@
// Reboot based on :
// - normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css
// - sanitize.css v12.0.1 | CC0 1.0 Universal | github.com/csstools/sanitize.css
// - sanitize.css v13.0.0 | CC0 1.0 Universal | github.com/csstools/sanitize.css
//
// Change from `box-sizing: content-box` so that `width` is not affected by `padding` or `border`
// 1. Add border box sizing in all browsers (opinionated)
// 2. Backgrounds do not repeat by default (opinionated)
*,
*::before,
*::after {
box-sizing: border-box; // 1
background-repeat: no-repeat; // 2
}
// 1. Add text decoration inheritance in all browsers (opinionated)
@ -23,23 +25,24 @@
vertical-align: inherit; // 2
}
// 1. Correct the line height in all browsers
// 2. Prevent adjustments of font size after orientation changes in IE on Windows Phone and in iOS
// 3. Change the default tap highlight to be completely transparent in iOS
// 4. Use the default cursor in all browsers (opinionated)
// 5. Use a 4-space tab width in all browsers (opinionated)
// 6. Prevent adjustments of font size after orientation changes in IE on Windows Phone and in iOS
html {
-webkit-text-size-adjust: 100%; // 2
-webkit-tap-highlight-color: rgba(0, 0, 0, 0); // 3
-ms-text-size-adjust: 100%; // 6
// 1. Use the default cursor in all browsers (opinionated)
// 2. Change the line height in all browsers (opinionated)
// 3. Breaks words to prevent overflow in all browsers (opinionated)
// 4. Use a 4-space tab width in all browsers (opinionated)
// 5. Remove the grey highlight on links in iOS (opinionated)
// 6. Prevent adjustments of font size after orientation changes in iOS
:where(:root) {
-webkit-tap-highlight-color: transparent; // 5
-webkit-text-size-adjust: 100%; // 6
text-size-adjust: 100%; // 6
text-rendering: optimizeLegibility;
background-color: var(--background-color);
color: var(--color);
font-weight: var(--font-weight);
font-size: var(--font-size);
line-height: var(--line-height); // 1
line-height: var(--line-height); // 2
font-family: var(--font-family);
cursor: default; // 4
tab-size: 4; // 5
overflow-wrap: break-word; // 3
cursor: default; // 1
tab-size: 4; // 4
}