chiark / gitweb /
webstead: almost-acceptable pixel-looking input
authorBen Harris <bjh21@bjh21.me.uk>
Tue, 16 Sep 2025 21:32:40 +0000 (22:32 +0100)
committerBen Harris <bjh21@bjh21.me.uk>
Tue, 13 Jan 2026 21:42:18 +0000 (21:42 +0000)
webstead.xhtml

index 0c23a5bd80633d62bde86342a620f88ff32983e8..b07c812200f58e4ea24bdb7de8fffb5d8da946a8 100644 (file)
@@ -3,6 +3,26 @@
     <!-- SPDX-License-Identifier: CC0-1.0 -->
     <link rel="stylesheet" href="bedstead.css" type="text/css" />
     <title>Bedstead editor test</title>
+    <style>
+      :root {
+          --pix: 50px;
+      }
+      #pixels {
+          border-spacing: 0;
+      }
+      #pixels td {
+          padding: 0;
+      }
+      #pixels input {
+          appearance: none;
+          margin: 0;
+          width: var(--pix);
+          height: var(--pix);
+      }
+      #pixels input:checked {
+          background: #33ff88;
+      }
+    </style>
     <script type="module"><![CDATA[
     import Bedstead from './bedstead.js';
     function update_glyph() {