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: use correct focused readonly checkbox group label styles #7776

Merged
merged 1 commit into from
Sep 10, 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 @@ -49,6 +49,13 @@ describe('checkbox-group', () => {
await visualDiff(div, 'label-focused');
});

it('label focused readonly', async () => {
element.label = 'Label';
element.readonly = true;
await sendKeys({ press: 'Tab' });
await visualDiff(div, 'label-focused-readonly');
});

it('label disabled', async () => {
element.label = 'Label';
element.disabled = true;
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 @@ -35,7 +35,7 @@ const checkboxGroup = css`
-webkit-text-fill-color: var(--lumo-disabled-text-color);
}

:host([focused]:not([disabled])) [part='label'] {
Copy link
Contributor

Choose a reason for hiding this comment

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

To be sure, this style was not applied anyway because there is no way to focus a disabled checkbox group?

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, exactly. I think adding it to the selector was a mistake.

:host([focused]:not([readonly])) [part='label'] {
color: var(--lumo-primary-text-color);
}

Expand Down
Loading