News for hackers. Stuff that matters.
Re:Explore Wikipedia's New Look by lmm on Thursday January 19, 2023 @12:59AM (#34437183)
> I think if you really want full-width text, you could write a little custom CSS to make it work how you want it.

How? Seriously, if you have a way to do this that works for pages in general I'll be extremely grateful. I tried using a user stylesheet that said * { max-width: 100% !important } for a while, but that breaks too many non-root elements on all sorts of sites.

Whereas making the page narrow when it doesn't set a max-width seems very easy to do with a custom stylesheet.

Re:Explore Wikipedia's New Look by ashton314 on Thursday January 19, 2023 @01:22AM (#34437315)
I don't do this personally, so I'm fuzzy on the details. I know of no way to make this work in general (how would you do that?) across sites, but Wikipedia pages follow a consistent format, so that shouldn't be too hard. Furthermore, someone[1] here on HN showed how you can control how the theme works.

My point: if you care that deeply about how Wikipedia in particular is laid out, you likely have the tools to force it to work that way. Meanwhile, the rest of us plebs get a better (from a typographical standpoint, not necessarily a case-by-case basis) default.

[1]: https://news.ycombinator.com/item?id=34431533

Re:Explore Wikipedia's New Look by mch82 on Thursday January 19, 2023 @02:10AM (#34437544)
If you create an account on Wikipedia then you can go into preferences and define custom CSS styles.
Re:Explore Wikipedia's New Look by spiralx on Thursday January 19, 2023 @07:58AM (#34439813)
I use the Stylus extension for Chrome (also available on Firefox) to write user styles for sites, mostly to improve the legibility of text, but for sites like HN and Reddit that I browse a lot I've customised their look and feel extensively to match my tastes. Creating a custom style for a site just requires you to click the Stylus button in the toolbar, click on the site name at the bottom of the menu to create a new style and open the editor in a new tab and then add your CSS and hit save. You can also search for existing styles for your current website that have been published online.

You can have one style apply to multiple domains, I have a simple one for making text black and setting the font size and line spacing which works on a dozen sites or so. You can even use SCSS or Stylus instead of plain CSS if you want.

https://chrome.google.com/webstore/detail/stylus/clngdbkpkpe...

Re:Explore Wikipedia's New Look by lmm on Thursday January 19, 2023 @05:08PM (#34446362)
> I use the Stylus extension for Chrome (also available on Firefox) to write user styles for sites, mostly to improve the legibility of text, but for sites like HN and Reddit that I browse a lot I've customised their look and feel extensively to match my tastes. Creating a custom style for a site just requires you to click the Stylus button in the toolbar, click on the site name at the bottom of the menu to create a new style and open the editor in a new tab and then add your CSS and hit save.

Yes, I'm talking about that kind of thing. It's trivial for people who want narrow sites to put a max-width on the root element that way. As someone who wants wide sites, how do I do undo all these designers' narrow widths without having to figure out manually what each individual site has done?

Re:Explore Wikipedia's New Look by spiralx on Saturday January 21, 2023 @06:52PM (#34472276)
I use the dev tools to find the containing element with max-width by using inspect, clicking on the text and then finding which ancestor has the width, and then it's something like

    div.article-text {
      max-width: unset !important;
      width: 100% !important;
    }
which works in most cases. It's totally a pain to have to do on a new site, but once it's done then you never have to do it again - at least until the website does a redesign lol.