less / less.ruby

Less Ruby — now at http://github.com/cowboyd/less.rb
Apache License 2.0
956 stars 69 forks source link

Creating own rules [sugar] #213

Closed dangreen closed 10 years ago

dangreen commented 11 years ago

What about this feature? Example:

@rule box(@width, @height: @width) { // or ?box(@width, @height: @width)
    width: @width;
    height: @height;
}
// usage
.block { box: 10px } // width: 10px; height: 10px;
.search { box: 100px 10px } // width: 100px; height: 10px;
lukeapage commented 11 years ago

did you mean to add this bug here https://github.com/less/less.js/issues ?

also I think this is a duplicate I'm sure I've seen almost the same suggestion there.. probably from you?