CORE/COLUMNS fix margins on med screens, and odd numbers of cols #12408
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.
Background
There should be 3 breakpoints:
Mobile: less than 600px
all columns full width and stacked. No margins.
Small: 600px - 782px
columns wrap in rows of 2. Margins on the inside.
Medium: bigger than 782px
all columns fit in one row. Margins on the inside.
PROBLEMS!
PROBLEM 1
Columns don't wrap properly at Small breakpoint
SOLUTION
not
selectors to Medium breakpointPROBLEM 2
At the Medium breakpoint, when there is an odd number of columns, and extra margin is added to the last item.
SOLUTION
odd
andeven
selectors toinitial
at the Medium breakpointHow has this been tested?
tested in local wordpress docker env, codepen.
ORIG:
https://codepen.io/drdogbot7/pen/NEOQPQ
FIX:
https://codepen.io/drdogbot7/pen/GwYVNz
Types of changes
Only css affecting core/columns.
Checklist: