Skip to content
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

variable evaluation in the CSS property #345

Closed
abernier opened this issue Aug 17, 2011 · 7 comments
Closed

variable evaluation in the CSS property #345

abernier opened this issue Aug 17, 2011 · 7 comments

Comments

@abernier
Copy link

Hi,

In order to allow this — see the initial question on stackoverflow:

.vendors(@prop, @val) {
    -moz-@prop:@val;
    -webkit-@prop:@val;
    -o-@prop:@val;
    -ms-@prop:@val;
    @prop:@val;
}

can you see any solution for the parser allows variable evaluation int the CSS property?

Thank you

@nicooprat
Copy link

Clever ! +1

@lunelson
Copy link

+1. I've also found myself wondering similar in other situations, whether a variable could be output as part of the property

@abernier
Copy link
Author

It's by default supported by stylus and it's called interpolation.

Could be a good addition to less ;)

@Heilemann
Copy link

+1. It's only natural, and would save a lot of doubling up in complex systems.

@Heilemann
Copy link

This is actually a duplicate issue of #36, which has a longer discussion on the subject.

@lunelson
Copy link

The developer at Stylus is facing almost the opposite question: in Stylus, interpolation is currently used only in the property and not in the value. Many users over there are also asking for wider support too.

I can't imagine why both LESS and Stylus shouldn't be able to implement interpolation in all circumstances...

@lukeapage
Copy link
Member

Closing as a duplicate of #36

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants