Lov*_*ess 0 html css wordpress twitter-bootstrap uncss
我想在我的一个大css文件中使用uncss,但这样做打破了我的引导程序导航的下拉列表.
这是工作部分:http://metalotechnika.com
以下是我使用unss的部分:http://metalotechnika.horyzon.de .
您会注意到下拉菜单无效.它是使用twitter bootstrap导航栏.
我的gulpfile部分看起来像这样:
gulp.task('uncss', function() {
return gulp.src('style.css')
.pipe(uncss({
html: ['uncss/uncss.html']
}))
.pipe(gulp.dest(''));
});
Run Code Online (Sandbox Code Playgroud)
即使我在这里选择了一个URL,它也会中断.我暂时禁用了生产站点上的缓存和css压缩,这样你就可以看看style.css中的重要区别,即获得"unss"的那个.
如何使用uncss减少我的CSS?为什么它会破坏,我该如何解决这个问题呢?
小智 9
将菜单使用的类添加到忽略列表中将如下所示:
gulp.task('uncss', function() {
return gulp.src('style.css')
.pipe(uncss({
html: ['uncss/uncss.html'],
ignore: [
".fade",
".fade.in",
".collapse",
".collapse.in",
".collapsing",
/\.open/
]
}))
.pipe(gulp.dest(''));
Run Code Online (Sandbox Code Playgroud)
});
从这个帖子:https://github.com/giakki/uncss/issues/64
您可以根据需要在列表中添加或删除类.
| 归档时间: |
|
| 查看次数: |
1038 次 |
| 最近记录: |