-
-
Notifications
You must be signed in to change notification settings - Fork 247
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
Allows preserving children from whitelistPatterns #58
Conversation
Thanks for the PR. whitelistPatterns: [
{
pattern: /^double-class$/,
keepChildren: true
}
] I think it would be better to have a different property for whitelist patterns. whitelistPatterns: [
{
pattern: /^single-class$/,
keepChildren: true
},
{
pattern: /^double-class$/,
keepChildren: true
},
{
pattern: /^triple-class$/,
keepChildren: false
},
{
pattern: /^quadruple-class$/,
keepChildren: false
},
{
pattern: /^quintuple-class$/,
keepChildren: true
},
] vs whitelistPatterns: [/^triple-class$/, /^quadruple-class$/],
whitelistPatternsChildren: [/^single-class$/, /^double-class$/, /^quintuple-class$/] @cmizzi @jsnanigans, what do you think about this? I'm not sure |
Great idea. But, what happen if both contain same value ? We need a priority manager. First, we should manage |
In my opinion, the priority should go to the most conservative option. WhitelistPattersChildren will conserve children selectors. If case of a misconfiguration, giving priority to this option will not remove wanted css and break the application style. |
I've applied changes. Now, a |
add whitelistPatternsChildren to typescript definition file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks for the PR. The option is now available with v0.21.0 |
Thank you for this PR! Looking forward to trying it out :) |
Proposed changes
Related to #39
Types of changes
whitelistPatterns
object instead ofRegExp
in order to resolve akeepChildren
option to preserveleft to right
readerChecklist
Flow
is working as well