Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I override linkColor? #246

Open
codenitpicker opened this issue Feb 12, 2020 · 3 comments
Open

How do I override linkColor? #246

codenitpicker opened this issue Feb 12, 2020 · 3 comments

Comments

@codenitpicker
Copy link

overrideStyles: ({ adjustFontSizeTo, scale, rhythm }, options) => {
const linkColor = "#ff5700"
const vr = verticalRhythm({
baseFontSize: "19px",
baseLineHeight: "29.85px",
})
return {
a: {
color: linkColor,
textDecoration: "none",

I understand this is how to override elements:

twinPeaksTheme.overrideStyles = () => ({
  a: {
    color: "blue",
  },
})

However I can't seem to access linkColor with anything similar to this:

twinPeaksTheme.overrideStyles = () => (
    linkColor = "blue"
)


linkColor is present in the following themes:

  • typography-theme-doelger
  • typography-theme-elk-glen
  • typography-theme-fairy-gates
  • typography-theme-lincoln
  • typography-theme-ocean-beach
  • typography-theme-twin-peaks
@codenitpicker
Copy link
Author

twinPeaksTheme.overrideStyles = () => ({
  a: {
    color: "blue",
  },
})

Also when a color is overridden for a tags (shown above), all other elements that use linkColor are set to transparent.

@Stivaros
Copy link

Stivaros commented Apr 11, 2020

I am also having this issue - did you find a solution?

EDIT: Sorry, I should say that I didn't have any issue with using:

"a": {
  color: `#8bc34a`
}

However I'm concerned as this won't change the blockquote border and isn't update-proof if anything else useslinkColor in future releases.

@codenitpicker
Copy link
Author

@Stivaros Still found nothing 😢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants