mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-04-26 15:28:28 -04:00
stitches config
This commit is contained in:
parent
c69a593d61
commit
0f38ab4f0a
@ -5,9 +5,7 @@ const Code = styled("code", {
|
|||||||
backgroundColor: "$codeBackground",
|
backgroundColor: "$codeBackground",
|
||||||
border: "1px solid $kindaLight",
|
border: "1px solid $kindaLight",
|
||||||
borderRadius: "$rounded",
|
borderRadius: "$rounded",
|
||||||
|
transition: "background $fade, border $fade",
|
||||||
// light-dark theme switch fading
|
|
||||||
transition: "background 0.25s ease, border 0.25s ease",
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default Code;
|
export default Code;
|
||||||
|
@ -83,9 +83,7 @@ const CornerCopyButton = styled(CopyButton, {
|
|||||||
border: "1px solid $kindaLight",
|
border: "1px solid $kindaLight",
|
||||||
borderTopRightRadius: "$rounded",
|
borderTopRightRadius: "$rounded",
|
||||||
borderBottomLeftRadius: "$rounded",
|
borderBottomLeftRadius: "$rounded",
|
||||||
|
transition: "background $fade, border $fade",
|
||||||
// light-dark theme switch fading
|
|
||||||
transition: "background 0.25s ease, border 0.25s ease",
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export type CodeBlockProps = ComponentProps<typeof Code> & {
|
export type CodeBlockProps = ComponentProps<typeof Code> & {
|
||||||
|
@ -16,9 +16,7 @@ const InputStyles = css({
|
|||||||
borderRadius: "$rounded",
|
borderRadius: "$rounded",
|
||||||
color: "$text",
|
color: "$text",
|
||||||
backgroundColor: "$superDuperLight",
|
backgroundColor: "$superDuperLight",
|
||||||
|
transition: "background $fade",
|
||||||
// light-dark theme switch fading
|
|
||||||
transition: "background 0.25s ease",
|
|
||||||
|
|
||||||
"&:focus": {
|
"&:focus": {
|
||||||
outline: "none",
|
outline: "none",
|
||||||
|
@ -10,9 +10,7 @@ const Wrapper = styled("footer", {
|
|||||||
borderTop: "1px solid $kindaLight",
|
borderTop: "1px solid $kindaLight",
|
||||||
backgroundColor: "$backgroundOuter",
|
backgroundColor: "$backgroundOuter",
|
||||||
color: "$mediumDark",
|
color: "$mediumDark",
|
||||||
|
transition: "background $fade, border $fade",
|
||||||
// light-dark theme switch fading
|
|
||||||
transition: "background 0.25s ease, border 0.25s ease",
|
|
||||||
|
|
||||||
"@medium": {
|
"@medium": {
|
||||||
padding: "1em 1.25em",
|
padding: "1em 1.25em",
|
||||||
|
@ -9,13 +9,11 @@ const Wrapper = styled("header", {
|
|||||||
padding: "0.7em 1.5em",
|
padding: "0.7em 1.5em",
|
||||||
borderBottom: "1px solid $kindaLight",
|
borderBottom: "1px solid $kindaLight",
|
||||||
backgroundColor: "$backgroundHeader",
|
backgroundColor: "$backgroundHeader",
|
||||||
|
transition: "background $fade, border $fade",
|
||||||
|
zIndex: 9999,
|
||||||
|
|
||||||
// blurry glass-like background effect (except on firefox...?)
|
// blurry glass-like background effect (except on firefox...?)
|
||||||
backdropFilter: "saturate(180%) blur(5px)",
|
backdropFilter: "saturate(180%) blur(5px)",
|
||||||
zIndex: 9999,
|
|
||||||
|
|
||||||
// light-dark theme switch fading
|
|
||||||
transition: "background 0.25s ease, border 0.25s ease",
|
|
||||||
|
|
||||||
"@medium": {
|
"@medium": {
|
||||||
padding: "0.75em 1.25em",
|
padding: "0.75em 1.25em",
|
||||||
|
@ -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
|
// sets psuedo linear-gradient() for the underline's color; see stitches config for the weird calculation behind
|
||||||
// the local `$$underlineColor` variable.
|
// the local `$$underlineColor` variable.
|
||||||
setUnderlineVars: {},
|
setUnderlineVars: {},
|
||||||
// underline height is based on link's font size
|
|
||||||
$$underlineSize: "calc(0.1em + 0.05rem)",
|
|
||||||
|
|
||||||
backgroundImage: `linear-gradient($$underlineColor, $$underlineColor)`,
|
backgroundImage: `linear-gradient($$underlineColor, $$underlineColor)`,
|
||||||
backgroundPosition: "0% 100%",
|
backgroundPosition: "0% 100%",
|
||||||
backgroundRepeat: "no-repeat",
|
backgroundRepeat: "no-repeat",
|
||||||
backgroundSize: "0% $$underlineSize",
|
backgroundSize: "0% $borderWidths$underline",
|
||||||
paddingBottom: "0.2rem",
|
paddingBottom: "0.2rem",
|
||||||
|
|
||||||
"@media (prefers-reduced-motion: no-preference)": {
|
"@media (prefers-reduced-motion: no-preference)": {
|
||||||
transition: "background-size 0.25s ease-in-out",
|
transition: "background-size $linkHover",
|
||||||
},
|
},
|
||||||
|
|
||||||
"&:hover": {
|
"&:hover": {
|
||||||
backgroundSize: "100% $$underlineSize",
|
backgroundSize: "100% $borderWidths$underline",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
false: {},
|
false: {},
|
||||||
|
@ -12,9 +12,7 @@ const Wrapper = styled("div", {
|
|||||||
borderRadius: "$rounded",
|
borderRadius: "$rounded",
|
||||||
fontSize: "0.85em",
|
fontSize: "0.85em",
|
||||||
color: "$mediumDark",
|
color: "$mediumDark",
|
||||||
|
transition: "border $fade",
|
||||||
// light-dark theme switch fading
|
|
||||||
transition: "border 0.25s ease",
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const Name = styled(Link, {
|
const Name = styled(Link, {
|
||||||
|
@ -48,9 +48,21 @@ export const { styled, css, getCssText, globalCss, keyframes, createTheme, theme
|
|||||||
codeDeletion: "#ff1b1b",
|
codeDeletion: "#ff1b1b",
|
||||||
},
|
},
|
||||||
|
|
||||||
|
borderWidths: {
|
||||||
|
// underline height is based on link's font size
|
||||||
|
underline: "calc(0.1em + 0.05rem)",
|
||||||
|
},
|
||||||
|
|
||||||
radii: {
|
radii: {
|
||||||
rounded: "0.65em",
|
rounded: "0.65em",
|
||||||
},
|
},
|
||||||
|
|
||||||
|
transitions: {
|
||||||
|
// light <-> dark theme fade duration
|
||||||
|
fade: "0.25s ease",
|
||||||
|
// fancy underline animation
|
||||||
|
linkHover: "0.2s ease-in-out",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
media: {
|
media: {
|
||||||
@ -113,11 +125,9 @@ export const globalStyles = globalCss(
|
|||||||
"@font-face": [...Inter.family, ...RobotoMono.family],
|
"@font-face": [...Inter.family, ...RobotoMono.family],
|
||||||
|
|
||||||
body: {
|
body: {
|
||||||
backgroundColor: "$backgroundInner",
|
|
||||||
fontFamily: "$sans",
|
fontFamily: "$sans",
|
||||||
|
backgroundColor: "$backgroundInner",
|
||||||
// light-dark theme switch fading
|
transition: "background $fade",
|
||||||
transition: "background 0.25s ease",
|
|
||||||
},
|
},
|
||||||
|
|
||||||
"code, kbd, samp, pre": {
|
"code, kbd, samp, pre": {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user