pico/docs/scss/layout/_main.scss

98 lines
2.6 KiB
SCSS
Raw Normal View History

2019-11-27 22:10:02 +07:00
/**
* Docs: Main (Grid)
*/
$navHeight: 3.5rem;
body > main {
2020-09-29 08:38:35 +07:00
padding-top: calc(1rem * var(--spacing-factor-xs) + #{$navHeight});
2019-11-27 22:10:02 +07:00
@media (min-width: map-get($breakpoints, "sm")) {
2020-09-29 08:38:35 +07:00
padding-top: calc(1rem * var(--spacing-factor-sm) + #{$navHeight});
2019-11-27 22:10:02 +07:00
}
@media (min-width: map-get($breakpoints, "md")) {
2020-09-29 08:38:35 +07:00
padding-top: calc(1rem * var(--spacing-factor-md) + #{$navHeight});
2019-11-27 22:10:02 +07:00
}
@media (min-width: map-get($breakpoints, "lg")) {
2020-09-29 08:38:35 +07:00
grid-column-gap: calc(var(--spacing-gutter) * 4);
2019-11-27 22:10:02 +07:00
display: grid;
grid-template-columns: 200px auto;
2020-09-29 08:38:35 +07:00
padding-top: calc(1rem * var(--spacing-factor-lg) + #{$navHeight});
2019-11-27 22:10:02 +07:00
}
@media (min-width: map-get($breakpoints, "xl")) {
2020-09-29 08:38:35 +07:00
padding-top: calc(1rem * var(--spacing-factor-xl) + #{$navHeight});
2019-11-27 22:10:02 +07:00
}
> * {
min-width: 0; // HACK for childs in overflow
}
}
// Anchors hacks for internal links
//
div[role="document"] > section::before {
2019-11-27 22:10:02 +07:00
display: block;
2020-09-29 08:38:35 +07:00
height: calc(1rem * var(--spacing-factor-xs) + #{$navHeight});
margin-top: calc(-1rem * var(--spacing-factor-xs) - #{$navHeight});
2019-11-27 22:10:02 +07:00
content: '';
@media (min-width: map-get($breakpoints, "sm")) {
2020-09-29 08:38:35 +07:00
height: calc(1rem * var(--spacing-factor-sm) + #{$navHeight});
margin-top: calc(-1rem * var(--spacing-factor-sm) - #{$navHeight});
2019-11-27 22:10:02 +07:00
}
@media (min-width: map-get($breakpoints, "md")) {
2020-09-29 08:38:35 +07:00
height: calc(1rem * var(--spacing-factor-md) + #{$navHeight});
margin-top: calc(-1rem * var(--spacing-factor-md) - #{$navHeight});
2019-11-27 22:10:02 +07:00
}
@media (min-width: map-get($breakpoints, "lg")) {
2020-09-29 08:38:35 +07:00
height: calc(1rem * var(--spacing-factor-lg) + #{$navHeight});
margin-top: calc(-1rem * var(--spacing-factor-lg) - #{$navHeight});
2019-11-27 22:10:02 +07:00
}
@media (min-width: map-get($breakpoints, "xl")) {
2020-09-29 08:38:35 +07:00
height: calc(1rem * var(--spacing-factor-xl) + #{$navHeight});
margin-top: calc(-1rem * var(--spacing-factor-xl) - #{$navHeight});
2019-11-27 22:10:02 +07:00
}
}
// External links
//
div[role="document"] section a[href*="//"]:not([href*="https://picocss.com"]):not([role])::after {
display: inline-block;
width: 1rem;
height: 1rem;
2020-09-29 08:38:35 +07:00
background-image: var(--icon-external);
background-position: top center;
background-repeat: no-repeat;
background-size: .66rem auto;
content: '';
}
2019-12-11 08:46:32 +07:00
// Form grid
//
form.grid {
> input:not([type=checkbox]):not([type=radio]),
> button {
margin-bottom: 0;
}
}
// Embedded SVG
//
svg {
height: 1rem;
}