unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
From: "Štěpán Němec" <stepnem@smrk.net>
To: Eric Wong <e@80x24.org>
Cc: meta@public-inbox.org,  "Robin H. Johnson" <robbat2@gentoo.org>
Subject: Re: [PATCH 4/5] www: allow specifying CSS @import or <link> tags
Date: Thu, 26 Sep 2024 20:34:02 +0200	[thread overview]
Message-ID: <20240926183402Z.161922298-stepnem@smrk.net> (raw)
In-Reply-To: <20240926005506.3703216-5-e@80x24.org> (Eric Wong's message of "Thu, 26 Sep 2024 00:55:04 +0000")

On Thu, 26 Sep 2024 00:55:04 +0000
Eric Wong wrote:

[...]

> diff --git a/Documentation/public-inbox-config.pod b/Documentation/public-inbox-config.pod
> index 50746b21..e968bc49 100644
> --- a/Documentation/public-inbox-config.pod
> +++ b/Documentation/public-inbox-config.pod
> @@ -255,13 +255,21 @@ Default: :all
>  
>  =item publicinbox.css
>  
> -The local path name of a CSS file for the PSGI web interface.
> -May contain the attributes "media", "title" and "href" which match
> -the associated attributes of the HTML <style> tag.
> -"href" may be specified to point to the URL of a remote CSS file
> +The local path name of a CSS file for the PSGI web interface.  May
> +contain the attributes C<media>, C<title> and C<href> which match the
> +associated attributes of the HTML C<E<lt>styleE<gt>> tag.
> +
> +As of public-inbox 2.0+, C<load> may be C<link> or C<import>;
> +C<link> forces the use of a C<E<lt>linkE<gt>> tag and disable inlining
                                                         ^^^^^^^
disables

I admit that reading this I had no idea what this was
talking about at first, as in, local path name "may contain
attributes"?  Looking at the code, it seems somewhat in the
style of gitattributes(5), plus you handle single-quoted
string values (i.e., embedded spaces), unlike git (looking
at attr.c:parse_attr).

I wonder if a bit of hand-holding (AKA documentation)
could/should be provided here?

Perhaps, if I understand the behavior correctly:

  The local path name of a CSS file for the PSGI web interface.
  Space-separated attributes (C<key=val> or C<key='val with spaces'>)
  may be specified after the path on the same line; C<media>, C<title>
  and C<href> are currently supported, and match the associated attributes
  of the HTML C<E<lt>styleE<gt>> tag.
  
  public-inbox 2.0+ also supports a C<load> attribute with values
  C<link> or C<import>; C<link> forces the use of a C<E<lt>linkE<gt>> tag
  and disables inlining [...]

> +CSS into the C<E<lt>styleE<gt>> tag while C<import> puts CSS C<@import>
> +statements into the C<E<lt>styleE<gt>> tag.  C<import> appears necessary
> +for some browser and C<media> query combinations.
> +C<href> may be specified to point to the URL of a remote CSS file
>  and the path may be "/dev/null" or any empty file.
> +
>  Multiple files may be specified and will be included in the
> -order specified.
> +order specified, but files specified via C<load=import> are
> +always handled first.

[...]

-- 
Štěpán

  reply	other threads:[~2024-09-26 18:33 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-01  5:07 CSS behaviors bug report: dark/light switch non-functional Robin H. Johnson
2024-09-18  0:04 ` Eric Wong
2024-09-26  0:55 ` [PATCH 0/5] css improvements (hopefully) Eric Wong
2024-09-26  0:55   ` [PATCH 1/5] user_content: simplify internal API and use v5.12 Eric Wong
2024-09-26  0:55   ` [PATCH 2/5] www: don't reread CSS files Eric Wong
2024-09-26  0:55   ` [PATCH 3/5] www: load CSS files in same dir if @import is in use Eric Wong
2024-09-26  0:55   ` [PATCH 4/5] www: allow specifying CSS @import or <link> tags Eric Wong
2024-09-26 18:34     ` Štěpán Němec [this message]
2024-09-28 18:39       ` [PATCH v2] " Eric Wong
2024-09-28 19:29         ` Štěpán Němec
2024-09-28 20:42           ` Eric Wong
2024-09-29  0:22             ` Eric Wong
2024-09-26  0:55   ` [PATCH 5/5] www: use mtime as CSS cache-buster instead of ctime Eric Wong

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

  List information: https://public-inbox.org/README

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

  git send-email \
    --in-reply-to=20240926183402Z.161922298-stepnem@smrk.net \
    --to=stepnem@smrk.net \
    --cc=e@80x24.org \
    --cc=meta@public-inbox.org \
    --cc=robbat2@gentoo.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.
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 read-only IMAP folder(s) and NNTP newsgroup(s).