Something like (contrived LESS example):
.bg() {
background: (@arguments);
}
#blah{
.background(red, url('blah'))
.background(blue)
}
Cheers
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This does work in LESSCSS, but you have 2 errors in your code. First, missing semicolons for statement terminators. Second, you defined a .bg() mixin but tried to reference it as .background(). Try this:
The output is exactly like you would expect:
You can run code samples to see if and how things like this compile in LESS CSS using my LESS javascript-based converter (files on GitHub), or just follow the LESSCSS client-side usage instructions to see it working on your own pages.