小编Sha*_* KP的帖子

-webkit-box-orient:垂直; 在sass中没有编译成gulp

在sass文件中

h3 {
                overflow: hidden;
                text-overflow: ellipsis;
                display: -webkit-box;
                line-height: 24px; 
                max-height: 24px;
                -webkit-line-clamp: 1; 
                -webkit-box-orient: vertical;
            }
Run Code Online (Sandbox Code Playgroud)

运行gulp任务后,进入css为

 .article-list.search .article-listings__item h3 {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  line-height: 24px;
  max-height: 24px;
  -webkit-line-clamp: 1;
}
Run Code Online (Sandbox Code Playgroud)

-webkit-box-orient: vertical;css文件中缺少样式.

我编写的sass编译任务是

gulp.task('styles', function() {
  return sass('src/assets/stylesheets/index.scss', { style: 'expanded' })
    .pipe(autoprefixer('last 2 version'))
    .pipe(gulp.dest('dist/styles'))
    .pipe(rename({ suffix: '.min' }))
    .pipe(cleanCSS())
    .pipe(gulp.dest('dist/styles'))
    .pipe(notify({ message: 'Styles task complete' }));
});
Run Code Online (Sandbox Code Playgroud)

css sass gulp

3
推荐指数
2
解决办法
1475
查看次数

标签 统计

css ×1

gulp ×1

sass ×1