csstools / postcss-font-magician

Magically generate all the @font-face rules
Other
1k stars 31 forks source link

Option to ignore #69

Closed Antonio-Laguna closed 7 months ago

Antonio-Laguna commented 5 years ago

Hi @jonathantneal !

Awesome plugin here. We've been using for a long time. We had a custom system that had a whitelist to only use this plugin on some given files. However we're trying to switch to webpack now and this is no longer an option.

I was wondering if you'd be interested in a PR that adds support for some sort of flag to ignore. Similar to https://github.com/postcss/autoprefixer#control-comments. Idea behind it is that we can have several targets and as much as you try to avoid using a font-family (since you could just add a class to apply) you could run into the issue with pseudo elements. So we'd have the same definition on several files.

We have already a "common" which is loaded into every page which should have the fonts on it. Then specific CSS by page which is not to be affected by the magic.

Does that sound ok?