Add whitelist/blacklist for CSS properties
henryruhs opened this issue · comments
Henry Ruhs commented
Thank you very much for this great plugin.
In some cases this plugin is buggy, for the moment we can fix most of it using the ignore comments.
Another, more cleaner way from my point of view would be a whitelist/blacklist for CSS properties to be passed via the options. In other words: this plugin generates tons of RTL / LTR rules that we don't need so give us the power what RTL declarations should be generated.
Only process declarations that include margin-right
and border-right
:
require('postcss-rtl')({
whitelist: [
'margin-right',
'border-right'
]
});
Use the default preset but ignore padding
at all:
require('postcss-rtl')({
blacklist: [
'padding'
]
});
Do you need a helpful hand? Let me know!
Vladimir Kalinichev commented
Released in 1.7.0
:
blacklist
: the array of css properties which processing will be ignored
Example:['padding-left', 'padding-right']
whitelist
: the array of css properties which (and only them) will be processed
Example:['margin', 'border-color']
Thank you for proposal!
Milad commented
@vkalinichev what about CSS files?