Index | Thread | Search

From:
"Paul W. Rankin" <hello@paulwrankin.com>
Subject:
httpd: improve directory index CSS
To:
tech@openbsd.org
Date:
Fri, 31 May 2024 15:23:25 +1000

Download raw body.

Thread
It looks like the original email was blackholed. Here it is again...

This patch adds the CSS property font-variant-emoji: text to the 
directory index. When supported this property prevents the unicode "up 
and down" arrow being displayed as an emoji. Currently this property 
needs to be explicitly enabled by users in Firefox and Safari, but will 
hopefully be default soon.

More info:
https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant-emoji

This patch also removes the italic styling on directories. I think this 
is preferable because the directories are already bold and the italics 
make the bottom of the characters squash up against each other.


diff --git usr.sbin/httpd/css.h.in usr.sbin/httpd/css.h.in
index 96ec89f2f..a5d6c968f 100644
--- usr.sbin/httpd/css.h.in
+++ usr.sbin/httpd/css.h.in
@@ -3,6 +3,7 @@ body {
   background-color: white; 
   color: black; 
   font-family: sans-serif;
+    font-variant-emoji: text;
}
table {
   border-collapse: collapse; 
@@ -18,7 +19,6 @@ tr.sort th.sorted { font-weight: bold; }
tr.sort th::after { content: "\a0\2195"; }
tr.dir td:nth-child(2n+1) { 
   font-weight: bold; 
-    font-style: italic; 
}
td, th { padding: 2pt 2em; }
td:first-child, th:first-child { padding-left: 5pt; }