Replies: 1 comment
-
|
Sounds good to me! Thanks for the detailed proposal. I'd only suggest to change the naming to |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello! Following up on the resolved inheritance issue (#48), I'd like to propose adding optional inheritance specifically for base styles. This would complement the existing variant inheritance functionality.
The Problem
Currently, when a component inherits from another component, the base styles don't get inherited. This makes it challenging when you want to build on top of a parent component's base styles rather than completely replacing them.
For example:
In this case,
IconButtonloses the padding and rounded corners fromButtonwhen it might want to keep them while adding flexbox utilities.Proposed Solution
I'd like to propose adding optional base style inheritance that works similarly to how variant inheritance already works. Here's how it could work:
base { }(styles get concatenated)base(inherit: false) { }Example usage:
Implementation Approach
I've tested this with a monkey patch that shows the basic concept. The official implementation could follow a similar pattern but with proper integration into the existing inheritance system:
Benefits
Questions for Discussion
Related Issues
/cc @palkan
Beta Was this translation helpful? Give feedback.
All reactions