zsh-workers
 help / color / mirror / code / Atom feed
From: David Wales <daviewales@disroot.org>
To: Daniel Shahaf <d.s@daniel.shahaf.name>
Cc: zsh-workers@zsh.org
Subject: Re: CSS for Zsh website?
Date: Sat, 05 Mar 2022 19:47:11 +1100	[thread overview]
Message-ID: <7EC01F45-DDB2-4941-B576-8B560E7298A6@disroot.org> (raw)
In-Reply-To: <20220304131252.GB7687@tarpaulin.shahaf.local2>

[-- Attachment #1: Type: text/plain, Size: 3388 bytes --]

On 5 March 2022 12:12:52 am AEDT, Daniel Shahaf <d.s@daniel.shahaf.name> 
wrote:
>> If there's consensus that we don't want to use my minimal CSS, and
>> that we do want to adapt fancy CSS from a compatibly licensed project
>
>I think that's a false dichotomy. "Not reinvent the wheel" and "Prefer
>fancy to minimal" are not synonymous; rather, they are orthogonal. That
>is: it's entirely possible to design fancy styling from scratch, as it
>is to reuse someone else's minimal styling.

Agreed. Sorry for the imprecise language on my part.


On 5 March 2022 12:26:16 am AEDT, Daniel Shahaf <d.s@daniel.shahaf.name> wrote:
>Lawrence Velázquez wrote on Thu, Mar 03, 2022 at 21:44:48 -0500:
>> On Thu, Mar 3, 2022, at 7:12 PM, Bart Schaefer wrote:
>> > On Thu, Mar 3, 2022 at 3:31 PM Lawrence Velázquez <larryv@zsh.org> wrote:
>> >>
>> >> On Thu, Mar 3, 2022, at 5:37 PM, Axel Beckert wrote:
>> >> >
>> >> > On Thu, Mar 03, 2022 at 12:08:11AM +1100, David Wales wrote:
>> >> >>     max-width: 80ch;
>> >> >
>> >> > Please don't artificially restrict the width of text on websites
>> >>
>> >> Hard disagree.  Legibility decreases with line length.
>> >
>> > Soft disagree.  Setting width to 80 characters is no more necessary
>> > than allowing it to be 100% of the viewport.  The only time to use
>> > character widths is with fixed-width fonts.  Set margins, not widths.
>> 
>> Agreed!  I didn't mean to defend the specific CSS that was proffered.
>
>I'm confused.  Didn't you just now post a link that explains why widths
>should be set rather than margins?  Quoting from there [with emphasis
>removed]:
>
>    There isn’t one margin size that will work for all web pages, but
>    the core advice is the same as on the printed page—focus on line
>    length.

I'm not an expert in CSS, typography or even Zsh! However, I believe that limiting the text width to a certain maximum number of characters is best for readability. In fact, another page of the same typography website suggests that the maximum text width should be between 45-90 characters.[1]

I'm not precious about which particular CSS should be used. I'm open to reusing something from another project once this group has reached consensus on the desired style. However, in defence of the CSS ch unit for variable width fonts, I think it provides a very direct way of restricting the number of characters in a line. According to the MDN docs, the ch unit is equal to the width of the digit 0 in the current font. So, if we accept the premise that there should be no more than 90 characters in a line, then specifying 90ch as max-width should be a pretty decent approximation, even if some lines have 88 characters and others 92 due to the variable width font.
I'm not sure how this could be easily  achieved with margins.

As for my specific choice to use 80ch, I wanted to minimise line length without cutting the edges off the code blocks. Looking at the Yodl source, it looked to be hard wrapped to approximately 80 characters, so I hoped this would be a good balance. However, the code blocks are monospaced, so 90ch might be a safer max-width for the variable width body.

I also included `overflow: auto` for the pre tag to ensure that any code blocks longer than the max-width would get scroll bars.


[1] https://practicaltypography.com/line-length.html


[-- Attachment #2: Type: text/html, Size: 3859 bytes --]

  reply	other threads:[~2022-03-05  8:52 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-02 13:08 David Wales
2022-03-02 14:26 ` Peter Stephenson
2022-03-03 11:19 ` Daniel Shahaf
2022-03-03 22:15   ` David Wales
2022-03-04 13:12     ` Daniel Shahaf
2022-03-05  8:47       ` David Wales [this message]
2022-03-10 15:37         ` Vincent Lefevre
2022-03-10 16:23           ` Vin Shelton
2022-03-10 16:31             ` Peter Stephenson
2022-03-10 17:17               ` Clinton Bunch
2022-03-10 21:12                 ` Lawrence Velázquez
2022-03-10 21:30                   ` Clinton Bunch
2022-03-10 21:39                     ` Bart Schaefer
2022-03-10 22:43                     ` Vin Shelton
2022-03-10 23:26                     ` Lawrence Velázquez
2022-03-10 19:20               ` Vin Shelton
2022-03-03 23:27   ` Lawrence Velázquez
2022-03-03 22:37 ` Axel Beckert
2022-03-03 23:23   ` Lawrence Velázquez
2022-03-04  0:12     ` Bart Schaefer
2022-03-04  2:44       ` Lawrence Velázquez
2022-03-04 13:26         ` Daniel Shahaf
2022-03-05  6:34           ` Lawrence Velázquez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7EC01F45-DDB2-4941-B576-8B560E7298A6@disroot.org \
    --to=daviewales@disroot.org \
    --cc=d.s@daniel.shahaf.name \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).