1
Fork 0
tildes-shepherd/source/scss/components/tours.scss

70 lines
1.2 KiB
SCSS
Raw Permalink Normal View History

2023-06-15 13:06:41 +00:00
@use "sass:list";
.tours {
display: grid;
gap: 16px;
grid-template-columns: repeat(var(--columns, 3), 1fr);
2023-06-15 13:06:41 +00:00
margin-top: 16px;
@media (width <= 1200px) {
--columns: 2;
}
@media (width <= 800px) {
--columns: 1;
}
2023-06-15 13:06:41 +00:00
}
.tour {
background-color: var(--background-secondary);
border: 2px solid var(--tour-accent-color);
display: grid;
gap: 8px;
grid-template-columns: auto;
grid-template-rows: min-content auto min-content;
padding: 16px;
&.completed {
grid-template-columns: auto min-content;
.tour-description,
.tour-link {
grid-column: span 2;
2023-06-15 13:06:41 +00:00
}
}
$border-colors: (
"red",
"orange",
"yellow",
"green",
"cyan",
"blue",
"violet",
"magenta",
);
@each $color in $border-colors {
$color-number: list.index($border-colors, $color);
&:nth-child(#{list.length($border-colors)}n + #{$color-number}) {
--tour-accent-color: var(--#{$color});
--tour-light-accent-color: var(--light-#{$color});
}
}
.tour-link a {
color: var(--tour-light-accent-color);
font-weight: bold;
text-decoration: underline;
&:hover {
color: var(--foreground);
}
}
.tour-completed {
color: var(--light-green);
}
}