Replies: 2 comments
|
I got your idea. However, it is complicated. Duplicate tokens are necessary for multiple variables. Perhaps syntax sugar is needed. Here is the example: <div
tg-name="opacity, move"
tg-from:@fromDemo
tg-to:@toDemo
>
<span>Hello World</span>
</div>
<tg-template id="fromDemo">
{
opacity: 0,
move:-200
}
</tg-template>
<tg-template id="toDemo">
{
opacity: 1,
move:200
}
</tg-template>
span {
transform: translate(var(--move) * 1px);
opacity: var(--opacity);
} |
0 replies
|
Thanks for your suggestion, however I think the syntax is quite difficult and not straightforward. Maybe we will have this template syntax in the future, but for now, I would rather suggest to have a designer-friendly syntax. |
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.
Usually, we want to update several CSS properties in one go. For now, we have to wrap a few elements to archive this, for example, if we want to fade in an element and move it:
To make it simple, I would like to change to:
Please feel free to comment, thank you.
All reactions