ai / autoprefixer-core

autoprefixer-core was depreacted, use autoprefixer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Not possible to use -webkit-line-clamp

nabaroa opened this issue · comments

Is imposible to use -webkit-line-clamp property because the autoprefixer removes 'display: -webkit-box'.

.foo {
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
}

First, why you use only -webkit- prefixes in your CSS? It is a very bad practice. You should write unprefixed versions like display: flex.

Second, I tried to input

.foo {
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
}

to interactive demo and I got

.foo {
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
}

So seems like Autoprefixer do not remove anything.

What tools you also use? Or what output you have?

Yes, I know that is a bad practice but I'm using fallbacks to other browsers.
I want to use this weird webKit flexbox way: http://dropshado.ws/post/1015351370/webkit-line-clamp and doesn´t work with standard display: flex.
I'm using gulp-autoprefixer in the gulpfile and the output I get is:
.foo{
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
}
The autoprefixer is removing 'display: -webkit-box;'.
I understand that is a stilted and non standard solution and you are creating useful standard tools.

Thanks for your prompt response

@nabaroa Show your build code.

What version of Autoprefixer you use and what is your browser options for it?

Sure! I'm using too restrictive browser options. I've changed them and is working perfectly. Thank you for your help. <3