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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 Bug - Note styles override link button colours #1848

Closed
denkristoffer opened this issue Feb 2, 2022 · 9 comments
Closed

馃悰 Bug - Note styles override link button colours #1848

denkristoffer opened this issue Feb 2, 2022 · 9 comments
Assignees
Labels
bug Something isn't working as expected stale Used to mark when there was no activity for a set period of time

Comments

@denkristoffer
Copy link
Collaborator

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)?

@denkristoffer denkristoffer added the bug Something isn't working as expected label Feb 2, 2022
@gui-santos
Copy link
Contributor

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"

@gui-santos gui-santos added the needs review Proposal/bug that needs to be reviewed by maintainers label Feb 2, 2022
@denkristoffer
Copy link
Collaborator Author

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.

@denkristoffer
Copy link
Collaborator Author

@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?

@denkristoffer
Copy link
Collaborator Author

@gui-santos Ping 馃檪

@github-actions
Copy link

github-actions bot commented Aug 9, 2022

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

@github-actions github-actions bot added the stale Used to mark when there was no activity for a set period of time label Aug 9, 2022
@denkristoffer denkristoffer removed needs review Proposal/bug that needs to be reviewed by maintainers stale Used to mark when there was no activity for a set period of time labels Aug 31, 2022
@github-actions
Copy link

github-actions bot commented Oct 1, 2022

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

@github-actions github-actions bot added the stale Used to mark when there was no activity for a set period of time label Oct 1, 2022
@Lelith
Copy link
Collaborator

Lelith commented Apr 15, 2024

@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 :(

@github-actions github-actions bot removed the stale Used to mark when there was no activity for a set period of time label Apr 16, 2024
Copy link

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

@github-actions github-actions bot added the stale Used to mark when there was no activity for a set period of time label May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as expected stale Used to mark when there was no activity for a set period of time
Projects
None yet
Development

No branches or pull requests

6 participants