leafo / lessphp

LESS compiler written in PHP
http://leafo.net/lessphp
Other
2.2k stars 531 forks source link

@import helpers #441

Open alexpts opened 11 years ago

alexpts commented 11 years ago

File helpers.less .underline { border-bottom: 1px solid green }

File B.less @import "helpers.less"

div { .underline; }


Current result: .underline { border-bottom: 1px solid green } div { border-bottom: 1px solid green }


Need result: div { border-bottom: 1px solid green }

pafnuty commented 11 years ago

Use

.underline (@arguments = 1px solid green ) { border-bottom: @arguments; }
fritjofbohm commented 11 years ago

Or just use

.underline() { border-bottom: 1px solid green }

if you don't need arguments.

Nilard commented 10 years ago

It is not always possible to change classes in imported file. This feature is very useful. Is it possible to add something like that: http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#partials ?