typography.js icon indicating copy to clipboard operation
typography.js copied to clipboard

How do I override linkColor?

Open codenitpicker opened this issue 5 years ago • 3 comments

https://github.com/KyleAMathews/typography.js/blob/33d86df7e0d7f44cd1a71c8bd8791bdb71a7ecc5/packages/typography-theme-twin-peaks/src/index.js#L28-L37

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 avatar Feb 12 '20 20:02 codenitpicker

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.

codenitpicker avatar Feb 13 '20 13:02 codenitpicker

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.

Stivaros avatar Apr 11 '20 08:04 Stivaros

@Stivaros Still found nothing 😢

codenitpicker avatar Apr 12 '20 12:04 codenitpicker