• Dear fellow WordPress-lovers!

    I’m currently playing around with TailWindCSS and patterns in WP, but I’ve encountered an edge-case (kind of). When I add a TailWind-class to my pattern and build it, it’s working fine in both back- and frontend – but ONLY if I remove the existing pattern, and then re-add it again.

    I get it – it’s to “protect” the existing design, and minimize the chance for f’ing something up.
    But imagine this:

    You have a client that uses this pattern 10 places across the whole website – and they want the font-size to go from 14px to 15px – small change like that – nothing ground-breaking. I would LOVE a way to “push” this change to the existing patterns, without having to bother the client to replace the pattern across the whole site.

    Does this already exist? Am I just “blind”?
    I know I can do a search/replace in the database – but that’s kind of overkill – or what?
    IMO there should be a way to “force” this update to existing patterns.

    Have a great summer! <3

    /A

Viewing 4 replies - 1 through 4 (of 4 total)
  • Synced patterns are the solution to this problem, but I understand that these may be detached patterns added to existing pages. If that is the case, I can’t think of a performant, non-crazy way to fix this.

    Thread Starter kuckovic

    (@kuckovic)

    Hi @dufresnesteven

    We’ve already looked into this – and it does not solve the “problem”, unfortunately.
    Whenever we change something in the pattern-code (PHP-file), we have to remove the pattern, and then re-add it, or else the changes would not apply.

    I get this behaviour – it’s probably so that you don’t “ruin” something by changing the code. But I still think there should be a way of “forcing” Gutenberg to reload the pattern-code across the page. Maybe it should only be possible through the CLI in some way, so that users cannot do this by a mistake.

    I don’t know – just a thought ??
    Thanks for the input tho!

    / AK

    This is not currently supported, but there is an open ticket for it because it is a highly requested feature: https://github.com/WordPress/gutenberg/issues/59272

    Please add your feedback there, particularly highlighting your use case.

    Thread Starter kuckovic

    (@kuckovic)

    Thanks a lot, Justin ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.