sass-site/source/assets/sass/components/_lists.scss
2023-02-09 16:53:25 -06:00

183 lines
3.2 KiB
SCSS

@use 'sass:color';
@use '../breakpoints';
@use '../visual-design/theme';
@use '../visual-design/typography';
.sl-c-list {
&,
&-horizontal-wrapper ul,
&-navigation-wrapper ul {
margin: 0;
padding: 0;
list-style: none;
}
&-horizontal-wrapper {
@include breakpoints.sl-breakpoint--medium {
// add margin-bottom space
// to the twitter follow button
margin-bottom: var(--gutter);
}
@include breakpoints.sl-breakpoint--large {
ul {
display: flex;
margin: {
right: var(--gutter-half-negative);
left: var(--gutter-half-negative);
}
}
li {
padding: {
right: var(--gutter-half);
left: var(--gutter-half);
}
}
}
}
&-navigation-wrapper {
position: relative;
li {
margin: var(--gutter-half) 0;
line-height: 1.25;
}
&--collapsible {
user-select: none;
ul ul a {
padding-left: var(--gutter);
}
ul ul ul a {
padding-left: var(--gutter-double);
}
ul ul ul ul a {
padding-left: var(--gutter-triple);
}
a {
border: none;
cursor: pointer;
display: block;
margin: var(--gutter-half-negative) 0;
padding: 0.3rem;
width: 100%;
&:hover {
background-color: theme.$sl-color--dawn-pink;
}
}
li.overview a {
font-size: var(--sl-font-size--small);
&:not(.selected) {
color: color.adjust(theme.$sl-color--midnight-blue, $alpha: -0.3);
}
}
li a {
&.section {
&::after {
content: '';
float: right;
font-size: 0.5em;
text-align: center;
margin-top: 5px;
transition: transform 0.1s;
width: var(--gutter-plus);
}
&.open::after {
transform: rotate(90deg);
}
+ ul {
display: none;
}
&.open + ul {
display: block;
}
}
&.selected {
font-weight: bold;
&:not(.section) {
background-color: theme.$sl-color--dawn-pink;
}
}
}
}
}
}
.sl-c-description-list--horizontal {
margin: {
right: var(--gutter-negative);
left: var(--gutter-negative);
}
&,
> div {
display: flex;
}
> div {
border-left: var(--border-small) solid theme.$sl-color--iron;
padding: 0 var(--gutter);
&:first-child {
border: 0;
}
}
.compatibility {
font-weight: 600;
color: theme.$sl-color--midnight-blue;
display: block;
+ div {
border: 0;
}
}
dt,
dd {
padding-left: var(--gutter);
&:first-child {
padding-left: 0;
}
}
&.impl-status {
font-size: var(--status-text-size);
margin-top: var(--gutter-negative);
dt {
word-break: normal;
}
a {
transition: transform 0.1s;
border-bottom: none;
background: none;
cursor: pointer;
width: var(--gutter-plus);
text-align: center;
transform-origin: var(--gutter-half) calc(var(--gutter-minus) - 1px);
&.expanded {
transform: rotate(90deg);
}
}
}
}