From e092f06d01855e392818fd95e0f4d7453fd86efc Mon Sep 17 00:00:00 2001 From: Samuel Mannehed Date: Sun, 12 Jan 2025 23:15:23 +0100 Subject: [PATCH] Move general :disabled rules to common top section Start with general stuff, followed by specific things. --- app/styles/input.css | 43 ++++++++++++++++++++----------------------- 1 file changed, 20 insertions(+), 23 deletions(-) diff --git a/app/styles/input.css b/app/styles/input.css index d9c35041..81dcff03 100644 --- a/app/styles/input.css +++ b/app/styles/input.css @@ -12,7 +12,11 @@ --input-xpadding: 1em; } -input, input::file-selector-button, button, select, textarea { +input, +textarea, +button, +select, +input::file-selector-button { padding: 0.5em var(--input-xpadding); border-radius: 6px; appearance: none; @@ -20,6 +24,21 @@ input, input::file-selector-button, button, select, textarea { /* Respect standard font settings */ font: inherit; } +input:disabled, +textarea:disabled, +button:disabled, +select:disabled { + opacity: 0.4; +} + +input:focus-visible, +textarea:focus-visible, +button:focus-visible, +select:focus-visible, +input:focus-visible::file-selector-button { + outline: 2px solid var(--novnc-lightblue); + outline-offset: 1px; +} /* * Text input @@ -371,28 +390,6 @@ input[type=file] { input::file-selector-button { margin-right: 6px; } - -/* - * Focus (tab) - */ -input:focus-visible, -input:focus-visible::file-selector-button, -button:focus-visible, -select:focus-visible, -textarea:focus-visible { - outline: 2px solid var(--novnc-lightblue); - outline-offset: 1px; -} input[type=file]:focus-visible { outline: none; /* We outline the button instead of the entire element */ } - -/* - * Disabled - */ -input:disabled, -button:disabled, -select:disabled, -textarea:disabled { - opacity: 0.4; -}