2022-10-22 15:39:36 +07:00
|
|
|
|
@use "sass:map";
|
2022-10-22 13:11:51 +07:00
|
|
|
|
@use "../settings" as *;
|
2022-10-22 11:44:10 +07:00
|
|
|
|
|
2019-11-27 15:31:49 +07:00
|
|
|
|
/**
|
|
|
|
|
* Sectioning
|
|
|
|
|
* Container and responsive spacings for header, main, footer
|
|
|
|
|
*/
|
|
|
|
|
|
2020-09-11 23:22:50 +07:00
|
|
|
|
// Reboot based on :
|
|
|
|
|
// - normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css
|
2022-03-06 10:53:20 +07:00
|
|
|
|
// - sanitize.css v13.0.0 | CC0 1.0 Universal | github.com/csstools/sanitize.css
|
2019-11-27 15:31:49 +07:00
|
|
|
|
// ––––––––––––––––––––
|
|
|
|
|
|
2020-09-11 23:22:50 +07:00
|
|
|
|
// Render the `main` element consistently in IE
|
2019-11-27 15:31:49 +07:00
|
|
|
|
main {
|
|
|
|
|
display: block;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Pico
|
|
|
|
|
// ––––––––––––––––––––
|
|
|
|
|
|
2022-03-06 10:53:20 +07:00
|
|
|
|
// 1. Remove the margin in all browsers (opinionated)
|
2022-10-22 13:11:51 +07:00
|
|
|
|
#{$semantic-root-element} {
|
2019-11-27 15:31:49 +07:00
|
|
|
|
width: 100%;
|
2022-03-06 10:53:20 +07:00
|
|
|
|
margin: 0; // 1
|
2019-11-27 15:31:49 +07:00
|
|
|
|
|
|
|
|
|
> header,
|
|
|
|
|
> main,
|
|
|
|
|
> footer {
|
|
|
|
|
width: 100%;
|
|
|
|
|
margin-right: auto;
|
|
|
|
|
margin-left: auto;
|
|
|
|
|
|
2021-07-02 16:54:41 +07:00
|
|
|
|
// Semantic container
|
2022-10-22 13:11:51 +07:00
|
|
|
|
@if $enable-semantic-container {
|
2021-07-02 16:54:41 +07:00
|
|
|
|
// Centered viewport
|
2022-10-22 15:39:36 +07:00
|
|
|
|
$first-breakpoint: true;
|
|
|
|
|
padding: var(#{$✨}block-spacing-vertical) var(#{$✨}block-spacing-horizontal);
|
|
|
|
|
@each $key, $values in $breakpoints {
|
|
|
|
|
@if $values {
|
|
|
|
|
@media (min-width: map.get($values, "breakpoint")) {
|
|
|
|
|
max-width: map.get($values, "viewport");
|
|
|
|
|
@if $first-breakpoint {
|
|
|
|
|
$first-breakpoint: false;
|
|
|
|
|
padding-right: 0;
|
|
|
|
|
padding-left: 0;
|
|
|
|
|
}
|
2021-07-02 16:54:41 +07:00
|
|
|
|
}
|
2019-11-27 15:31:49 +07:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2021-07-02 16:54:41 +07:00
|
|
|
|
// Semantic container
|
|
|
|
|
@else {
|
2022-10-22 13:11:51 +07:00
|
|
|
|
padding: var(#{$✨}block-spacing-vertical) 0;
|
2019-11-27 15:31:49 +07:00
|
|
|
|
}
|
|
|
|
|
}
|
2022-10-15 23:22:12 +07:00
|
|
|
|
}
|