1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2026-06-13 19:55:26 -04:00

stitches config

This commit is contained in:
2022-07-06 03:02:09 -04:00
parent c69a593d61
commit 0f38ab4f0a
8 changed files with 24 additions and 28 deletions
+3 -5
View File
@@ -14,21 +14,19 @@ const StyledLink = styled(NextLink, {
// sets psuedo linear-gradient() for the underline's color; see stitches config for the weird calculation behind
// the local `$$underlineColor` variable.
setUnderlineVars: {},
// underline height is based on link's font size
$$underlineSize: "calc(0.1em + 0.05rem)",
backgroundImage: `linear-gradient($$underlineColor, $$underlineColor)`,
backgroundPosition: "0% 100%",
backgroundRepeat: "no-repeat",
backgroundSize: "0% $$underlineSize",
backgroundSize: "0% $borderWidths$underline",
paddingBottom: "0.2rem",
"@media (prefers-reduced-motion: no-preference)": {
transition: "background-size 0.25s ease-in-out",
transition: "background-size $linkHover",
},
"&:hover": {
backgroundSize: "100% $$underlineSize",
backgroundSize: "100% $borderWidths$underline",
},
},
false: {},