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

I can't understand how works this code #970

Closed
Pestov opened this issue Oct 5, 2012 · 9 comments
Closed

I can't understand how works this code #970

Pestov opened this issue Oct 5, 2012 · 9 comments

Comments

@Pestov
Copy link

Pestov commented Oct 5, 2012

.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?

@px
Copy link

px commented Oct 5, 2012

sigh. not that you meant it, but @spam

@Pestov
Copy link
Author

Pestov commented Oct 8, 2012

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.

@px
Copy link

px commented Oct 8, 2012

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.

@lukeapage
Copy link
Member

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

@lukeapage
Copy link
Member

to answer your question I'd need to have a go with your example and see if I can reproduce. haven't had time.

@Pestov
Copy link
Author

Pestov commented Oct 11, 2012

Update issue

@lukeapage
Copy link
Member

ah I understand now. This bug is a duplicate.. see #946.. There is a lot of discussion about this

Do you agree?

@Pestov
Copy link
Author

Pestov commented Oct 22, 2012

Sorry, but my english is bad. I understand, that as a result, in LESS all work logically correct and can not be otherwise?

@lukeapage
Copy link
Member

closing as duplicate

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

No branches or pull requests

3 participants