Open igitur opened 6 years ago
But if your minimal CSS needs something like body { font-family: 'Lato Regular'}
how is it supposed to know what the font is?
Not sure I understand your question, but if the CSS needs the font, then it shouldn't be removed. Only unused fonts should be removed.
Right, so to know the answer to that you'd need to open each selector block and look for font-family: 'Lato'
right?
I think so. However, I don't know the CSS spec well enough to be aware of all uses of @font-face
.
My new Node based tool (will soon) support this: https://github.com/peterbe/minimalcss/issues/55
It's also based on a proper CSS parser whereas mincss
depends on regular expressions.
Am I right that this should be fixed by https://github.com/peterbe/minimalcss/commit/5672b7b90f24e4f2ecd94df000585c6a6091e239 ?
@igitur indeed!
Sidenote, how do I get mincss to print its version? One would expect something like mincss --version
.
Yeah, I would expect that too :) Maybe next time https://github.com/peterbe/mincss/commit/715a48fbdaaa180fe8cb795716345c2b71e65426
Hi
Great tool. It works great except that it doesn't remove unused CSS items, e.g.
As you can see, the font data is encoded and embedded, which makes the spreadsheets massive (blame https://github.com/grammarly !).