Module:Navpills/styles.css: Difference between revisions
From Evernyll Awakened
More actions
No edit summary |
No edit summary |
||
| (15 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
.template-navpills { | |||
. | display: grid; | ||
gap: 0.5rem; | |||
grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); | |||
grid-auto-rows: 3rem; | |||
font-size: 0.875rem; | |||
} | } | ||
.template-navpill { | |||
. | position: relative; | ||
border: 1px solid white; | |||
border-radius: 5px; | |||
font-weight: normal; | |||
line-height: normal; | |||
overflow: hidden; | |||
} | |||
.template-navpill-background { | |||
position: absolute; | |||
} | |||
.template-navpill-background img { | |||
width: 110%; | |||
height: 110%; | |||
object-fit: cover; | |||
transition: 100ms ease; | |||
transition-property: transform; | |||
} | |||
.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 1rem; | |||
display: flex; | |||
align-items: center; | |||
color: white; | |||
text-decoration: none; | |||
height: 100%; | |||
} | |||
.template-navpill > .template-navpill-background + a { | |||
text-shadow: -1px 0 .2em #000, 0 1px .2em #000, 1px 0 .2em #000, 0 -1px .2em #000; | |||
} | |||
.template-navpill:hover { | |||
background: rgba(255, 255, 255, 0.3); | |||
} | |||
.template-navpill:active { | |||
background: rgba(255, 255, 255, 0.1); | |||
} | } | ||
Latest revision as of 19:52, 17 January 2026
.template-navpills {
display: grid;
gap: 0.5rem;
grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
grid-auto-rows: 3rem;
font-size: 0.875rem;
}
.template-navpill {
position: relative;
border: 1px solid white;
border-radius: 5px;
font-weight: normal;
line-height: normal;
overflow: hidden;
}
.template-navpill-background {
position: absolute;
}
.template-navpill-background img {
width: 110%;
height: 110%;
object-fit: cover;
transition: 100ms ease;
transition-property: transform;
}
.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 1rem;
display: flex;
align-items: center;
color: white;
text-decoration: none;
height: 100%;
}
.template-navpill > .template-navpill-background + a {
text-shadow: -1px 0 .2em #000, 0 1px .2em #000, 1px 0 .2em #000, 0 -1px .2em #000;
}
.template-navpill:hover {
background: rgba(255, 255, 255, 0.3);
}
.template-navpill:active {
background: rgba(255, 255, 255, 0.1);
}