contentful / forma-36

A design system by Contentful

Home Page:https://f36.contentful.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

πŸ› Bug - Note styles override link button colours

denkristoffer opened this issue Β· comments

Forma 36 bug report

Summary

Screenshot 2022-02-02 at 14 16 09

If you render a <Button as="a" /> in a Note, the Note variant styles are currently overriding the button's colour because of this line:

a: {
color: tokens.blue700,
},

Is there a way we can select something like a:not(our-button-component)?

Is this a bug or a design implementation issue? @domarku
my question is: do we want a link that looks like a button inside a note?

Also, just looking by the code, it seems that the intention here was to change the color of the link depending on the variant of the Note

I would say the easiest way to "fix" this is to change the styles in the Button component to enforce it to keep the white color when it has as="a"

my question is: do we want a link that looks like a button inside a note?

I would say we do, we use it quite a few places where we want an obvious primary action inside a note, like these EAP signups. I don't think a TextLink is eye-catching enough for that.

@gui-santos

I would say the easiest way to "fix" this is to change the styles in the Button component to enforce it to keep the white color when it has as="a"

How would you do this?

@gui-santos Ping πŸ™‚

Marking issue as stale since there was no acitivty for 30 days

Marking issue as stale since there was no activity for 30 days

@denkristoffer should we close this? I do not think we can fix it without removing the general rule for links in the note.styles this is one of the big downsides of css-in-js imho. If we would have proper class names we could prevent the button style from beeing overwrittin by hooking on the generic button class :(

Marking issue as stale since there was no activity for 30 days