You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to implement additional guards, which could be used for matching against the value as a string literal. For example:
.background(@value) when (ismatch(@value, "\.svg$")) {
background-size: 64px;
}
.background(@value) when (ismatch(@value, "@2x")) {
background-size: floor(image-width(@value) / 2);
}
Seems the function is quite easy to add to Less, I found the code for other guards right away. What are your thoughts, does something like this have a chance to be included in the master branch? Any comments regarding implementation details?
The text was updated successfully, but these errors were encountered:
Implement this as a plugin. While it's not a big deal to feed the language with thousands of functions (yeah, they are cheap to implement) it's not always a good idea to make this just because it's possible.
It's all about use-cases, if there's enough interest it is always possible to move functions from a plugin to the core (after all it already has string replace function, so having corresponding find would not sound too artificial).
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I'd like to implement additional guards, which could be used for matching against the value as a string literal. For example:
Seems the function is quite easy to add to Less, I found the code for other guards right away. What are your thoughts, does something like this have a chance to be included in the master branch? Any comments regarding implementation details?
The text was updated successfully, but these errors were encountered: