-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
Computed styles for nested structures #20
Comments
That is also something I'm considering, but I currently think that limiting computed styles to single attributes is also really good in terms of how it make you shape your components. Handing big blocks of styling to computed styles would also mean these would rely on runtime styling, and this is not the state of mind Pinceau is trying to promote. Yet, this is definitely something I could be implementing. |
Maybe we can design an enhanced property. Say $computed to render multiple css properties
|
I would prefer this syntax:
I think I can implement that, but I'm just afraid of potential side-effects right now. Also, I'm afraid it'll be misunderstood as a great way to apply style on groups of styles, while this ain't the case, variants are made for that. 😬 |
What are the potential side effects? |
I also think this approach can be a bit confusing,
With $comouted, developers may be able to visually display which css styles are dynamic and which are static
because there are usually some fixed css styles such as display white-sapce common css properties. |
for example
A basic button component will change the style for the different options in the Button module, as shown in the image below
The hover state of each variant may change one or both of button's css properties, and computed systems currently support only one property and I prefer the following representation
Can we implement this method, I tried to change the source code. It turns out that using v-bind in vue also seems to support only individual attributes and not objects
The text was updated successfully, but these errors were encountered: