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

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

Open
quantumleap33 opened this issue Oct 12, 2024 · 2 comments

Comments

@quantumleap33
Copy link

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.

@quantumleap33 quantumleap33 added the triage Awaiting review label Oct 12, 2024
@tomusborne
Copy link
Owner

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.

@iansvo
Copy link
Collaborator

iansvo commented Dec 3, 2024

@tomusborne The only option to do this would be to show the at-rule in the list even if it doesn't have anything. I'm not exactly sure that's a good thing though. If you just change at-rules then the empty rule goes away anyways.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants