3 ms·
> I wish there was a way to tell the browser to add more default styles to my document. Non-Chrome browsers still have modifiable user stylesheets (though I th
by extra88 5y ago
> I wish there was a way to tell the browser to add more default styles to my document.
Non-Chrome browsers still have modifiable user stylesheets (though I think only Safari for Mac still has a GUI option to do it) but more realistically, you can use a browser extension like Stylus to apply your own styles, even defining them on a per-domain basis.
Enabling the user to change the appearance of your site is much easier if you heed the advice of this article and use the appropriate semantic HTML.
> "clean" mode with no default borders, margins, padding, sizes, styles
Web developers have been starting projects with "reset" stylesheets for decades.
- kevincox 5y ago> Non-Chrome browsers still have modifiable user stylesheets This doesn't solve the problem I describe because it breaks websites (unless you are very minimal with your usage). I am talking about an opt-in feature where you concede control to the browser so that it can apply "aggressive" styles such as it would for reader mode. For example changing the current usage-agent style sheet to a "dark theme" is completely infeasible to ship as it would break way too many sites. Furthermore just being possible isn't enough. It would also need to provide nice defaults to make this a feasible proposition at all. I can't have my blog being barely readable for 99% of viewers. > even defining them on a per-domain basis. I also don't want to fix specific websites. I'm talking about something that works by default. (Of course site-specific tweaks are nice, but that is nearly orthogonal to what I am looking for here.) > Web developers have been starting projects with "reset" stylesheets for decades. Yes, and this is an unfortunate hack. It would be nice to remove the necessity to remove the need for these and remove the maintenance required (even if the cost of both is small).
- extra88 5y ago>> Web developers have been starting projects with "reset" stylesheets for decades. > Yes, and this is an unfortunate hack. It would be nice to remove the necessity to remove the need for these and remove the maintenance required (even if the cost of both is small). There are too many different opinions about what should or shouldn't be in base styles.
- kevincox 5y agoThat may be true, but I think that is what makes my idea work well. - For "content" sections the discussion is entirely removed. Each browser can do whatever it wants so there is no need to argue in the standard. - For "clean" sections nothing! Every element has no margin:0 padding:0 display:block size:1em color:inherit... This leaves no surprises and developers can do whatever they want. Of course the third section "legacy" is what we have today and largely shouldn't be changed from the mostly-uniform thing that browsers do today.