tj / styl

Flexible and fast modular CSS preprocessor built on top of Rework
530 stars 21 forks source link

Class inheritance by reference #33

Closed devnoname120 closed 10 years ago

devnoname120 commented 10 years ago

This would be great to be able to inherit from a class by referencing it.

Example:

.class1
    display: inline-block
    margin: 10px
    float: left
    font-size: 0.8em
.class2
    .class1
    margin: 20px

Here, if I use class2, it would do the same as class1, but with a margin of 20px.

For example, LESS is able to do it.

vendethiel commented 10 years ago

You can use rework-inherit (which is included by default)

devnoname120 commented 10 years ago

Oh never mind, then. Thank you for the tip!