From a4ad808eb804e32edf3b848c229542b759db0102 Mon Sep 17 00:00:00 2001 From: Owen Jacobson Date: Thu, 15 May 2025 20:46:49 -0400 Subject: Move placeholder-related CSS into `textarea.css`. --- ui/styles/forms.css | 5 ----- ui/styles/textarea.css | 8 +++----- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/ui/styles/forms.css b/ui/styles/forms.css index a8789b1..98fd43e 100644 --- a/ui/styles/forms.css +++ b/ui/styles/forms.css @@ -23,11 +23,6 @@ form.form > button { margin: 0.25rem; } -[data-placeholder]:empty:before { - content: attr(data-placeholder); - color: var(--light-text); -} - .disabled { color: var(--light-text); } diff --git a/ui/styles/textarea.css b/ui/styles/textarea.css index 4dc804a..d315bcf 100644 --- a/ui/styles/textarea.css +++ b/ui/styles/textarea.css @@ -6,11 +6,9 @@ align-items: stretch; } -/* The second selector is more generally useful, but it doesn't seem to work, - * so I added in the first selector. */ -.textarea:empty:before, -[contenteditable='true']:empty:before { - content: attr(placeholder); +[data-placeholder]:empty:before { + content: attr(data-placeholder); + color: var(--light-text); pointer-events: none; display: block; /* For Firefox */ } -- cgit v1.2.3