]> Sergey Matveev's repositories - public-inbox.git/blob - contrib/css/README
www: admin-configurable CSS via "publicinbox.css"
[public-inbox.git] / contrib / css / README
1 Example CSS for use with public-inbox.
2
3 CSS::Minifier or CSS::Minifier::XS will be tried for minimizing
4 CSS at startup if available(*).
5
6 Multiple CSS files may be configured for user-selectability via
7 the "title" attribute or for different media.  Local CSS files
8 are read into memory once at startup.
9
10 If only one CSS file is given without "title", it will be inlined.
11
12 Snippet from ~/.public-inbox/config, order matters to browsers.
13 -----8<-----
14 [publicinbox]
15         ; Depending on the browser, the first entry is the default.
16         ; So having "/dev/null" at the top means no colors by default.
17         ; Using the "title" attribute enables `View -> "Page Style"'
18         ; choices in Firefox.
19         css = /dev/null title=default
20
21         ; git-config supports backslash to continue long lines
22         ; Attributes ('media', 'title') must use single quotes(')
23         ; or no quotes at all, but not double-quotes, as git-config(1)
24         ; won't preserve them:
25         css = /path/to/public-inbox/contrib/css/216dark.css \
26                 title=216dark \
27                 media='screen,(prefers-color-scheme:dark)'
28
29         ; for tree haters who print web pages :P
30         css = /path/to/public-inbox/contrib/css/216light.css \
31                 title=216light \
32                 media='screen,print,(prefers-color-scheme:light)'
33
34         ; external CSS may be specified with href.
35         ; Using "//" (protocol-relative) URLs is allowed, as is
36         ; "https://" or "http://" for hosts which only support one protocol.
37         css = href=//example.com/fugly.css title=external
38
39
40 (*) "libcss-minifier-perl" or "libcss-minifier-xs-perl"
41     on Debian-based systems