uncss

uncss, regex pattern for .no-'string', .is-'string'

旧城冷巷雨未停 提交于 2019-12-11 23:27:38
问题 I'm having some regex woes. Using gulp-uncss I'd like to add some classes to the ignore option. Any class that starts with .no- Any class that contains .is- .no-flexbox {} .test.is-active {} .test .is-hidden {} .pipe(uncss({ html: ['tmp/public_html/*.html'], ignore: ['/(.is-)(\w)*', '(.no-)(\w)*'] })) This isn't quite right 回答1: Your regexes look incomplete. May be you should do like this .pipe(uncss({ html: ['tmp/public_html/*.html'], ignore: ['/\.no-\w+/g', '/\.\w+\s?\.is-\w+/g'] })) 来源:

Remove unwanted css Using uncss in Responsive sites

心不动则不痛 提交于 2019-12-11 20:23:22
问题 I have uncss (A project on github) to remove unwanted css for responsive site . It also removes the css mentioned in the mobile.css file , but which actually affects the site in mobile view . I don't have any idea how the uncss works ? i.e weather it simply removes the selectors which are not present in DOM or it removes the selectors which are not used in a particular view port only . 回答1: Media option is to rescue: options = { ... media : ['(min-width: 700px) handheld and (orientation:

uncss Error: C.UTF-8: not a valid language tag

故事扮演 提交于 2019-12-07 20:48:42
问题 Hi I am trying to use UNCSS to remove unused styles from CSS for the first time and I am getting the following error: Fontconfig warning: ignoring C.UTF-8: not a valid language tag /home/ubuntu/.nvm/v0.10.35/lib/node_modules/uncss/node_modules/bluebird/js/main/async.js:43 fn = function () { throw arg; }; ^ Error: Fontconfig warning: ignoring C.UTF-8: not a valid language tag at Socket.onStderr (/home/ubuntu/.nvm/v0.10.35/lib/node_modules/uncss/node_modules/phridge/lib/spawn.js:79:28) at

uncss Error: C.UTF-8: not a valid language tag

僤鯓⒐⒋嵵緔 提交于 2019-12-06 14:18:44
Hi I am trying to use UNCSS to remove unused styles from CSS for the first time and I am getting the following error: Fontconfig warning: ignoring C.UTF-8: not a valid language tag /home/ubuntu/.nvm/v0.10.35/lib/node_modules/uncss/node_modules/bluebird/js/main/async.js:43 fn = function () { throw arg; }; ^ Error: Fontconfig warning: ignoring C.UTF-8: not a valid language tag at Socket.onStderr (/home/ubuntu/.nvm/v0.10.35/lib/node_modules/uncss/node_modules/phridge/lib/spawn.js:79:28) at Socket.emit (events.js:117:20) at Socket.<anonymous> (_stream_readable.js:765:14) at Socket.emit (events.js