Taro: -webkit-box-orient: vertical; 这个样式编译之后会被过滤掉

Created on 16 Mar 2020  ·  8Comments  ·  Source: NervJS/taro

我的样式是这样的,用来做多行省略号的,但是-webkit-box-orient: vertical;编译成小程序和h5之后这个样式就不见了,cli版本是2.0.6,我隐约记得之前的可能1.几的版本是可以使用省略号的,但是最近的版本就一直不行了。

&--2 {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    -webkit-line-clamp: 2;
  }

Most helpful comment

经测试后发现是webpage的编译问题,按照下面的写法就能正常编译

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

All 8 comments

CC @luckyadam

欢迎提交 Issue~

如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏

如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。

Good luck and happy coding~

经测试后发现是webpage的编译问题,按照下面的写法就能正常编译

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

感谢

其实可以手动添加更高版本的 autoprefixer 依赖。

其实可以手动添加更高版本的 autoprefixer 依赖。

请问怎么升级

其实可以手动添加更高版本的 autoprefixer 依赖。

请问怎么升级

package.json

其实可以手动添加更高版本的 autoprefixer 依赖。

请问怎么升级

package.json

自己在项目中手动安装最新版本的 autoprefixer 并不生效,编译的时候还是用的 cli 内部自己的 autoprefixer 版本,还是得用注释的形式去 hack

Was this page helpful?
0 / 5 - 0 ratings