Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
d797a50
Layout blockGap: Try using classnames to support block-level gap in t…
andrewserong May 6, 2022
cbb8787
Ensure blockGap controls are not exposed in global styles when experi…
andrewserong Jun 27, 2022
7efc0e3
Fix linting issue
andrewserong Jun 28, 2022
5b5739f
Implement fallback behaviour in site editor where default flex gap is…
andrewserong Jun 28, 2022
ba675a3
Remove connection to wp-block-styles so that fallback flex layout sty…
andrewserong Jul 7, 2022
eb6c662
Update resolver class to add an empty blockGap placeholder for a bloc…
andrewserong Jul 8, 2022
fb8dcec
Layout blockGap: Try using classnames to support block-level gap in t…
andrewserong May 6, 2022
67f3e8c
Reuse most of the logic from #39926
tellthemachines Jun 29, 2022
0565553
Don't accept string values
tellthemachines Jun 30, 2022
e1de656
Apply root padding only on blocks with content width
tellthemachines Jul 1, 2022
138e01e
Apply linting changes
tellthemachines Jul 1, 2022
62b20c3
Fix rebase error
tellthemachines Jul 4, 2022
2c53db4
Actually fix rebase
tellthemachines Jul 4, 2022
c0757b1
Add global padding toggle to layout-less blocks
tellthemachines Jul 4, 2022
f746943
Support custom block padding.
tellthemachines Jul 5, 2022
691cf2b
Output alignfull styles only when needed.
tellthemachines Jul 7, 2022
2bca1b4
Toggle should only appear when needed.
tellthemachines Jul 7, 2022
753c53f
Add context to comments about string value support
tellthemachines Jul 8, 2022
2b89413
Interpret preset padding value for negative margin
tellthemachines Jul 11, 2022
f18cdfd
Don't show toggle on blocks without content size.
tellthemachines Jul 11, 2022
69e8386
Change setting name.
tellthemachines Jul 11, 2022
4447f2a
Improve preset processing logic
tellthemachines Jul 11, 2022
f9cb709
Reset padding when no content size applies.
tellthemachines Jul 11, 2022
924d1ed
Update style engine class to match trunk
tellthemachines Jul 12, 2022
3057e07
Fix string check
tellthemachines Jul 12, 2022
10a06d5
Fix preset values in the editor.
tellthemachines Jul 12, 2022
74f1ca9
Fix string check
tellthemachines Jul 12, 2022
c496bb2
Remove useGlobalPadding attribute
tellthemachines Jul 13, 2022
5f724b3
Replace padding with spacing in function parameter
tellthemachines Jul 13, 2022
494d1bf
Default root padding setting to false.
tellthemachines Jul 13, 2022
f69add9
Dodgy fix for Cover block
tellthemachines Jul 13, 2022
ddf259e
Add test for get_styles_for_block function
tellthemachines Jul 14, 2022
9327a4b
Check for padding setting before adding classname.
tellthemachines Jul 14, 2022
a092eb3
Don't output vars if setting is off
tellthemachines Jul 15, 2022
c4e5fc1
Test default output without setting enabled.
tellthemachines Jul 15, 2022
d1c79b8
Update lib/compat/wordpress-6.1/class-wp-theme-json-6-1.php
tellthemachines Jul 15, 2022
e614403
Remove empty line.
tellthemachines Jul 15, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Layout blockGap: Try using classnames to support block-level gap in t…
…heme.json

Try implementing partially in editor

Try adding block classname to the container class to deal with specificity, remove fallback gap

Add fallback gap styles rendered at root

Move changes to theme.json class 'up' to 6-1 file

Fix rendering block-level blockGap set in the block's attributes in the post editor

Implement changes in site editor / global styles comparable to PHP changes

Try moving some of the layout definitions to theme.json

Move layout style generation to a separate function

Implement theme.json definitions approach in the site editor, ensure styles load correctly in the post editor

Remove class duplication, use classname stored in theme.json instead of hard-coded classname

Support split row/column values at the block level, and include output of the legacy CSS variable for backwards compatibility

Ensure CSS variable is only output if gap support is opted-in

Tweak tests

Whitespace fix

Update test

Remove duplication block class from server-rendered output, update snapshot

Fix failing PHP test

Attempt to fix PHP test again

Manually fix snapshot

Fix PHP linting issue

Linting

Reorganise rules in theme.json

Remove dead code

Render base styles and only output container classes and styles if unique values are generated

Move blockGap styles in global styles to a separate getLayoutStyles function

Move layout_definitions up so that it's always available to base styles

Linting fixes

Update test snapshot

Add baseStyles output to global styles

Remove test snapshot

Update layout supports to return a CSS string instead of a component, add check that string is non-empty before outputting container classnames and style tags

Update flex layout to only output styles if unique values are set

Fix is-root-container styling in post editor

Update flex/flow layouts to look up layout definitions to generate gap styling

Move blockGap JS logic to a shared utility function, add tests

Add test in case layoutDefinitions is undefined

Add minimal tests that flex and flow layouts that don't contain non-default values return empty strings

Fix rebase in 6-1.php file

Consolidate JS layout classnames generation

Further consolidate classname generation

Implement outputting non-default layout gap for classic themes

Update fallback gap logic so that block themes that opt-out of blockGap but opt-in to wp-block-styles still get flex layout gap styles

Fix Columns fallback gap styles in classic themes

Ensure base layout styles are available in the editor for classic themes

Fix root gap value

Fix linting issues

Fix linting issue

Add a phpunit test for outputting layout styles based on layout definitions in theme.json

Add additional tests, ensure base styles are still output so that alignments continue to function

Remove todo items

Add layout selector regex, css declaration check

Add additional logical margin properties to allow list

Fix flex-wrap rule in JS version of flex layout

Co-authored-by: Ramon <[email protected]>

Rename default_layout to global_layout_settings

Rename blockGapStyles to spacingStyles

Fix rebase issues

Fix linting issues

Fix linting again
  • Loading branch information
andrewserong authored and tellthemachines committed Jul 12, 2022
commit fb8dceca2a7326085042afa737fcc38bdbccff4c
1 change: 1 addition & 0 deletions lib/load.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ function gutenberg_is_experiment_enabled( $name ) {
require __DIR__ . '/compat/wordpress-6.0/client-assets.php';

// WordPress 6.1 compat.
require __DIR__ . '/compat/wordpress-6.1/block-editor-settings.php';
require __DIR__ . '/compat/wordpress-6.1/blocks.php';
require __DIR__ . '/compat/wordpress-6.1/block-editor-settings.php';
require __DIR__ . '/compat/wordpress-6.1/persisted-preferences.php';
Expand Down