Support » Alpha/Beta/RC » Quote block styles in theme.json not picked on frontend

  • Resolved leemon

    (@leemon)


    I’m using WP 6.0 RC3 and I’ve added this piece of code to my custom theme theme.json file (where --theme-secondary-text-color is a CSS var in my theme CSS). The styles are loaded on the backend correctly, but are not on the frontend:

    
    "core/quote": {
        "color": {
            "background": "transparent",
            "text": "var(--theme-secondary-text-color)"
        },
        "border": {
            "width": "3px",
            "style": "solid",
            "color": "var(--theme-secondary-text-color)"
        },
        "spacing": {
            "margin": {
                "bottom": "1.6em"
            },
            "padding": {
                "top": "0",
                "right": "1.5em",
                "bottom": "0",
                "left": "1.5em"
            }
        },
        "typography": {
            "fontSize": "1rem",
            "fontFamily": "Georgia, \"Times New Roman\", \"Bitstream Charter\", Times, serif",
            "lineHeight": "1.4"
        }
    }

    The only styles loaded on the frontend are the default ones from core:

    
    .wp-block-quote {
        border-left: .25em solid;
        margin: 0 0 1.75em;
        padding-left: 1em;
    }
    

    This is only happening with the quote block, not other block types.
    Any ideas?

    Thanks in advance

    • This topic was modified 4 months, 1 week ago by leemon.
Viewing 2 replies - 1 through 2 (of 2 total)
  • I’ve tested your code by customizing the Archeo theme and am able to see everything applied on the front end: https://cldup.com/XktjZS0wUy.jpg

    Have you tested against any other themes just to rule out anything going on with yours? I have also noticed at times that it takes a minute or two for theme.json changes to take effect on the front end (might be some type of internal caching).

    Thread Starter leemon

    (@leemon)

    It seems that it’s a caching issue. If I set define('WP_DEBUG', true); in my wp-config.php file the quote block styles set in my theme.json file are loaded on the frontend. The thing is that when I revert back to define('WP_DEBUG', false); the issue returns. 🙄

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Quote block styles in theme.json not picked on frontend’ is closed to new replies.