Friday, January 6, 2023

User Stylesheets

Nick Heer:

As Kyrnin writes, web designers usually do a better job these days, and most browsers no longer support user stylesheets by default. Google removed them from Chrome nine years ago and they were made optional in Firefox in 2019. But Safari, my browser of choice, still makes user stylesheets easily visible and, if you have the inclination, I recommend its use for a low-effort way of blocking irritations and overriding bad design choices.

[…]

But user stylesheets have drawbacks and are evidently from an earlier era of the web. The ways you might employ user styles today are often similar to browser extensions like StopTheMadness or any number of ad blockers. Modern extensions are far more powerful, too, as rules can be tailored to individual websites or run globally. The biggest advantage to the user stylesheet is also its Achilles’ heel: it only works globally, meaning the same rules are applied to all websites. That means your CSS selectors need to be highly specific.

[…]

Unlike browser extensions, there are no security or privacy questions to worry about, and it is entirely controlled by the user. I saved my stylesheet in my iCloud Drive so it syncs between my Macs; Safari for iOS does not support user styles.

3 Comments RSS · Twitter · Mastodon

I admittedly only skimmed/searched, but no mention of extensions like Stylus that let you set a stylesheet per site?

My stupidcomments.css has been growing for a decade or more, and now has bits to clean up Mastodon UI, restore bright aqua-ish scroll bars, and more.

https://mdhughes.tech/2022/11/15/smurf-you-gargamel/

Safari for iOS does support user styles, if you use Jeff Johnson’s Stop the Madness extension. It allows you to specify custom style elements per page.

Leave a Comment