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);
} |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
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.
Beta Was this translation helpful? Give feedback.
All reactions