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

Ability for button-like components to adapt text color in accordance to background #1295

Closed
Tracked by #1374
asvae opened this issue Dec 2, 2021 · 4 comments
Closed
Tracked by #1374
Assignees
Labels
feature Something useful to end user research Requires research
Milestone

Comments

@asvae
Copy link
Member

asvae commented Dec 2, 2021

  • Bonus points for manual assignment.
@asvae asvae added feature Something useful to end user team discussion Feedback wanted labels Dec 2, 2021
@kushich
Copy link
Member

kushich commented Dec 3, 2021

@asvae Maybe we should also keep text-color prop to override text-color even though we will use computed text color to handle edge cases. How do you think?

@asvae
Copy link
Member Author

asvae commented Jan 13, 2022

We want to support this for simplest cases:

  • I.e. when text-color is not set - we set it based on background. But in all other cases - we're not being too smart.
  • And it would choose between black and white color.

We also had an implementation somewhere,

@asvae asvae mentioned this issue Jan 13, 2022
58 tasks
@asvae asvae added groomed research Requires research labels Jan 13, 2022
@Derranion
Copy link
Member

Here are some recursive algorithms to implement this by checking parents background:
https://stackoverflow.com/questions/12576084/getting-the-real-background-color-of-an-element

@asvae asvae removed the groomed label Jun 8, 2022
@aluarius aluarius self-assigned this Jun 21, 2022
@aluarius aluarius removed their assignment Jun 21, 2022
@asvae asvae removed the team discussion Feedback wanted label Jun 30, 2022
@asvae asvae added this to the 1.5.0 milestone Jun 30, 2022
@m0ksem
Copy link
Collaborator

m0ksem commented Jul 5, 2022

I think it has been fixed here: #1729

@m0ksem m0ksem closed this as completed Jul 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Something useful to end user research Requires research
Projects
None yet
Development

No branches or pull requests

5 participants