Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Attribute -webkit-box-orient in css not working when build in vuejs?

I use attribute -webkit-box-orient normal when local. But when i build to web by npm run build, then attribute not working and appear in devtools. How to apply this attribute?

I have tried:

.ellipsis {
    /* autoprefixer: ignore next */
    -webkit-box-orient: vertical;
    display: block;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
}

and

.ellipsis {
    /* autoprefixer: off */
    -webkit-box-orient: vertical;
    /* autoprefixer: on */
    display: block;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
}

but when build, similar situation happened?

Anyone recommend solution for me? Many thanks.

like image 772
cuongdevjs Avatar asked Mar 05 '23 00:03

cuongdevjs


1 Answers

This was a hard one. My friend found this page https://blog.csdn.net/niesiyuan000/article/details/79301492

/*! autoprefixer: off */
  -webkit-box-orient: vertical;
  /* autoprefixer: on */

seems to do the trick, if you don't want to change the configuration.

like image 141
Bud Anin- Aminof Avatar answered May 05 '23 08:05

Bud Anin- Aminof