summaryrefslogtreecommitdiff
path: root/ui/styles
diff options
context:
space:
mode:
authorOwen Jacobson <owen@grimoire.ca>2025-05-13 20:40:23 -0400
committerOwen Jacobson <owen@grimoire.ca>2025-05-13 21:11:00 -0400
commit61b3e3cba8a11a53947ce0e7c8a6980fb20ef914 (patch)
tree987df3b61ba30b25efcc0bf395169d0c8b76a5aa /ui/styles
parente623ab68e7f4d1a9bd8222aa8d8f5d9108a238c0 (diff)
Restore the placeholder when the editable input is emptied out after modification.
This also avoids using `placeholder` on elements where it's nonstandard, like `<div>`s.
Diffstat (limited to 'ui/styles')
-rw-r--r--ui/styles/forms.css3
1 files changed, 2 insertions, 1 deletions
diff --git a/ui/styles/forms.css b/ui/styles/forms.css
index 1c1ae5c..a8789b1 100644
--- a/ui/styles/forms.css
+++ b/ui/styles/forms.css
@@ -23,7 +23,8 @@ form.form > button {
margin: 0.25rem;
}
-[contenteditable]:empty {
+[data-placeholder]:empty:before {
+ content: attr(data-placeholder);
color: var(--light-text);
}