I can't understand how works this code
.gradient (@gradientType, @direction, @color1, @point1, @color2, @point2) {}
.gradient (linear, @direction, @color1, @point1, @color2, @point2) {
background-image: linear-gradient(@direction, @color1 @point1, @color2 @point2);
background-image: -o-linear-gradient(@direction, @color1 @point1, @color2 @point2);
background-image: -moz-linear-gradient(@direction, @color1 @point1, @color2 @point2);
background-image: -webkit-linear-gradient(@direction, @color1 @point1, @color2 @point2);
background-image: -ms-linear-gradient(@direction, @color1 @point1, @color2 @point2);
}
.block {width: 100px; height: 100px; .gradient(linear, right, #000000, 10%, #fff, 70%); display: inline-block;}
<div class="block"></div>
It's work. But if i write
.border (@px, @solid, @color) {
border: @px, @solid, @color;
}
.block2 {width: 100px; height: 100px; .border(10px, solid, #000000); display: inline-block;}
<div class="block2"></div>
It's no work, i must write "border: @arguments". Why?
sigh. not that you meant it, but @spam
I am not understant. Why @spam? I write to example. In first example i am not declare variables and don't write @arguments, as a result work. Second example works if I specified @arguments. Why?
I want create gradient mixin, which will work in any case. But i am not programmer, i know html and css.
It's the commenting system on @github. It now supports @'ing people like @twitter. Due to the CSS Syntax of @px I get email notifications and references.
yes please give examples in code format, then notifications are not generated (note below.. no bold) - http://github.github.com/github-flavored-markdown/
e.g. 4 spaces before the code
@px
or in a sentence with backticks @px
to answer your question I'd need to have a go with your example and see if I can reproduce. haven't had time.
Update issue
ah I understand now. This bug is a duplicate.. see #946.. There is a lot of discussion about this
Do you agree?
Sorry, but my english is bad. I understand, that as a result, in LESS all work logically correct and can not be otherwise?
closing as duplicate