Open track0x1 opened 6 years ago
:+1: We should mimic what eslint does, https://eslint.org/docs/user-guide/configuring#disabling-rules-with-inline-comments. PR welcome!
// eslint-disable
// eslint-enable
// eslint-disable-line
// eslint-disable-next-line
Btw, there is https://github.com/MadLittleMods/postcss-increase-specificity/pull/16 but it is stale and I prefer this inline comment solution
Looking for this as well. @MadLittleMods your plugin is really gold as it helps to gradually transfer our huge client from the legacy stuff (Angular/Grunt) to the modern one (Vue/webpack). The only thing I'm really looking forward to is the possibility to ignore specific parts of CSS processed with postcss-increase-specificity
. For example, we have a PostCSS file which contains some global tweaks to merge old styles with new styles, and specificity should not be added here. And postcss-plugin-context
is not an option here as well because it would be an overkill to add @context
in each Vue file. So ignore comments are the best option here. Thanks!
Any updates ?
@mihaisavezi No update. This issue is the best place to track but you could also check out the changelog: https://github.com/MadLittleMods/postcss-increase-specificity/blob/master/CHANGELOG.md
No worries managed to find a fix for my case. Doesn't apply to evenfrosts case. I use postcss-use
to apply the plugin to only a specific part of the stylesheets.
To ignore part of the stylesheets with a comment you can try looking at postcss-safeimportant
they support this, for a sample implementation
IMHO such a thing should be added to PostCSS itself.
Potentially using something like
/* postcss-increase-specificity disable-line */
or/* postcss-increase-specificity disable */
/* postcss-increase-specificity enable */