-
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
[WIP] Columns: Add custom gutters via margin support and dynamic columns block #31987
Closed
aaronrobertshaw
wants to merge
1
commit into
add/skip-serialization-to-spacing-support
from
try/columns-spacing-support
Closed
[WIP] Columns: Add custom gutters via margin support and dynamic columns block #31987
aaronrobertshaw
wants to merge
1
commit into
add/skip-serialization-to-spacing-support
from
try/columns-spacing-support
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This converts the columns block to a dynamic block. This is so that CSS variables can be used for the margin support values. Which in turn allows CSS to utilise these in responsive styles.
aaronrobertshaw
added
[Type] Enhancement
A suggestion for improvement.
[Status] In Progress
Tracking issues with work in progress
[Block] Columns
Affects the Columns Block
[Feature] Design Tools
Tools that impact the appearance of blocks both to expand the number of tools and improve the experi
labels
May 19, 2021
aaronrobertshaw
requested review from
spacedmonkey and
TimothyBJacobs
as code owners
May 19, 2021 10:04
Size Change: +298 B (0%) Total Size: 1.31 MB
ℹ️ View Unchanged
|
Closing this in favour of CSS Grid approach. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
[Block] Columns
Affects the Columns Block
[Feature] Design Tools
Tools that impact the appearance of blocks both to expand the number of tools and improve the experi
[Status] In Progress
Tracking issues with work in progress
[Type] Enhancement
A suggestion for improvement.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Depends on: #31973
Related: #24874 & #31816
Description
The responsive behaviour of the columns block and its use of media queries prevents default use of margins block support to control gutters.
This PR is a proof of concept to convert the columns block to be dynamic and inject CSS variables for the margin into the markup. CSS variables cannot be added into the inline styles saved in the block content, they will get stripped out by kses.
Next Steps
How has this been tested?
Manually
customMargin
support viaexperimental-theme.json
small
viewport, the flex-basis is updated to be50% - margin/2
to achieve 2 column layoutTest block code
Screenshots
Types of changes
New feature
Checklist:
*.native.js
files for terms that need renaming or removal).