From cfa445aa2695707c468c4c173aa78e1fd2d745e7 Mon Sep 17 00:00:00 2001 From: Luke Harris Date: Tue, 20 Dec 2022 17:35:23 -0600 Subject: [PATCH 1/3] Prevent buttons from staying highlighted after clicking Fixes #129 --- simple.css | 6 ------ 1 file changed, 6 deletions(-) diff --git a/simple.css b/simple.css index 83c4ece..6760b6d 100644 --- a/simple.css +++ b/simple.css @@ -220,17 +220,11 @@ abbr[title] { text-decoration-style: dotted; } -button:focus, button:enabled:hover, -[role="button"]:focus, [role="button"]:not([aria-disabled="true"]):hover, -input[type="submit"]:focus, input[type="submit"]:enabled:hover, -input[type="reset"]:focus, input[type="reset"]:enabled:hover, -input[type="button"]:focus, input[type="button"]:enabled:hover, -label[type="button"]:focus, label[type="button"]:hover { filter: brightness(1.4); cursor: pointer; From 71641c3856c561fd43a8fec11ef906d179fdd354 Mon Sep 17 00:00:00 2001 From: Luke Harris Date: Sat, 24 Dec 2022 11:31:51 -0600 Subject: [PATCH 2/3] [buttons] style outline to match theme --- simple.css | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/simple.css b/simple.css index 6760b6d..0c222d4 100644 --- a/simple.css +++ b/simple.css @@ -230,6 +230,15 @@ label[type="button"]:hover { cursor: pointer; } +button:focus-visible:where(:enabled, [role="button"]:not([aria-disabled="true"])), +input:enabled:focus-visible:where([type="submit"], + [type="reset"], + [type="button"], +) { + outline: 2px solid var(--accent); + outline-offset: 1px; +} + /* Format navigation */ header > nav { font-size: 1rem; From 5a9740742420f6b92ae6879425990fd20250390a Mon Sep 17 00:00:00 2001 From: Luke Harris Date: Sat, 24 Dec 2022 11:35:47 -0600 Subject: [PATCH 3/3] [input] fix contrast issue on disabled buttons --- simple.css | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/simple.css b/simple.css index 0c222d4..1d90d97 100644 --- a/simple.css +++ b/simple.css @@ -198,15 +198,16 @@ input[type="button"][disabled], input[type="checkbox"][disabled], input[type="radio"][disabled], select[disabled] { - opacity: 0.5; cursor: not-allowed; } input:disabled, textarea:disabled, -select:disabled { +select:disabled, +button[disabled] { cursor: not-allowed; background-color: var(--disabled); + color: var(--text-light) } input[type="range"] {