-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Style Engine: add margin support to frontend #39790
Conversation
Size Change: +65 B (0%) Total Size: 1.21 MB
ℹ️ View Unchanged
|
Fixing JS tests.... 😄 |
Fixing unit tests
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.
Thanks for following-up on the JS side of things @ramonjd! Works well in the editor and site editor with content that already has padding / margin set, and with freshly created blocks, and the order of the inline styles matches what's on trunk
.
LGTM!
What? 🙈
This PR adds margin to the list of supported Style Engine-parsed styles.
Why? 🙉
Given that it has similar values to padding, that is string and box model side values, and that the pending backend PR deals with both padding and margin, it seems like a non-controversial addition.
How? 🙊
Following how we added padding in the initial JS version of the Style Engine.
Testing Instructions
Test in both the site and block editors:
Adjust the margin of an individual block (e.g. Group). Check that the editor and frontends appear correctly and that the right inline styles are added to the block element.
Run
npm run test-unit packages/style-engine/src/test/index.js
for glory!Run
npm run test-unit packages/edit-site/src/components/global-styles/test/use-global-styles-output.js
for more glory!Screenshots or screencast