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

183 lines
3.2 KiB
SCSS
Raw Normal View History

2023-01-12 20:54:24 +01:00
@use 'sass:color';
@use '../breakpoints';
@use '../visual-design/theme';
@use '../visual-design/typography';
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
2023-01-31 07:13:57 +01:00
margin-bottom: var(--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;
margin: {
2023-01-31 07:13:57 +01:00
right: calc(var(--gutter-half) * -1);
left: calc(var(--gutter-half) * -1);
2023-01-09 20:10:02 +01:00
}
2023-01-06 22:40:29 +01:00
}
li {
padding: {
2023-01-31 07:13:57 +01:00
right: var(--gutter-half);
left: var(--gutter-half);
2023-01-09 20:10:02 +01:00
}
2023-01-06 22:40:29 +01:00
}
}
}
&-navigation-wrapper {
position: relative;
li {
2023-01-31 07:13:57 +01:00
margin: var(--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 {
2023-01-31 07:13:57 +01:00
padding-left: var(--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 {
2023-01-31 07:13:57 +01:00
padding-left: var(--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 {
2023-01-31 07:13:57 +01:00
padding-left: var(--gutter-triple);
2023-01-09 20:10:02 +01:00
}
2023-01-06 22:40:29 +01:00
a {
border: none;
cursor: pointer;
display: block;
2023-01-31 07:13:57 +01:00
margin: calc(var(--gutter-half) * -1) 0;
2023-01-06 22:40:29 +01:00
padding: 0.3rem;
width: 100%;
2023-01-09 20:10:02 +01:00
&:hover {
2023-01-12 19:19:42 +01:00
background-color: theme.$sl-color--dawn-pink;
2023-01-09 20:10:02 +01:00
}
2023-01-06 22:40:29 +01:00
}
li.overview a {
2023-01-12 19:19:42 +01:00
font-size: typography.$sl-font-size--small;
2023-01-09 23:19:15 +01:00
2023-01-09 20:10:02 +01:00
&:not(.selected) {
2023-01-12 19:19:42 +01:00
color: color.adjust(theme.$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;
margin-top: 5px;
transition: transform 0.1s;
width: 19px;
}
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) {
2023-01-12 19:19:42 +01:00
background-color: theme.$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 {
margin: {
2023-01-31 07:13:57 +01:00
right: calc(var(--gutter) * -1);
left: calc(var(--gutter) * -1);
2023-01-09 20:10:02 +01:00
}
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 {
2023-01-12 19:19:42 +01:00
border-left: 1px solid theme.$sl-color--iron;
2023-01-31 07:13:57 +01:00
padding: 0 var(--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;
2023-01-12 19:19:42 +01:00
color: theme.$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 {
2023-01-31 07:13:57 +01:00
padding-left: var(--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: 0.8em;
2023-01-31 07:13:57 +01:00
margin-top: calc(var(--gutter) * -1);
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: 19px;
text-align: center;
transform-origin: 8px 11px;
2023-01-09 20:10:02 +01:00
&.expanded {
transform: rotate(90deg);
}
2023-01-06 22:40:29 +01:00
}
}
}