Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add whitelist/blacklist for CSS properties #39

Closed
henryruhs opened this issue Aug 11, 2018 · 2 comments
Closed

Add whitelist/blacklist for CSS properties #39

henryruhs opened this issue Aug 11, 2018 · 2 comments
Assignees

Comments

@henryruhs
Copy link

henryruhs commented Aug 11, 2018

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!

@henryruhs henryruhs changed the title Add option whitelist for CSS properties Add option whitelist/blacklist for CSS properties Aug 11, 2018
@henryruhs henryruhs changed the title Add option whitelist/blacklist for CSS properties Add whitelist/blacklist for CSS properties Aug 11, 2018
@vkalinichev vkalinichev self-assigned this Feb 18, 2020
@vkalinichev
Copy link
Owner

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!

@miladmeidanshahi
Copy link

@vkalinichev what about CSS files?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants