GithubHelp home page GithubHelp logo

prop to describe color theme about react HOT 3 CLOSED

primer avatar primer commented on June 24, 2024
prop to describe color theme

from react.

Comments (3)

broccolini avatar broccolini commented on June 24, 2024 1

Here's a bunch of thoughts I have on this....

Currently styled-system uses bg for background color, and color for foreground. I prefer color over text since it can apply to more than just text (I know that's what we use now but I think this is a good chance to move away from it). It also matches the CSS property.

I think we should not use prop names that match utility props because that's confusing, and because often because we're applying a combination of colors.

Not sure how I feel about this yet but styled-system uses colors since it's applying multiple colors (see docs). I'm a tad worried folks would typo or mis-read, however it is easy to understand what it is. Theme works, however I agree that theme could be confusing and we probably want to reserve it for light/dark. colorScheme is not bad, though I'd prefer we keep prop names succinct so was considering if scheme is clear enough?

We can customize props in styled-system and use fg for foreground to avoid confusion with colors, however that's not the CSS property 😩. I know I know, neither is bg but it's such a common shorthand and at least uses one of the words from the CSS property 🙃.

Overall I prefer colors or scheme. As long as we don't use the same name as utility props like bg, I think we should just try something and get feedback when we have enough to test with - we can iterate :)

from react.

shawnbot avatar shawnbot commented on June 24, 2024

I'm wondering if we can get away with bg for some components, since that's clearly what it drives. I could see how it might be confusing, though, to be able to use bg="blue.1" for some components and bg="blue" for others, though.

What about even just color, which might map to a pairing of bg and text props for some components?

from react.

shawnbot avatar shawnbot commented on June 24, 2024

Agreed: scheme it is!

from react.

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.