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

Inherit link color in components using the Feedback color collection (#492) #565

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

adamkudrna
Copy link
Member

@adamkudrna adamkudrna commented Sep 2, 2024

See #492.

This change affects output HTML and may break downstream snapshot tests.
`Badge` color variants are now generated using color collections.

Other components to be styled the same way already support theming,
so `Badge` needs to support theming too.

New theming options:

`--rui-Badge--<PRIORITY>--<COLOR>__<PROPERTY>`

See `theme.scss` for all available options.
$color-category: _get-category-by-value($value: $variant-value, $collections: collections.$colors);

// 1.
// TODO: Figure out what to do with the `dark` color category where blue links do not work.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be an issue. As stated in #492, we want to keep the basic appearance for links inside components in the Neutral Light color. However, Neutral Dark is unreadable then.

I have to think about it yet. 🤔

obrazek

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personal opinion: Inherit color for neutral dark color (and keep only neutral light color) OR split link color property/ies between light and dark variant/s. This is beyond this discussion, but if we generally split colors between light and dark, couldn't we use it later for dark mode variant (which we haven't talk about it yet)?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Light and dark colors (the neutral colors collection) and light and dark modes are something different. But if you mean we would face the same problem during dark mode design, you are probably right. Just with the difference that light and dark neutral colors will be both somewhat dark, just using a different shade of gray.

When I'm thinking about it from the design perspective, it makes sense to use the default link appearance in light color variants. Even if it means an exception in our code.

(Other way would be adding even more design tokens (= custom properties) which sounds like an overkill…)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is what I have now:

obrazek

Apparently, links in the dark variant are undistinguishable from regular text 🙁. But this could be solved with advising to use underlined links (we don't have them yet) in this context.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can have another exception for Alerts where dark text would work well 😄

obrazek

Base automatically changed from refactor/use-color-collections to master September 11, 2024 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants