-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
refactor(ivy): abstract all styling-related compiler logic into a shared class #27043
Conversation
You can preview 98d3dba at https://pr27043-98d3dba.ngbuilds.io/. |
case 'list-style-image': | ||
return true; | ||
} | ||
return false; |
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.
This minifies better and I think it's more performant too:
return prop === 'background-image'
|| prop === 'background'
|| prop === 'border-image'
|| prop === 'filter'
|| prop === 'filter'
|| prop === 'list-style'
|| prop === 'list-style-image';
P.S.: If you don't use triple equals it minifies even better. You can safely ignore any linting rule just for this block.
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.
Excellent. Thank you.
}).toLowerCase(); | ||
function isStyleSanitizable(prop: string): boolean { | ||
return prop === 'background-image' || prop === 'background' || prop === 'border-image' || | ||
prop === 'filter' || prop === 'filter' || prop === 'list-style' || |
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.
filter
check is repeated
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.
ahhhhh :(
You can preview 0ff832d at https://pr27043-0ff832d.ngbuilds.io/. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
No description provided.