[v4] Splitting the --value([*])
along the separator and get the nth element by --value
or whatever new function
#16781
Replies: 1 comment
-
I already had a similar idea. The following came to my mind:
A perfect application scenario would be fluid typography. Which I sorely miss in Tailwind v4. Example:
Without the use of CSS variables, it looks like this:
And after editing with Lightning CSS, the final CSS looks like this:
@adamwathan Wouldn't that be something that could be integrated? It is important that you really do the whole thing without CSS variables. This is the only way Lightning CSS can fully utilise its strengths and simplify the mathematical calculations with CSS. To realise this, I am currently working with theme(). For example, I don't understand why you need CSS variables for padding, margin etc.. If you pass a calculation to Lightning CSS, the final CSS with the actual final calculation value is much shorter. That's the way it is now:
It would be better if it was:
And final after Lightning CSS it would look like this:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I see that currently there is no way to extract just a specific value from the result of the
--value([*])
function. Is there a possibility for such an implementation in the future?@utility
that takes several arbitrary valuesHere, for the purpose of the request/idea, it is irrelevant whether
40%_at_50%_50%
works, as my answer shows. The idea is based on the fact that we should be able to query any element along a given (currently space) separator, in any form.Beta Was this translation helpful? Give feedback.
All reactions