-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Overall system mixin strategy #704
Comments
I fully endorse this. Some history around Palette is that when @zephraph and I first got it off the ground, it was patched into a flury other first-ever tasks, such as our new ssr relay pages and architecture. It was also a gamble that Katarina helped us advocate for with considerable risk. Since then, things have been non-stop for the both of us. I think now with you on board we're in a good place to revisit what we've done and make it sturdy, as well as cleanup. For example:
The history of this is someone was using flex, needed top, and opened a quick PR to add it. Same with bottom. So far no one has needed left or right, until you stumbled upon it. All of this is ripe for cleanup. |
While I agree with the direction I firmly believe we shouldn’t do it on the current version of styled-systems. We desperately need to upgrade. The latest version of styled-system has a drastically reduced set of helpers that makes concerted effort towards providing consistent props a relatively trivial matter. I know it’s gonna be hell to upgrade, but we really should. Take a look at my WIP pr. I’ll try to get back around to that next week. |
I've also tried to upgrade but found our |
Interesting, something to do with us using unitless values in the theme? Could convert them to px and then have the space function do the parseInt? (I'm taking a look at this now as well) |
https://styled-system.com/guides/migrating/
|
I believe so, since this was a major breaking change. The other issue i ran into was Also, we use a Other than those things, I was able to rough things in, minus some test / type issues (which i think are less relevant now that we have |
We should definitely try that. Afraid it’ll break places where we explicitly add pixels in our code (definitely a thing), but those would be easier to find and fix. Let’s just make sure it doesn’t break Eigen |
Context for this:
When @zephraph and I paired on adding that prop to typography, there was weirdness with using a prop named It would definitely be great to remove that band-aid, but just a heads up that if someone makes an attempt, watch out for something like |
Opening this to get consensus on how to proceed.
It feels to me like the overall design of what system props are available on which components is unintuitive — but it's also possible I don't have a good mental model of the overall strategy with regard to primitives.
Here's some of the things that bit me in the past hour:
bg
but Flex doesn'ttop/bottom
but notleft/right
as
aliased aselement
but nothing else doesA good first step I think would be to move the flex mixin into
Box
, and then haveFlex
just becomeBox
withdisplay: flex
as default.Additionally I'd be interested in what is required to support
as
universally on our primitive elements.The text was updated successfully, but these errors were encountered: