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

Background images: resolve ref and ensure appropriate default values #7137

Commits on Aug 26, 2024

  1. Block background images have long had "default" values to optimize th…

    …eir appearance.
    
    For example, block styles receive a default background size of "cover" in the editor and the frontend. Or, where the background size is "contain" the background position is "center".
    
    Defaults have always applied to images uploaded by the user in the editor.
    
    The PR brings a bit of consistency to background image styles.
    
    Block styles "inherit" values from global styles/theme.json and display the current value (whether the set, inherited or default value) in the editor controls.
    
    In relation to default values:
    
    - Site wide background images (uploaded or otherwise) do not receive any default values.
    - Block background images defined in theme.json do not receive any default values.
    - Block background images that have been uploaded (images with ids) receive background default values.
    ramonjd committed Aug 26, 2024
    Configuration menu
    Copy the full SHA
    5e6c31c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ae59e5d View commit details
    Browse the repository at this point in the history
  3. Flips the default position from "center" to "50% 50%" - the same effe…

    …ct, but the latter will appear in the UI controls.
    ramonjd committed Aug 26, 2024
    Configuration menu
    Copy the full SHA
    a360239 View commit details
    Browse the repository at this point in the history
  4. Ensures that background image theme.json objects are replaced, and no…

    …t merged. The image object represents a single unit. We want to prevent "cross contamination"
    ramonjd committed Aug 26, 2024
    Configuration menu
    Copy the full SHA
    2721bd7 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    2a8916e View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    968e4ef View commit details
    Browse the repository at this point in the history
  7. After comparing with Gutenberg trunk, this test condition needed to b…

    …e synced background-size: contain;background-attachment: fixed;
    ramonjd committed Aug 26, 2024
    Configuration menu
    Copy the full SHA
    03bf346 View commit details
    Browse the repository at this point in the history