From 3edb75bba6990e512fd55e5c6f5aeae0fb2bf215 Mon Sep 17 00:00:00 2001 From: Ilya Siamionau Date: Sat, 25 Apr 2026 00:10:27 +0200 Subject: [PATCH] Fix invalid state styling on vscode-textfield The :host([invalid]) selectors set border-color but the border lives on .root, so the rule had no effect. Retarget them to .root and move the error background there too, so the red fill follows the rounded corners instead of poking out as a square. Also unquote the font-weight fallback (the quoted 'normal' keyword made the declaration invalid) and align the border fallback default with the background default so they match when no CSS variable is set. Add a test for invalid property reflection and update the cssprop docs. --- .../validation-min-validation.html | 2 +- .../validation-on-value-change.html | 2 +- .../vscode-textfield.styles.ts | 19 ++++++++++--------- src/vscode-textfield/vscode-textfield.test.ts | 18 ++++++++++++++++++ src/vscode-textfield/vscode-textfield.ts | 3 +-- 5 files changed, 31 insertions(+), 13 deletions(-) diff --git a/dev/vscode-textfield/validation-min-validation.html b/dev/vscode-textfield/validation-min-validation.html index 48cc51c64..f05708a80 100644 --- a/dev/vscode-textfield/validation-min-validation.html +++ b/dev/vscode-textfield/validation-min-validation.html @@ -21,7 +21,7 @@

Textfield

-

File input

+

Validation min validation