pico/scss/layout/_document.scss

80 lines
2.2 KiB
SCSS
Raw Normal View History

2019-11-27 15:31:49 +07:00
/**
* Document
* Content-box & Responsive typography
*/
// 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
2019-11-27 15:31:49 +07:00
//
// Change from `box-sizing: content-box` so that `width` is not affected by `padding` or `border`
2019-11-27 15:31:49 +07:00
*,
*::before,
*::after {
box-sizing: border-box; // 1
}
// 1. Add text decoration inheritance in all browsers (opinionated)
// 2. Add vertical alignment inheritance in all browsers (opinionated)
::before,
::after {
text-decoration: inherit; // 1
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
2019-11-27 15:31:49 +07:00
html {
-webkit-text-size-adjust: 100%; // 2
-webkit-tap-highlight-color: rgba(0,0,0,0); // 3
-moz-tab-size: 4; // 5
-ms-text-size-adjust: 100%; // 6
-webkit-text-size-adjust: 100%; // 6
2019-11-27 15:31:49 +07:00
background: var(--background);
color: var(--text);
2020-09-29 08:38:35 +07:00
font-family: var(--text-font);
font-size: var(--base-font-xs);
font-weight: var(--text-weight);
line-height: var(--line-height); // 1
2019-11-27 15:31:49 +07:00
text-rendering: optimizeLegibility;
cursor: default; // 4
2019-11-27 15:31:49 +07:00
@if map-get($breakpoints, "sm") and
$enable-responsive-typography {
@media (min-width: map-get($breakpoints, "sm")) {
2020-09-29 08:38:35 +07:00
font-size: var(--base-font-sm);
2019-11-27 15:31:49 +07:00
}
}
@if map-get($breakpoints, "md") and
$enable-responsive-typography {
@media (min-width: map-get($breakpoints, "md")) {
2020-09-29 08:38:35 +07:00
font-size: var(--base-font-md);
2019-11-27 15:31:49 +07:00
}
}
@if map-get($breakpoints, "lg") and
$enable-responsive-typography {
@media (min-width: map-get($breakpoints, "lg")) {
2020-09-29 08:38:35 +07:00
font-size: var(--base-font-lg);
2019-11-27 15:31:49 +07:00
}
}
@if map-get($breakpoints, "xl") and
$enable-responsive-typography {
@media (min-width: map-get($breakpoints, "xl")) {
2020-09-29 08:38:35 +07:00
font-size: var(--base-font-xl);
2019-11-27 15:31:49 +07:00
}
}
}