shithub: puzzles

Download patch

ref: 5a2ea91cad4dd34fb766498a032294eb3c7a09b2
parent: 38e17ebab2488aaac4fcb0d5fb06ed03d5eb7e41
author: Ben Harris <bjh21@bjh21.me.uk>
date: Thu Nov 24 18:28:28 EST 2022

js: Subtle extra padding for menus

Each menu item has a -0.5px margin so that the borders of adjacent menu
items overlap, but we don't actually want the menu items to protrude
beyond the containing <ul>.  Adding 0.5px of padding to the <ul>
achieves that.

--- a/html/jspage.pl
+++ b/html/jspage.pl
@@ -93,7 +93,10 @@
     flex-wrap: wrap;
     justify-content: center;
     margin: 0;
-    padding: 0;
+    /* Compensate for the negative margins on menu items by adding a
+     * little bit of padding so that the borders of the items don't protrude
+     * beyond the menu. */
+    padding: 0.5px;
 }
 
 /* Individual menu items are <li> elements within such a <ul> */