Fix invalid state styling on vscode-textfield#618
Open
MarshalX wants to merge 1 commit intovscode-elements:mainfrom
Open
Fix invalid state styling on vscode-textfield#618MarshalX wants to merge 1 commit intovscode-elements:mainfrom
MarshalX wants to merge 1 commit intovscode-elements:mainfrom
Conversation
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.
Author
|
@bendera Hi, please take a look when you have time. I found this while working with vscode-textarea at the same time. They behave differently when the value is invalid
<h2>vscode-textfield</h2>
<vscode-textfield invalid value="invalid value"></vscode-textfield>
<h2>vscode-textarea</h2>
<vscode-textarea invalid value="invalid value"></vscode-textarea> |
Member
|
Hi, Thnak you for your contribution. I haven't frogotten about this PR, but I have limited time. Focus border: I want to keep the blue error focus border, otherwise cannot be distinguished the focused state. It's a bit awkward - any ideas are welcome. |
Author
|
Hi! The blue focus border makes sense. But if we change it, it won’t match |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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.
Before
Focused:

Unfocused:

Glitched border corner:

After
Focused:

Unfocused:

Rounded border corner:
