-
Notifications
You must be signed in to change notification settings - Fork 85
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
audit/KAD-4008 #646
audit/KAD-4008 #646
Conversation
This adds the em/rem sizes to the icon border and border radius. It also updates the .5 step to .1 for the stroke width. |
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.
As you mentioned in Jira, this doesn't work for number and image media styles in the editor. We'll want to update this PR to support these media styles in the editor too.
I appears to be working fine across all media styles on the front end.
Image Border now uses em/rem Image Border Radius now uses em/rem Number Size now uses em/rem Number Border uses em/rem Number Border Radius uses em/rem Fixed an issue where the numbers didn’t show in frontend. |
I removed the changes to the save.js file and made a new ticket for that particular problem. Also, I updated the checks for the mediaIcon[0].borderRadiusUnit for the max attribute in some of the settings as we discussed. The ?. operator returns undefined if the value isn't there. In this case, if the value is undefined, the max needs to be for a pixel value. So, if it is undefined (because it didn't exist before the update) the max should be the pixel value instead of the EM/REM value. In other places, I used the ?? operator, so I think these changes should avoid runtime errors and still provide a truthy response for backward compatibility. If a user has already set a size before the update, they should still be able to update the slide without running into a problem where the max value is 12px. |
🎫 #[Jira Ticket]
https://stellarwp.atlassian.net/browse/KAD-4008
...
Checklist
Block specific checklist (where relevant)