Overall system mixin strategy
See original GitHub issueOpening 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:
- Box has
bg
but Flex doesn’t - Flex has
top/bottom
but notleft/right
- Typography supports
as
aliased aselement
but nothing else does
A good first step I think would be to move the flex mixin into Box
, and then have Flex
just become Box
with display: flex
as default.
Additionally I’d be interested in what is required to support as
universally on our primitive elements.
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
Introduction to Mixins Understanding Mixin Architecture - GitHub
Mixin is a trait/mixin and bytecode weaving framework for Java using ASM ... this presence in the class's overall external appearance.
Read more >1. Beautiful Mixins - Beautiful JavaScript [Book] - O'Reilly
Traditionally, a mixin is a class that defines a set of functions that would otherwise be defined by a concrete entity (a person,...
Read more >Kevin Dew — A Cleaner Backbone Mixin Strategy
This approach only works in a hierarchical system (and even then is a bit flaky) and if we apply that to mixins then...
Read more >Strategy VS Mixin (additional article) -- dynamically mixing ...
During runtime, The Quackable interface is dynamically mixed into the QuackModule by enabling Mallard Duck to dynamically implement the ...
Read more >A fresh look at JavaScript Mixins
However delegation is so convenient that sometimes it actually works against structural discipline in your code; moreover the syntax can get a ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
https://styled-system.com/guides/migrating/
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.