lbry.tech/app/sass/partials/_feature-links.scss

106 lines
1.9 KiB
SCSS
Raw Normal View History

2018-09-30 19:05:15 +02:00
$width-feature-link: 320px;
.feature-links {
list-style-type: none;
2018-09-30 19:05:15 +02:00
margin-bottom: 2rem;
2018-10-06 00:46:08 +02:00
padding-top: 0.5rem;
2018-10-11 00:14:20 +02:00
@media (min-width: 1061px) {
display: grid;
grid-gap: 2rem;
grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}
}
.feature-link {
background-color: $white;
border: 1px solid rgba($black, 0.1);
border-radius: 3px;
cursor: pointer;
display: inline-block;
position: relative;
transition: box-shadow 0.2s;
vertical-align: top;
2018-10-11 00:14:20 +02:00
@media (min-width: 1061px) {
width: $width-feature-link; min-height: 135px;
}
@media (max-width: 1060px) {
min-height: 150px;
&:not(:last-of-type) {
margin-bottom: 1rem;
}
}
@media (min-width: 681px) and (max-width: 1060px) {
width: calc(50% - 1rem);
&:nth-of-type(odd) {
margin-right: 1rem;
}
}
@media (max-width: 680px) {
width: 100%;
}
&:not(:hover) {
.feature-link__background {
filter: brightness(0.5);
}
}
&:hover {
box-shadow: 0 0 15px rgba($black, 0.15);
.feature-link__title {
color: $teal;
}
}
}
.feature-link__title {
2018-10-01 16:44:33 +02:00
top: 85px;
2018-10-06 00:46:08 +02:00
font-size: 1rem;
2018-09-30 19:05:15 +02:00
font-weight: normal;
2018-10-06 00:46:08 +02:00
position: relative;
2018-09-30 19:05:15 +02:00
text-align: center;
transition: color 0.2s;
2018-10-06 00:46:08 +02:00
z-index: 1;
2018-09-30 19:05:15 +02:00
}
.feature-link__title-inner {
2018-10-06 00:46:08 +02:00
padding: 0.25rem 0.5rem;
background-color: $white;
2018-10-06 00:46:08 +02:00
border: 1px solid rgba($gray, 0.1);
border-radius: 3px;
box-decoration-break: clone;
2018-10-06 00:46:08 +02:00
box-shadow: 0 2px 5px rgba($black, 0.025);
display: inline-block;
}
.feature-link__background {
width: calc(100% + 2px); height: 100px;
top: -1px; left: -1px;
background-color: $teal;
border-top-right-radius: 3px;
border-top-left-radius: 3px;
overflow: hidden;
position: absolute;
2018-10-06 00:46:08 +02:00
transition: filter 0.2s;
z-index: 0;
img {
width: 100%; height: 100%;
object-fit: cover;
object-position: center;
2018-10-09 23:28:18 +02:00
position: absolute;
}
}