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

[Bug] #792

Open
jackiechin opened this issue Dec 3, 2024 · 1 comment
Open

[Bug] #792

jackiechin opened this issue Dec 3, 2024 · 1 comment

Comments

@jackiechin
Copy link

Describe the bug

Whether to add !important to custom CSS rules should be decided and applied by the user, rather than enforced. Doing so may cause issues with certain special fonts, such as icon fonts, preventing them from displaying correctly.

Browser

Chrome 131.0.6778.86 / Windows 11 23H2

To Reproduce

Steps to reproduce the behavior:

  1. Just edit a custom css style include font setting.
  2. The StyleBot will add !important mark automatically
  3. Doing so may cause issues with certain special fonts, such as icon fonts.

Expected behavior

Remove the practice of forcibly appending !important to CSS rules.

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

Add any other context about the problem here.

@LautiLosio
Copy link

I would recommend writing a better title for the issue. I suggest "Allow Users to Control !important Enforcement"

I came to the repo looking exactly for this feature. I have a * wildcard to style all webpages with a simple background-color: white to add a background color for sites that don't explicitly set a color to the body (which is needed for browser issues with Zen). Unfortunately, the !important property makes this change apply to all sites (as expected) even if the site has explicitly set its own body background color (not what I was looking for, but still expected because of the !important).

Given this is not the first issue that I have found regarding this !important enforcement, I really hope we can have some way of choosing when to unset that property.

Some users suggested a site-wide toggle or having the property off by default. In my opinion, having it apply by default is good for ease of use and for first-time users. However, advanced users would really benefit from having an equivalent !unimportant property that prevents the other one from appearing.

I will look into the code and see if there's something I can do to help with this issue. If I can, I will create a PR with the changes and post it here.

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

No branches or pull requests

2 participants