Skip to content

refactor!: Base checkbox styles #9008

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

Open
wants to merge 5 commits into
base: base-styles
Choose a base branch
from
Open

refactor!: Base checkbox styles #9008

wants to merge 5 commits into from

Conversation

anezthes
Copy link
Contributor

@anezthes anezthes commented Apr 25, 2025

New Checkbox base style

localhost_8000_dev_checkbox html (1)

Supported custom properties

Property Description
--vaadin-checkbox-background Background color of the checkbox.
--vaadin-checkbox-border-color Border color of the checkbox.
--vaadin-checkbox-border-radius Border radius of the checkbox.
--vaadin-checkbox-border-width Border width of the checkbox.
--vaadin-checkbox-color Color used for the checkmark or indeterminate icon.
--vaadin-checkbox-gap Gap between the checkbox and the label.
--vaadin-checkbox-label-color Text color of the checkbox label.
--vaadin-checkbox-label-font-size Font size of the checkbox label.
--vaadin-checkbox-label-font-weight Font weight of the checkbox label.
--vaadin-checkbox-label-line-height Line height of the checkbox label.
--vaadin-checkbox-label-padding Padding around the checkbox label.
--vaadin-checkbox-size Size (width and height) of the checkbox.

General concerns

  1. Some of the properties listed at Checkbox Properties are not used:
  • --vaadin-checkbox-background-hover
  • --vaadin-checkbox-disabled-background
  • --vaadin-checkbox-checkmark-char
  • --vaadin-checkbox-checkmark-char-indeterminate
  • --vaadin-checkbox-checkmark-color
  • --vaadin-checkbox-disabled-checkmark-color
  • --vaadin-checkbox-checkmark-size
  1. To use or not to use field-shared-styles.js?

Pros: Provides styling for the required-indicator, helper-text, and error-message parts.
Cons: If we need --vaadin-checkbox-label-* properties, we’ll have to override the label part styles from field-shared-styles.js.

@web-padawan web-padawan changed the base branch from main to base-styles April 26, 2025 06:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants