Skip to content

Commit

Permalink
fix: reduce spacing between checkbox label and helper or error (#7359)
Browse files Browse the repository at this point in the history
  • Loading branch information
web-padawan authored Apr 24, 2024
1 parent a2d703e commit 706b40c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 8 additions & 10 deletions packages/checkbox/theme/lumo/vaadin-checkbox-styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ registerStyles(
--_focus-ring-color: var(--vaadin-focus-ring-color, var(--lumo-primary-color-50pct));
--_focus-ring-width: var(--vaadin-focus-ring-width, 2px);
--_selection-color: var(--vaadin-selection-color, var(--lumo-primary-color));
--_helper-spacing: var(--vaadin-input-field-helper-spacing, 0.2em);
--_invalid-background: var(--vaadin-input-field-invalid-background, var(--lumo-error-color-10pct));
}
Expand Down Expand Up @@ -268,11 +267,11 @@ registerStyles(
padding-inline-start: var(--lumo-space-xs);
}
:host([has-error-message]) [part='error-message']::before,
:host([has-error-message]) [part='error-message']::after {
:host([has-error-message]) [part='error-message']::after,
:host([has-helper]) [part='helper-text']::after {
content: '';
display: block;
height: 0.2em;
height: 0.4em;
}
:host(:not([invalid])) [part='error-message'] {
Expand All @@ -281,12 +280,6 @@ registerStyles(
}
/* Helper */
:host([has-helper]) [part='helper-text']::before {
content: '';
display: block;
height: var(--_helper-spacing);
}
[part='helper-text'] {
display: block;
color: var(--vaadin-input-field-helper-color, var(--lumo-secondary-text-color));
Expand All @@ -301,6 +294,11 @@ registerStyles(
:host(:hover:not([readonly])) [part='helper-text'] {
color: var(--lumo-body-text-color);
}
:host([has-error-message]) ::slotted(label),
:host([has-helper]) ::slotted(label) {
padding-bottom: 0;
}
`,
{ moduleId: 'lumo-checkbox' },
);

0 comments on commit 706b40c

Please sign in to comment.