Skip to content
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
2 changes: 2 additions & 0 deletions packages/vaadin-lumo-styles/components/checkbox.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
*/
@import '../src/mixins/checkable-field.css';
@import '../src/mixins/field-required.css';
@import '../src/components/checkbox.css';

:root,
:host {
--_lumo-vaadin-checkbox-inject: 1;
--_lumo-vaadin-checkbox-inject-modules:
lumo_mixins_checkable-field,
lumo_mixins_field-required,
lumo_components_checkbox;
}
16 changes: 1 addition & 15 deletions packages/vaadin-lumo-styles/src/components/checkbox.css
Original file line number Diff line number Diff line change
Expand Up @@ -225,14 +225,7 @@
}

:host([required]) [part='required-indicator']::after {
content: var(--vaadin-input-field-required-indicator, var(--lumo-required-field-indicator, '\2022'));
transition: opacity 0.2s;
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This was copied from form-item.css but not working as in checkbox, indicator is hidden using display: none and not opacity.

color: var(
--vaadin-input-field-required-indicator-color,
var(--lumo-required-field-indicator-color, var(--lumo-primary-text-color))
);
width: 1em;
text-align: center;
position: static;
Copy link
Copy Markdown
Member Author

@web-padawan web-padawan May 13, 2026

Choose a reason for hiding this comment

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

This is needed because in case of checkbox, the indicator itself is positioned and not ::after.
We could probably change that in the future when modifying Lumo to use base styles.

}

:host(:not([has-label])) [part='required-indicator'] {
Expand All @@ -259,13 +252,6 @@
--_focus-ring-color: var(--lumo-error-color-50pct);
}

:host([invalid]) [part='required-indicator']::after {
color: var(
--vaadin-input-field-required-indicator-color,
var(--lumo-required-field-indicator-color, var(--lumo-error-text-color))
);
}

/* Error message */
[part='error-message'] {
font-size: var(--vaadin-input-field-error-font-size, var(--lumo-font-size-xs));
Expand Down
Loading