pico/scss/components/_nav.scss

86 lines
1.4 KiB
SCSS
Raw Normal View History

2019-11-27 15:31:49 +07:00
/**
* Nav
*/
// Inline
nav,
nav ul {
display: flex;
}
nav {
justify-content: space-between;
ol,
2019-11-27 15:31:49 +07:00
ul {
align-items: center;
margin-bottom: 0;
padding: 0;
list-style: none;
&:first-of-type {
2020-09-29 08:38:35 +07:00
margin-left: calc(var(--spacing-gutter) * -0.5);
2019-11-27 15:31:49 +07:00
}
&:last-of-type {
2020-09-29 08:38:35 +07:00
margin-right: calc(var(--spacing-gutter) * -0.5);
2019-11-27 15:31:49 +07:00
}
}
li {
display: inline-block;
margin: 0;
2020-09-29 08:38:35 +07:00
padding: var(--spacing-gutter) calc(var(--spacing-gutter) / 2);
2019-11-27 15:31:49 +07:00
// HACK: Input & Button inside Nav
> *,
> input:not([type="checkbox"]):not([type="radio"]) {
margin-bottom: 0;
}
}
a {
display: block;
2020-09-29 08:38:35 +07:00
margin: calc(var(--spacing-gutter) * -1) calc(var(--spacing-gutter) * -0.5);
padding: var(--spacing-gutter) calc(var(--spacing-gutter) / 2);
border-radius: var(--block-round);
2019-11-27 15:31:49 +07:00
2020-09-29 08:38:35 +07:00
@if $enable-important {
text-decoration: none !important;
}
@else {
2019-11-27 15:31:49 +07:00
text-decoration: none;
}
2020-09-29 08:38:35 +07:00
&:hover,
&:active,
&:focus {
@if $enable-important {
text-decoration: none !important;
}
@else {
text-decoration: none;
}
}
2019-11-27 15:31:49 +07:00
}
}
// Vertical Nav
aside {
nav,
ol,
2019-11-27 15:31:49 +07:00
ul,
li {
display: block;
}
li {
2020-09-29 08:38:35 +07:00
padding: calc(var(--spacing-gutter) / 2);
2019-11-27 15:31:49 +07:00
a {
2020-09-29 08:38:35 +07:00
margin: calc(var(--spacing-gutter) * -0.5);
padding: calc(var(--spacing-gutter) / 2);
2019-11-27 15:31:49 +07:00
}
}
}