Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Reset local styles

  • I’ve been struggling with this one for a while.
    Why isn’t it possible to reset the local styles in a block? It is possible to do it when you have a global style applied to it, why isn’t it possible when there are only local styles?

    Step by step:

    1. I apply some local styles to a container (padding and background color, for instance)
    2. I apply a global style to that same container
    3. In the container properties I can see the global style and also a block style button (or tag). If I remove the block style button/tag, all the local styles are deleted
    4. If I don’t add a global style, the block style button/tag doesn’t show up, and I can’t delete all the local styles at once

    Sometimes I’m adding local styles to blocks, and then realize it would be better to use a global class or that I don’t need those styles anymore. I have to find them one by one to clear every local style from that block. I know I can filter styles with the “Show controls with values” option, but it still takes some time to delete or reset all the local styles.

    Since you already have the local styles button/tag available when there’s a global style present, why don’t you add that button/tag when there’s no global styles? The button/tag would show up when you have at least one local style in that block. Deleting that button/tag would delete all the local styles, and reset the block to its original state, whether there are global styles applied to that block or not.

  • Hi there,

    4. If I don’t add a global style, the block style button/tag doesn’t show up, and I can’t delete all the local styles at once

    But you can delete the block and add a brand new one, which does not have any local styles.

  • That’s not a very good solution, is it?

    When I’m dealing with complex layouts there are dozens of blocks all over the page. If I’m editing styles I’m not even looking at the page structure, and I definitely don’t want to add new blocks and delete the old ones.

    And how about the block contents? Even if I’m styling a basic headline block, should I copy the headline text before deleting the original block and replace it with the brand new one?

    How hard can it be to have a reset button or add the local styles button/tag as soon as a block has some local style applied? Doesn’t that make sense to you?

  • Hi there,

    Thanks for the detailed feedback, your request makes complete sense.

    Here’s why it currently works this way:

    The Block Styles reset control was originally designed as part of the Global Classes feature. Its primary purpose is to indicate when a block has local style overrides applied on top of a global style, which is why the reset option is only exposed when a global class is present.

    That said, you’re absolutely right. The ability to clear all local block styles is useful even when global classes are not in use. The underlying reset functionality already exists, it’s just not currently surfaced unless a global class is applied.

    I’ll raise this with the dev team for review, as it’s a reasonable enhancement that could improve the overall editing workflow.

    Thanks again for taking the time to share your feedback.

  • Thank you so much!!!

    This would be a great improvement to my daily workflow.

    🙂

  • No problem! 🙂

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