Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: CSS for Zsh website?



David Wales wrote on Wed, 02 Mar 2022 13:08 +00:00:
> I noticed that the Zsh website and user guide don't have any CSS.
> I've come up with a minimal bit of CSS which makes a big difference, 
> especially for the user guide:
>

What URL specifically do you mean?  "The user guide" could be referring
to either of several documents:

https://zsh.sourceforge.io/Doc/
https://zsh.sourceforge.io/FAQ/
https://zsh.sourceforge.io/Guide/
https://zsh.sourceforge.io/Intro/

> body {
>      margin: auto;
>      max-width: 80ch;
>      font-family: Arial, sans-serif;
>      padding: 5px;
> }
>
> pre {
>      overflow: auto;
> }
>
> I think this makes the user guide look much more modern and readable.

I use the equivalent of max-width with man(1) [1], so that one certainly
sounds reasonable to me.

However, I wonder whether we're reinventing a wheel here.  There ought
to be a manual out there whose CSS we can simply borrow (with
attribution, subject to license, etc., of course).  E.g., skimming
Python's docs' CSS, they seem to set max-width differently for wide and
narrow displays.  Reusing someone else's CSS would mean we won't have
to think about such issues.

> I've set my browser to auto-inject it on the Zsh pages, but thought I 
> should share it in case there's interest to include it the website.
>

Thanks!

> Is there a preference for no CSS? Or is this something the Zsh web
> maintainers would consider including, especially for the user guide?

As pws says, I think it's just that no one ever got around to styling
the HTML.

The HTML is compiled from yodl/texinfo, so we'll want to do this the
right way and patch the build scripts to add CSS.  The code for this
should be in zsh.git:Doc/Makefile.in or zsh-web.git:**/Makefile, depending
on what "user guide" referred to.

Cheers,

Daniel

[1] on Linux: MANWIDTH=80 man --no-hyphenation




Messages sorted by: Reverse Date, Date, Thread, Author