KyleAMathews / typography.js

A powerful toolkit for building websites with beautiful design
http://kyleamathews.github.io/typography.js/
MIT License
3.83k stars 181 forks source link

How do I override linkColor? #246

Open codenitpicker opened 4 years ago

codenitpicker commented 4 years ago

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:

codenitpicker commented 4 years ago
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 commented 4 years ago

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 commented 4 years ago

@Stivaros Still found nothing 😢