From de81cdf84854cf252a1550d85894ca3c56b293b5 Mon Sep 17 00:00:00 2001 From: bakaneko Date: Thu, 21 Nov 2024 17:46:39 +0900 Subject: [PATCH 1/3] don't override error colour when focused --- resources/css/bem/input-container.less | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/resources/css/bem/input-container.less b/resources/css/bem/input-container.less index a05fdc0d5d2..96d539b64da 100644 --- a/resources/css/bem/input-container.less +++ b/resources/css/bem/input-container.less @@ -2,6 +2,8 @@ // See the LICENCE file in the repository root for full licence text. .input-container { + @top: input-container; + --label-font-size: @font-size--normal; --label-line-height: 1.25; --label-height: calc( @@ -32,6 +34,10 @@ &:focus-within { --input-border-colour: var(--input-border-focus-colour); + + .@{top}--error& { + --input-border-colour: var(--input-border-error-colour); + } } &:hover { From de965c798d3b2182e78e26f53ef75470e2fd43cb Mon Sep 17 00:00:00 2001 From: bakaneko Date: Fri, 22 Nov 2024 15:15:10 +0900 Subject: [PATCH 2/3] change focus colour instead --- resources/css/bem/input-container.less | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/resources/css/bem/input-container.less b/resources/css/bem/input-container.less index 96d539b64da..858749bedc2 100644 --- a/resources/css/bem/input-container.less +++ b/resources/css/bem/input-container.less @@ -34,10 +34,6 @@ &:focus-within { --input-border-colour: var(--input-border-focus-colour); - - .@{top}--error& { - --input-border-colour: var(--input-border-error-colour); - } } &:hover { @@ -58,6 +54,7 @@ &--error { --input-border-colour: var(--input-border-error-colour); + --input-border-focus-colour: var(--input-border-error-colour); } &--fill { From a19e32de86185e90870fdd7b54d7dd8d270d1597 Mon Sep 17 00:00:00 2001 From: bakaneko Date: Fri, 22 Nov 2024 15:31:42 +0900 Subject: [PATCH 3/3] slightly darker colour when focused; also fix the hover colour --- resources/css/bem/input-container.less | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/resources/css/bem/input-container.less b/resources/css/bem/input-container.less index 858749bedc2..14435ffd171 100644 --- a/resources/css/bem/input-container.less +++ b/resources/css/bem/input-container.less @@ -18,6 +18,7 @@ --input-border-hover-colour: hsl(var(--hsl-l3)); --input-border-focus-colour: hsl(var(--hsl-l1)); --input-border-error-colour: hsl(var(--hsl-red-2)); + --input-border-error-focus-colour: hsl(var(--hsl-red-3)); --input-padding: var(--label-height) var(--input-padding-right) var(--input-padding-base) var(--input-padding-base); --input-padding-base: 10px; @@ -54,7 +55,8 @@ &--error { --input-border-colour: var(--input-border-error-colour); - --input-border-focus-colour: var(--input-border-error-colour); + --input-border-focus-colour: var(--input-border-error-focus-colour); + --input-border-hover-colour: var(--input-border-error-focus-colour); } &--fill {