Comments (2)
Yeah, the button colors went through many iterations recently:
- Component refresh (pre color modes)
- Color modes V1
- Color modes V2
So it might be a good idea to take a closer look at the button colors to see if they can be improved or aligned to the system more.
With this issue, I wonder if it possible to either
- Get rid of the
btn
component colors and directly use functional color variables. OR- Make the
btn
component colors robust and work for all scenarios.
Maybe it needs to be a combination of both. Especially for the btn.primary
it was hard to use functional/global variables because these "green" buttons became somewhat iconic and almost part of the GitHub brand. And at the same time they need to be accessible which is harder to do with green. /cc @auareyou
Another tricky part is that for things like hover/active/selected states, the difference should be minimal compared to the default state. And using functional/global variables might not work for these cases because the difference is too big. I think @mperrotti brought up a similar issue when working on the states for ActionList
?
So currently color functions like darken()
are used to get a new color that is just a tiny bit different. Using alpha()
would be another alternative.
So yeah, we could see if any of the functional/global variables would work, but my guess is that we still need a few colors specific to buttons and all their different states.
from primitives.
This came up in primer/view_components#1712. A nested Counter
in dark_high_contrast
has low contrast:
Possible options for dark_high_contrast
:
- Either add a new
--color-btn-counter-fg
variable that is light - Or updating
--color-btn-counter-bg
to be light
from primitives.
Related Issues (20)
- Update repo structure HOT 3
- Move to json5 for token source files. HOT 1
- [Token update]: Shadows HOT 14
- Remove `mktg` colors from primer HOT 5
- Cleanup / re-structuring of color tokens HOT 4
- How to deal with hover and selected component colors HOT 6
- Discourage usage file for stylelint
- Create color a11y check file from tokens
- Format script is very unhelpful and not the same as lint HOT 3
- Validation for token files HOT 4
- Eslint json5 HOT 1
- Move size and type build steps to new build flow
- Add json/docs to new build workflow
- Define a code styleguide to have more consistent code.
- Improve DX with automated linting HOT 2
- Move to npm
- [ESLINT]: Separate eslint for docs/ folder HOT 1
- consider to generate `sass variables` format. HOT 2
- Colors not accessible to people with color blindness HOT 1
- Add tests for token schemas
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from primitives.