Comments (3)
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.
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.
Agreed: scheme
it is!
from react.
Related Issues (20)
- Sub-component pattern cause error when used in React Server Components HOT 1
- Get ActionBar axe clean
- Type checking is too slow HOT 3
- Clean up custom element styled class names
- Underline nav: Doesn't work well on the smallest breakpoints HOT 11
- Release Tracking
- Setting `required` to `input` element within `TextInput` HOT 2
- TypeError: CSS.supports is not a function when running Jest tests HOT 2
- Active `NavList.Item` is incorrectly missing bold styling HOT 4
- The theme object inflates bundle size. HOT 1
- Release Tracking
- The `useAnchoredPosition` hook returns generic refs for Element, which always requires a type assertion by the user
- TreeView: Remove aria-describedby when leading and trailing visuals do not exist HOT 2
- Does the Primer Design System have card components or similar card-like components? HOT 1
- Release Tracking HOT 1
- TreeView: Add support for external styling HOT 3
- TexInput `onClick` focus behavior broken with `type=date` on Safari
- `Dialog` should allow wrapping content, header, and footer (for example in `Suspense` or some context) HOT 1
- Utils should be exported
- Tests: Remove redundant ThemeProvider from tests
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 react.