stylus / nib

Stylus mixins, utilities, components, and gradient image generation
http://stylus.github.io/nib
MIT License
1.9k stars 250 forks source link

Disable erasing old CSS properties #300

Open Vargentum opened 9 years ago

Vargentum commented 9 years ago

Can I disable erasing display: -webkit-box from output css? I'm using it for pure CSS multiline ellipsis. http://codepen.io/anon/pen/NPYzgw

rossPatton commented 9 years ago

I use stylus with autoprefixer, which handles this. Try that?

To be more helpful, because I might have rushed that comment, here is what I use for my line-clamp mixin, with nib and autoprefixer, and it works fine:

line-clamp( $lines, $your-line-height )
    /* autoprefixer: off */
    -webkit-box-orient vertical
    display -webkit-box
    overflow hidden
    text-overflow ellipsis
    -webkit-line-clamp $lines
    max-height $lines * $your-line-height + 2