首页 > 移动平台 > 详细

多行文本省略号样式丢失,以及控制台显示autoprefixer警告'Autoprefixer applies control comment to whole block, not to next rules.'

时间:2019-01-22 10:11:42      阅读:786      评论:0      收藏:0      [点我收藏+]
  • 问题现象

    ??使用webpack压缩打包vue项目,遇到一个问题,文本多行显示省略号的关键css语句-webkit-box-orient: vertical;莫名其妙丢失失效了。查阅资料,有不少人提出在改样式前后添加注释(后处理程序):
/*! autoprefixer: off */
  -webkit-box-orient: vertical;
  /* autoprefixer: on */

??再次打包,发现样式恢复正常。然后控制台却多出一条警告:‘(Emitted value instead of an instance of Error) autoprefixer: \static\css\reset\index.css:99:3: Second Autoprefixer control comment was ignored. Autoprefixer applies control comment to whole block, not to next rules.’,这对于强迫症来说是极其难受的。

  • 原因

    ??正如警告中所说,以上的css处理语句控制的应该是整个css块,而不是在此之后的css。
  • 处理

    ??将此处修改为:
/* autoprefixer: ignore next */
-webkit-box-orient: vertical;

??恢复正常。

多行文本省略号样式丢失,以及控制台显示autoprefixer警告'Autoprefixer applies control comment to whole block, not to next rules.'

原文:https://www.cnblogs.com/yangguojin/p/10301981.html

(0)
(2)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!