sass-site/source/assets/sass/components/_lists.scss

173 lines
3.2 KiB
SCSS
Raw Normal View History

2023-01-12 20:54:24 +01:00
@use 'sass:color';
@use '../breakpoints';
@use '../config/color/brand';
2023-01-12 19:19:42 +01:00
2023-01-06 22:40:29 +01:00
.sl-c-list {
&,
&-horizontal-wrapper ul,
&-navigation-wrapper ul {
margin: 0;
padding: 0;
list-style: none;
}
&-horizontal-wrapper {
2023-01-12 19:19:42 +01:00
@include breakpoints.sl-breakpoint--medium {
2023-01-06 22:40:29 +01:00
// add margin-bottom space
// to the twitter follow button
margin-bottom: var(--sl-gutter);
2023-01-06 22:40:29 +01:00
}
2023-01-12 19:19:42 +01:00
@include breakpoints.sl-breakpoint--large {
2023-01-06 22:40:29 +01:00
ul {
display: flex;
2023-03-24 03:30:45 +01:00
margin-left: var(--sl-gutter--half-negative);
margin-right: var(--sl-gutter--half-negative);
2023-01-06 22:40:29 +01:00
}
li {
2023-03-24 03:30:45 +01:00
padding-left: var(--sl-gutter--half);
padding-right: var(--sl-gutter--half);
2023-01-06 22:40:29 +01:00
}
}
}
&-navigation-wrapper {
position: relative;
li {
margin: var(--sl-gutter--half) 0;
2023-01-06 22:40:29 +01:00
line-height: 1.25;
}
&--collapsible {
user-select: none;
2023-01-09 20:10:02 +01:00
ul ul a {
padding-left: var(--sl-gutter);
2023-01-09 20:10:02 +01:00
}
2023-01-09 23:19:15 +01:00
2023-01-09 20:10:02 +01:00
ul ul ul a {
padding-left: var(--sl-gutter--double);
2023-01-09 20:10:02 +01:00
}
2023-01-09 23:19:15 +01:00
2023-01-09 20:10:02 +01:00
ul ul ul ul a {
padding-left: var(--sl-gutter--triple);
2023-01-09 20:10:02 +01:00
}
2023-01-06 22:40:29 +01:00
a {
2023-06-21 00:07:07 +02:00
--sl-color-background--link-state: var(--sl-color--dawn-pink);
2023-06-21 00:08:26 +02:00
2023-01-06 22:40:29 +01:00
border: none;
cursor: pointer;
display: block;
margin: var(--sl-gutter--half-negative) 0;
2023-01-06 22:40:29 +01:00
padding: 0.3rem;
width: 100%;
}
li.overview a {
font-size: var(--sl-font-size--small);
2023-01-09 23:19:15 +01:00
2023-01-09 20:10:02 +01:00
&:not(.selected) {
color: color.adjust(brand.$sl-color--midnight-blue, $alpha: -0.3);
2023-01-09 20:10:02 +01:00
}
2023-01-06 22:40:29 +01:00
}
li a {
&.section {
&::after {
2023-01-09 20:10:02 +01:00
content: '';
2023-01-06 22:40:29 +01:00
float: right;
font-size: 0.5em;
text-align: center;
2023-06-21 00:07:07 +02:00
margin-top: 1px;
2023-01-06 22:40:29 +01:00
transition: transform 0.1s;
width: var(--sl-gutter--plus);
2023-01-06 22:40:29 +01:00
}
2023-01-09 20:10:02 +01:00
&.open::after {
transform: rotate(90deg);
}
2023-01-06 22:40:29 +01:00
2023-01-09 20:10:02 +01:00
+ ul {
display: none;
}
2023-01-09 23:19:15 +01:00
2023-01-09 20:10:02 +01:00
&.open + ul {
display: block;
}
2023-01-06 22:40:29 +01:00
}
&.selected {
font-weight: bold;
2023-01-09 23:19:15 +01:00
2023-01-09 20:10:02 +01:00
&:not(.section) {
background-color: var(--sl-color--dawn-pink);
2023-01-09 20:10:02 +01:00
}
2023-01-06 22:40:29 +01:00
}
}
}
}
}
.sl-c-description-list--horizontal {
2023-03-24 03:30:45 +01:00
margin-left: var(--sl-gutter--negative);
margin-right: var(--sl-gutter--negative);
2023-01-06 22:40:29 +01:00
&,
2023-01-09 20:10:02 +01:00
> div {
display: flex;
}
2023-01-06 22:40:29 +01:00
> div {
border-left: var(--sl-border--small) solid var(--sl-color--iron);
padding: 0 var(--sl-gutter);
2023-01-06 22:40:29 +01:00
2023-01-09 20:10:02 +01:00
&:first-child {
border: 0;
}
2023-01-06 22:40:29 +01:00
}
.compatibility {
font-weight: 600;
color: var(--sl-color--midnight-blue);
2023-01-06 22:40:29 +01:00
display: block;
2023-01-09 20:10:02 +01:00
+ div {
border: 0;
}
2023-01-06 22:40:29 +01:00
}
dt,
dd {
padding-left: var(--sl-gutter);
2023-01-06 22:40:29 +01:00
2023-01-09 20:10:02 +01:00
&:first-child {
padding-left: 0;
}
2023-01-06 22:40:29 +01:00
}
&.impl-status {
font-size: var(--sl-status-text-size);
margin-top: var(--sl-gutter--negative);
2023-01-09 20:10:02 +01:00
dt {
word-break: normal;
}
2023-01-06 22:40:29 +01:00
a {
transition: transform 0.1s;
border-bottom: none;
background: none;
cursor: pointer;
width: var(--sl-gutter--plus);
2023-01-06 22:40:29 +01:00
text-align: center;
2023-01-09 20:10:02 +01:00
&.expanded {
transform: rotate(90deg);
}
2023-01-06 22:40:29 +01:00
}
}
}