More actions
en>Alistair3149 No edit summary |
en>Alistair3149 No edit summary |
||
Line 23: | Line 23: | ||
.template-navpill-background:after { | .template-navpill-background:after { | ||
content: ''; | |||
position: absolute; | position: absolute; | ||
inset: 0; | inset: 0; | ||
background: linear-gradient(to right, #000, transparent); | background: linear-gradient(to right, #000, transparent); | ||
} | } | ||
Line 33: | Line 33: | ||
height: 100%; | height: 100%; | ||
object-fit: cover; | object-fit: cover; | ||
transition: var( --transition-hover ); | |||
transition-property: transform; | |||
} | |||
.template-navpill:hover .template-navpill-background img { | |||
transform: scale( 1.1 ); | |||
} | } | ||
Revision as of 23:03, 10 June 2024
.template-navpills {
display: grid;
gap: var( --space-xs );
grid-template-columns: repeat( auto-fill, minmax( 160px, 1fr ) );
grid-auto-rows: 3rem;
font-size: 0.875rem;
}
.template-navpill {
position: relative;
border: 1px solid var( --border-color-base );
border-radius: var( --border-radius--medium );
font-weight: var( --font-weight-medium );
line-height: var( --line-height-sm );
overflow: hidden;
}
.template-navpill-background {
position: absolute;
inset: 0;
pointer-events: none;
}
.template-navpill-background:after {
content: '';
position: absolute;
inset: 0;
background: linear-gradient(to right, #000, transparent);
}
.template-navpill-background img {
width: 100%;
height: 100%;
object-fit: cover;
transition: var( --transition-hover );
transition-property: transform;
}
.template-navpill:hover .template-navpill-background img {
transform: scale( 1.1 );
}
.template-navpill > a {
position: relative;
padding: 0 var( --space-md );
display: flex;
align-items: center;
color: var( --color-base--emphasized );
text-decoration: none;
height: 100%;
}
.template-navpill > a:hover {
background: var( --background-color-quiet--hover );
}
.template-navpills a:active {
background: var( --background-color-quiet--active );
}