These are the HSL values for the particular ochre brown I’m using for links on this site. I don’t have any hover effects, but if I did, I would replicate those here, too.
It’s not ideal to hard-code the HSL values. According to my research, it seems that in some layout families, Squarespace uses/respects CSS variables. There’s a website called Applet Studio that has scraped all of Squarespace’s CSS variables into an Airtable database. The pertinent one here is paragraphLinkColor
, and I’m using a layout family that supports CSS variables, so I thought setting color: var(--paragraphLinkColor);
would work, but it didn’t. I’m not sure why, so for now I’m just hard-coding the values, and I’ll need to remember to update them if I ever change my website’s link styles.
Update (September 27, 2024): Well, I scratched an itch to have the default gray Bigfoot buttons match the rest of my site’s link styles.
The previous statement about hard-coding HSL values (and that not being ideal) still applies, but I’m just rolling with it. Note that instead of further editing bigfoot-number.css
, I’m adding my modifications to the Squarespace Custom CSS editor, so if I ever change my link styles in Squarespace and need to manually propagate those changes, I’ll be going to a Squarespace tool instead of an auxiliary CSS file.
This time around, I’m using CSS variables and hsla()
to define light, medium, and dark versions of my stylesheet’s ochre brown link color. Then I’m overwriting that in the appropriate locations to achieve the desired effect:
Normal button: Dark text on light background
Hover over/focus on button: White text on medium background
Active button: White text on dark background
The resulting custom CSS looks like this:
:root {
--post-link-color: hsl(30, 89%, 40%);
--post-link-color-light: hsla(30, 89%, 40%, 0.2);
--post-link-color-medium: hsla(30, 89%, 40%, 0.5);
--post-link-color-dark: hsla(30, 89%, 40%, 0.8);
}
.code-block a, .bigfoot-footnote__content a {
color: var(--post-link-color);
}
.bigfoot-footnote__button {
background-color: var(--post-link-color-light) !important;
}
.bigfoot-footnote__button:hover, .bigfoot-footnote__button:focus, .bigfoot-footnote__button:active {
background-color: var(--post-link-color-medium) !important;
}
.bigfoot-footnote__button.is-active {
background-color: var(--post-link-color-dark) !important;
}
.bigfoot-footnote__button:after {
color: var(--post-link-color-dark) !important;
}
.bigfoot-footnote__button:hover:after, .bigfoot-footnote__button.is-active:after {
color: white !important;
}