-
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
Embed Block: Border support added #66386
base: trunk
Are you sure you want to change the base?
Changes from 8 commits
1398e28
99b4f17
519f7b7
4184b4b
03a5108
920cf53
a2e68b4
e267978
38ca863
cc18957
b0e2645
3be64f4
cc10820
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,12 +43,29 @@ | |
"supports": { | ||
"align": true, | ||
"spacing": { | ||
"margin": true | ||
"margin": true, | ||
"padding": true | ||
}, | ||
"interactivity": { | ||
"clientNavigation": true | ||
}, | ||
"__experimentalBorder": { | ||
"radius": true, | ||
"color": true, | ||
"width": true, | ||
"style": true, | ||
"__experimentalDefaultControls": { | ||
"radius": true, | ||
"color": true, | ||
"width": true, | ||
"style": true | ||
}, | ||
"__experimentalSkipSerialization": true | ||
} | ||
}, | ||
"selectors": { | ||
"border": ".wp-block-embed__wrapper " | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The convention with these selectors is to explicitly include the block's class. In this case, I'm not 100% whether it is required but it does make it clearer the intended target for the styles. That block class is also tweaked when generating block style variation selectors for the block. One last nit, there's an unnecessary space at the end of that selector. Better safe than sorry, we should clean that up in case theres some theme.json processing somewhere that wasn't expecting it. |
||
}, | ||
"editorStyle": "wp-block-embed-editor", | ||
"style": "wp-block-embed" | ||
} |
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 applies the padding to the Embed block's wrapper.
The justification for adding the padding support was so that it could be used to counter border radius and prevent the content from sticking out beyond the border.
This might need to be applied to the inner embed wrapper as well.