我正在使用Gulp CSSO整理WordPress中的CSS, 但是它删除了我的注释, 更具体地说, 它删除了主题元数据。有什么办法可以解决这个问题?也许在我运行CSSO之后插入主题元数据?
#1
csso文档页面说它将删除注释, 因为它们不影响渲染, 但是:
如果要保存注释, 则CSSO只能以第一个注释开头(以!开头)。
因此, 我认为你无法使用wordpress元数据格式保留评论。
为什么不先应用gulp-csso, 然后再使用gulp-header将元数据添加为前缀?
#2
实际上, 如果你使用!在单个注释声明的开头, 例如:
/*!
...Your Theme declaration here...
*/
WordPress将正确检测该声明, 而CSSO将保留该注释。
来源:
https://www.srcmini02.com/64918.html
微信公众号
手机浏览(小程序)
Warning: get_headers(): SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in
/mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line
57
Warning: get_headers(): Failed to enable crypto in
/mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line
57
Warning: get_headers(https://static.shanhubei.com/qrcode/qrcode_viewid_41166.jpg): failed to open stream: operation failed in
/mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line
57