Article From:https://segmentfault.com/q/1010000009360389
Question:
 // -webkit-box-orient: vertical!important;
overflow: hidden;
-webkit-line-clamp: 2;
height: .72rem;
line-height: .36rem;
display: -webkit-box;

These properties are used to handle multi line text overflow, but now webpack is compiled.
-webkit-box-orient: verticalChecking element style does not have this property.
Several other attributes are available. Now only put this attribute into the inline style. I’m using scss.
I hope the experts will answer why.

Answer 0:

The solution is as follows

 /* autoprefixer: off */
  -webkit-box-orient: vertical; // Reference https://github.com/postcss/autoprefixer/issues/776/ * autoprefixer: on * /

Answer 1:

optimize-css-assets-webpack-pluginThe problem of this plug-in

Annotatewebpack.prod.conf.jsThe code below

new OptimizeCSSPlugin({
  cssProcessorOptions: config.build.productionSourceMap
    ? { safe: true, map: { inline: false } }
    : { safe: true }
}),

Reference resources
https://github.com/ben-eb/css…

Answer 2:

In less, it will still be deleted. It took a long time to find the reason.
/*! autoprefixer: off */
-webkit-box-orient: vertical;
/* autoprefixer: on */

Answer 3:

I also encountered this problem, good pit.

Answer 4:

As bylh said, the style code is changed to the following.

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

Answer 5:

Why can’t I write this way?

Answer 6:

// eslint-disable-next-line
/* autoprefixer: off */
-webkit-box-orient: vertical;
/* autoprefixer: on */

You need to write like this, and you will report wrong if you don’t write the first sentence.

Answer 7:

Learn. More useful

Answer 8:

I started trying the first floor, but I didn’t know why it didn’t work here. Then try the 2 floor method, then repack it, it works. But I still feel a little confused. Why?

Answer 9:

1It’s okay to compile the building like this, but it’s still missing after packaging. I haven’t installed this plug-in on the second floor.

Answer 10:

Update webpack

Answer 11:

You can refer to this link upstairs.

Leave a Reply

Your email address will not be published. Required fields are marked *