openstyles / stylus

Stylus - Userstyles Manager
https://add0n.com/stylus.html
GNU General Public License v3.0
5.29k stars 299 forks source link

Firefox styles #201

Closed maicol07 closed 6 years ago

maicol07 commented 6 years ago

Hi, I tried to install styles that affect the browser UI (like this: https://userstyles.org/styles/126206/simple-white-theme-windows-10-colored-titlebar) but they don't install. Also, if I copy and paste the CSS in a new file (by Stylus interface) nothing happens. I think that Stylus doesn't support these styles. Could you please look at this? Thanks!

Mottie commented 6 years ago

If you click on the "Show CSS Code" button, you'll see that the style is a XUL (UserChrome) style.

Firefox WebExtensions (v57+) will no longer allow the styling of the browser UI. Please refer to #92.

tophf commented 6 years ago

I guess we'll add a warning for any sections that target chrome:// URLs. @narcolepticinsomniac, @Mottie, suggestions?

Mottie commented 6 years ago

Maybe we could automatically disable the style and add an "unsupported" label:

tophf commented 6 years ago

What about the behavior on USO page?

Mottie commented 6 years ago

Can you modify the button before the user clicks on it? If so, then yeah prevent the installation; but we'll still need to handle imported styles.

If we can't take action until the user clicks the install button, then I guess an alert would suffice.

narcolepticinsomniac commented 6 years ago

If a style exclusively targets chrome:// URLs, then yeah, prevent installation or disable with explanations. I've never used FF extensively, or been all that adventurous with styles in it, but aren't there styles which have sections for chrome:// URLs that have otherwise functioning sections? I suppose warnings would suffice in those scenarios.

Depending how extensively we're gonna account for all the old-school FF specific code, there's a lot of things that could be handled cleaner. Install one of the globals like this one and you'll see a lot of stuff that could be handled better. Empty sections and "applies to" rules which are junk, and could be stripped.

Maybe accounting for this stuff is more trouble than it's worth. Maybe it's on the users to figure out, IDK.

tophf commented 6 years ago

Makes sense, thanks for suggestions.