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

Conversation

web-padawan
Copy link
Member

Description

This fixes a minor issue in vaadin-checkbox-group theme which is currently not aligned with Lumo for other fields:

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

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

Related styles were initially introduced in vaadin/vaadin-checkbox#149 - back then, there was no readony state in vaadin-checkbox-group and I missed to update them later when adding it for 24.4.

This is how the readonly focused checkbox-group label looks now, compared to readonly focused radio-group:
Screenshot 2024-09-06 at 10 56 03
Screenshot 2024-09-06 at 11 02 51

Note: this is specific to Lumo, as we don't have corresponding styles in Material theme.

Type of change

  • Bugfix

Copy link

sonarqubecloud bot commented Sep 6, 2024

@@ -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.

@web-padawan web-padawan merged commit eafe715 into main Sep 10, 2024
9 checks passed
@web-padawan web-padawan deleted the fix/cbg-focused-readonly-label branch September 10, 2024 10:40
web-padawan added a commit that referenced this pull request Sep 10, 2024
…#7787)

Co-authored-by: Serhii Kulykov <iamkulykov@gmail.com>
@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Vaadin 24.5.0.beta2 and is also targeting the upcoming stable 24.5.0 version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants