Module:Navpills/styles.css: Difference between revisions
From Deepspace Lore
More actions
Created page with ".template-navpills { display: grid; gap: var( --space-xs ); grid-template-columns: repeat( auto-fill, minmax( 160px, 1fr ) ); grid-auto-rows: 3rem; font-size: var( --font-size-small ); } .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-xx-small ); overflow: hidden; } .template-..." |
No edit summary |
||
| Line 26: | Line 26: | ||
position: absolute; | position: absolute; | ||
inset: 0; | inset: 0; | ||
opacity: 0.6; | |||
background: linear-gradient(to right, #000, transparent); | background: linear-gradient(to right, #000, transparent); | ||
transition: transform 250ms ease; | transition: transform 250ms ease; | ||
| Line 34: | Line 35: | ||
height: 100%; | height: 100%; | ||
object-fit: cover; | object-fit: cover; | ||
opacity: 0.7; | |||
transition: var( --transition-hover ); | transition: var( --transition-hover ); | ||
transition-property: transform; | transition-property: transform; | ||
filter: saturate(0.5); | |||
} | } | ||
| Line 51: | Line 54: | ||
display: flex; | display: flex; | ||
align-items: center; | align-items: center; | ||
color: | color: #fff; | ||
text-decoration: none; | text-decoration: none; | ||
height: 100%; | height: 100%; | ||
| Line 57: | Line 60: | ||
.template-navpill > .template-navpill-background + a { | .template-navpill > .template-navpill-background + a { | ||
color: #fff; | |||
text-shadow: -1px 0 .2em #000, 0 1px .2em #000, 1px 0 .2em #000, 0 -1px .2em #000; | text-shadow: -1px 0 .2em #000, 0 1px .2em #000, 1px 0 .2em #000, 0 -1px .2em #000; | ||
} | } | ||
Revision as of 20:51, 24 April 2026
.template-navpills {
display: grid;
gap: var( --space-xs );
grid-template-columns: repeat( auto-fill, minmax( 160px, 1fr ) );
grid-auto-rows: 3rem;
font-size: var( --font-size-small );
}
.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-xx-small );
overflow: hidden;
}
.template-navpill-background {
position: absolute;
inset: 0;
pointer-events: none;
}
.template-navpill-background:after {
content: '';
position: absolute;
inset: 0;
opacity: 0.6;
background: linear-gradient(to right, #000, transparent);
transition: transform 250ms ease;
}
.template-navpill-background img {
width: 100%;
height: 100%;
object-fit: cover;
opacity: 0.7;
transition: var( --transition-hover );
transition-property: transform;
filter: saturate(0.5);
}
.template-navpill:hover .template-navpill-background::after {
transform: translateX( -100% );
}
.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: #fff;
text-decoration: none;
height: 100%;
}
.template-navpill > .template-navpill-background + a {
color: #fff;
text-shadow: -1px 0 .2em #000, 0 1px .2em #000, 1px 0 .2em #000, 0 -1px .2em #000;
}
.template-navpill:hover {
background: var( --background-color-button-quiet--hover );
}
.template-navpill:active {
background: var( --background-color-button-quiet--active );
}