Remove duplicate @font-face
See original GitHub issueI have a css file that contains the critical render css from throughout a website. It therefore contains a number of duplicate styles. Clean CSS does a great job at removing these however it doesn’t remove the @font-face rules. I’ve not been able to find any settings regarding and was wondering if you could help. The duplicate rule is as follows. Thanks
@font-face { font-family: 'FontAwesome'; src: url('fonts/fontawesome-webfont.eot?v=4.6.3'); src: url('fonts/fontawesome-webfont.eot?#iefix&v=4.6.3') format('embedded-opentype'),url('fonts/fontawesome-webfont.woff2?v=4.6.3') format('woff2'),url('fonts/fontawesome-webfont.woff?v=4.6.3') format('woff'),url('fonts/fontawesome-webfont.ttf?v=4.6.3') format('truetype'),url('fonts/fontawesome-webfont.svg?v=4.6.3#fontawesomeregular') format('svg'); font-weight: normal; font-style: normal; }
Issue Analytics
- State:
- Created 7 years ago
- Comments:6
Top GitHub Comments
It’s ready in master, due in 4.0 release.
It should be rather simple addition (famous last words), similar to de-duplication of media rules. I’d start with a failing test and this piece of code: https://github.com/jakubpawlowicz/clean-css/blob/master/lib/selectors/advanced.js#L59