More actions
Created page with ".navpill { position: relative; border: 2px solid var(--color-surface-1); border-radius: 8px; font-weight: 500; line-height: 1.375; overflow: hidden; background-color: hsl(var(--color-primary__h), var(--color-primary__s), 30%); } .navpill-background { position: absolute; inset: 0; pointer-events: none; } .navpill-background:after { content: ""; position: absolute; inset: 0; background: linear-gradient(to right, var..." |
mNo edit summary |
||
(7 intermediate revisions by the same user not shown) | |||
Line 7: | Line 7: | ||
overflow: hidden; | overflow: hidden; | ||
background-color: hsl(var(--color-primary__h), var(--color-primary__s), 30%); | background-color: hsl(var(--color-primary__h), var(--color-primary__s), 30%); | ||
min-width: 135px; | |||
height: 50px; | |||
} | } | ||
Line 41: | Line 43: | ||
.navpill > a { | .navpill > a { | ||
position: relative; | position: relative; | ||
padding: | padding: 1rem; | ||
display: flex; | display: flex; | ||
align-items: center; | align-items: center; |
Latest revision as of 01:19, 29 December 2024
.navpill { position: relative; border: 2px solid var(--color-surface-1); border-radius: 8px; font-weight: 500; line-height: 1.375; overflow: hidden; background-color: hsl(var(--color-primary__h), var(--color-primary__s), 30%); min-width: 135px; height: 50px; } .navpill-background { position: absolute; inset: 0; pointer-events: none; } .navpill-background:after { content: ""; position: absolute; inset: 0; background: linear-gradient(to right, var(--color-progressive), transparent); transition: transform 250ms ease; } .navpill-background img { width: 100%; height: 100%; object-fit: cover; transition: 100ms ease; transition-property: transform; } .navpill:hover .navpill-background::after { transform: translateX(-100%); } .navpill:hover .navpill-background img { transform: scale(1.1); } .navpill > a { position: relative; padding: 1rem; display: flex; align-items: center; color: var(--color-emphasized); text-decoration: none; height: 100%; } .navpill > .navpill-background + a { color: var(--color-emphasized); text-shadow: -1px 0 .2em #000, 0 1px .2em var(--color-subtle), 1px 0 .2em #000, 0 -1px .2em #000; } .navpill:hover { background: hsl(var(--color-primary__h), var(--color-primary__s), 30%); } .navpill:active { background: var(--color-progressive); }