Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: improve readonly invalid input container styles #7204

Merged
merged 1 commit into from
Mar 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ describe('input-container', () => {
await visualDiff(div, 'invalid');
});

it('readonly invalid', async () => {
element.readonly = true;
element.invalid = true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix 👍 would it make sense to add text in the field to ensure that it's readable?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, probably. We don't have visual tests for regular readonly with value. Created an issue: #7207

await visualDiff(div, 'readonly-invalid');
});

it('prefix icon', async () => {
const icon = document.createElement('vaadin-icon');
icon.setAttribute('slot', 'prefix');
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ registerStyles(
background: var(--_invalid-background);
}

:host([invalid])::after {
:host([invalid]:not([readonly]))::after {
background: var(--_invalid-hover-highlight);
}

Expand Down
Loading