Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

A simple example...

    // Less
    .rounded-corners (@radius: 5px) {
        -webkit-border-radius: @radius;
        -moz-border-radius: @radius;
        -ms-border-radius: @radius;
        -o-border-radius: @radius;
        border-radius: @radius;
    }

    // Sass + Compass
    .rounded-corners {
        // All vendor prefixes are generated for you
        @include border-radius(5px); 
    }
I'm sure there are plugins for Less that can accomplish the same. I just grabbed this code from the Less homepage.

Another thing... Sass has much nicer control flow (if/else, while, for) that can create very powerful mixins.



Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: