The discussion revolves around customizing the formatting of link text in the Custom Header Links plugin. alexs asks how to style the link text (e.g., bold, color) without losing changes during updates. dax suggests creating a custom theme component instead of editing CSS directly. alexs confirms this works. manuel explains that since the plugin now uses CSS variables, direct SCSS assignments like $header_primary don’t work, but using var(--header_primary) in custom CSS does. pmusaraj confirms this is due to the switch to CSS variables and recommends updating the component for the fix. Daniel_R notes the solution didn’t work for him, possibly due to not updating the component.
What’s the best way to customise the formatting of the link text? It looks like editing the CSS isn’t the best approach because the changes will be lost when the plugin’s updated.
It’d be useful to be able to customise the text depending on the theme too. I have a dark theme & a light theme with different colour fonts for each. I’d like to set the colour of the text to match the theme.
Thanks! I’ve done that now & it worked like a charm.
Out of interest, how does the site choose which CSS to use? If the standard theme component contains CSS that will set the font colour to $header_primary -
Hi @Johani - is this still the case? My instance seems reluctant to adopt the $header_primary colour, and curiously even when I set $primary to the colour I want (white), it remains stubbornly black !
It’s probably related to the switch from SCSS to CSS variables for color declarations. Assigning $header_primary in custom css doesn’t work, but if you use
.custom-header-links .headerLink a {
color: var(--header_primary);
}