tomusborne / generateblocks

GenerateBlocks is a small collection of lightweight WordPress blocks that can accomplish nearly anything.
https://generateblocks.com
194 stars 21 forks source link

[GB 2.0 pre alpha] Cannot delete a custom AT-RULE if no value has been modified #1376

Open quantumleap33 opened 1 week ago

quantumleap33 commented 1 week ago

Description

When creating a custom AT-RULE without overriding any of the local style values, the Delete at-rule option is greyed out.

Steps to reproduce

  1. In the AT-RULES panel, create a new rule.
  2. Select the Mobile preset and change the rule to @media (max-width:400px).
  3. Click the Create button.
  4. Go to the AT-RULES options and click the three vertical dots next to the newly created rule.

Expected behavior

The Delete at-rule option should be available.

Actual behavior

The Delete at-rule option is greyed out until a default value has been overridden.

This also happens with global styles.

tomusborne commented 3 days ago

This is somewhat intended, although likely bad UX. It exists in the current Global Styles system as well.

The reason it can't be deleted is that nothing exists to delete.

We should explore allowing the deletion of the item in state even if there's nothing to delete.