Skip to content
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

Refactor of outputting only duotone css and svg needed for rendered blocks #48436

Merged

Conversation

jeryj
Copy link
Contributor

@jeryj jeryj commented Feb 24, 2023

I'm sorry this is in one giant commit. The general idea is:

  • On wp_loaded
    • save all duotone presets defined in merged global styles
    • save all block names and their corresponding duotone slug info
  • on block render, check if the block:
    • is one of the blocks using duotone via global styles
    • has any defined duotone styles
    • if so, add it to the duotone_output array to have its duotone info output

Thanks to @ajlende for co-piloting this.

…red blocks

I'm sorry this is in one giant commit. The general idea is:
- On wp_loaded
  - save all duotone presets defined in merged global styles
  - save all block names and their corresponding duotone slug info
- on block render, check if the block:
  - is one of the blocks using duotone via global styles
  - has any defined duotone styles
  - if so, add it to the duotone_output array to have its duotone info output
@jeryj jeryj requested a review from spacedmonkey as a code owner February 24, 2023 22:22
@jeryj jeryj marked this pull request as draft February 24, 2023 22:22
@jeryj jeryj removed the request for review from spacedmonkey February 24, 2023 22:23
@jeryj jeryj self-assigned this Feb 24, 2023
@github-actions
Copy link

Flaky tests detected in 8cdfaec.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4266725721
📝 Reported issues:

@jeryj jeryj marked this pull request as ready for review February 27, 2023 17:01
@jeryj jeryj merged this pull request into update/output-duotone-presets-per-block Feb 27, 2023
@jeryj jeryj deleted the update/output-duotone-per-block branch February 27, 2023 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant