Remove hardcoded colors from the components styles and use less variables instead
See original GitHub issue- I have searched the issues of this repository and believe that this is not a duplicate.
What problem does this feature solve?
It would help leverage Ant Design’s theming capabilities.
For instance, creating a dark themed application using Ant Design is currently impossible without a few hacks, since many components redefine colors that go well with a light theme.
It would become easy.
What does the proposed API look like?
The API wouldn’t change.
The change is internal, it would consist in removing all colors definitions from the components less files and use variables instead:
For instance, background-color: #fff would become background-color: @component-background
(or equivalent).
If you agree with my point and would like a hand, I am happy to open a PR.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:9
- Comments:9 (1 by maintainers)
Top Results From Across the Web
[OutSystems UI Web Style Guide Preview] Remove hard ...
[OutSystems UI Web Style Guide Preview] Remove hard-coded values of css variables from colors, typography, spaces, borders. Question.
Read more >CSS Variables for React Devs - Josh W Comeau
CSS Variables are *really* cool, and they're incredibly powerful when it comes to React! This tutorial shows how we can use them with...
Read more >React - How to replace the hover color of an Ant-Design ...
I use CSS variables instead of LESS variables because the LESS variables are hardcoded after the compilation and cannot be changed. I succeed...
Read more >Retrofitting Theming Into A Legacy App Using LESS CSS And ...
Ben Nadel shares his approach for retrofitting a legacy application with CSS theming using CSS custom properties and LESS CSS variables.
Read more >The Power of Composition with CSS Variables
Duplicate styles, no CSS variables, hardcoded colors, you name it! ... reading Use CSS variable instead of React Context from Kent C Dodds....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Nouzbe You can send the PR~
@afc163 has rewarded $184.80 to @amedora. See it on IssueHunt