Git Product home page Git Product logo

Comments (2)

simurai avatar simurai commented on May 23, 2024

Yeah, the button colors went through many iterations recently:

  1. Component refresh (pre color modes)
  2. Color modes V1
  3. 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.

simurai avatar simurai commented on May 23, 2024

This came up in primer/view_components#1712. A nested Counter in dark_high_contrast has low contrast:

Screen Shot 2022-12-15 at 16 59 11

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.