-
Notifications
You must be signed in to change notification settings - Fork 20
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
Add block styles for padding #832
Conversation
/unhold 7898bb90-519e-4c96-be40-2b81c821c97b
This way we don't have a ton of wrapper elements just for a bit of padding.
Test instance is ready 🚀🌑 venus | admin | blocks report | CircleCI | composer-local.json ⌚ 2022.04.20 12:29:14 |
440906f
to
dca5e5e
Compare
/unhold 4b534818-8311-4a97-8c9a-390d4e012bc8
@@ -32,3 +32,18 @@ | |||
// Other | |||
@import "blocks/WideBlocks"; | |||
@import "blocks/Editor"; | |||
|
|||
.is-style-small-padding { | |||
padding: 8px; |
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.
Can we use $sp-1
here?
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.
Can you please pay attention to the essence of the PR while it's still in draft?
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.
I chose these values because I quickly wanted to write an example, without having to worry about importing variables and decyphering their naming scheme.
} | ||
|
||
.is-style-medium-padding { | ||
padding: 16px; |
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.
Can we use $sp-2
here?
} | ||
|
||
.is-style-large-padding { | ||
padding: 32px; |
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.
Can we use $sp-4
here?
@mleray This PR also uses block styles to add a padding around blocks without needing to wrap them in another block. If we have to choose, which one you think makes most sense? Block spacing controls are one of the roadmap items for WP 6. They'll probably add the same spacing controls on all container blocks, including padding. Full block links could be coming too, but that will definitely take longer. It's also worth looking into block variations. They might be more appropriate for the full width link. That way the link is also visualized as the block name, and in the block list. An example is the core "row" block, which is just a variation of the group block with some pinned attributes. |
This way we don't have a ton of wrapper elements just for a bit of
padding.