summaryrefslogtreecommitdiff
path: root/src/css
diff options
context:
space:
mode:
authorElizabeth Hunt <me@liz.coffee>2025-12-15 00:12:19 -0800
committerElizabeth Hunt <me@liz.coffee>2025-12-15 00:12:19 -0800
commit4c3b19b78230873ab067d5235124b1587543aa3e (patch)
treebba6e52fc739ff7e266814b16d9e257bbdbf00ab /src/css
parentbb346387d4b279189fc106d37369cc1d73c4ca3d (diff)
downloadadelie-4c3b19b78230873ab067d5235124b1587543aa3e.tar.gz
adelie-4c3b19b78230873ab067d5235124b1587543aa3e.zip
Add file input
Diffstat (limited to 'src/css')
-rw-r--r--src/css/style.css40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/css/style.css b/src/css/style.css
index 3f8e8f5..e5aee32 100644
--- a/src/css/style.css
+++ b/src/css/style.css
@@ -919,6 +919,46 @@ input[type="range"]::-moz-range-progress {
box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.6), inset -2px -2px 0 rgba(0, 0, 0, 0.3);
}
+/* file inputs */
+
+input[type="file"] {
+ display: none;
+}
+
+label.file-input-button {
+ display: inline-block;
+ font-family: var(--font-mono);
+ font-weight: 700;
+ padding: var(--space-xs) var(--space-sm);
+ border: 2px outset var(--border-light);
+ background: var(--surface);
+ color: var(--fg);
+ font-size: 0.875rem;
+ box-shadow: inset 1px 1px 0 var(--highlight), inset -1px -1px 0 var(--lowlight), 2px 2px 0
+ rgba(0, 0, 0, 0.18);
+ transition: transform 0.05s, box-shadow 0.05s, background 0.1s;
+ user-select: none;
+ width: 100%;
+ text-align: center;
+ box-sizing: border-box;
+ margin-top: var(--space-xs);
+}
+
+label.file-input-button:hover {
+ background: var(--surface-alt);
+}
+
+label.file-input-button:active {
+ transform: translate(1px, 1px);
+ border-style: inset;
+ box-shadow: inset 1px 1px 0 var(--lowlight), inset -1px -1px 0 var(--highlight);
+}
+
+input[type="file"]:focus-visible + label.file-input-button {
+ outline: 1px dotted var(--fg);
+ outline-offset: 2px;
+}
+
fieldset {
border: 2px solid var(--border-light);
padding: var(--space-md);