Skip to content

Commit ccd4024

Browse files
paodbscardanzan
authored andcommitted
fix: center slider vertically across size variants
Close #5
1 parent 88c71d7 commit ccd4024

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

src/main/resources/META-INF/resources/frontend/fc-toggle-button.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,12 +362,22 @@ class ToggleButton extends LitElement {
362362
}
363363
364364
:host([readonly]) .slider {
365-
top: 1px;
366-
left: 1px;
365+
top: 2px;
366+
left: 2px;
367367
box-shadow: none;
368368
background-color: var(--lumo-contrast-40pct, var(--vaadin-background-container-strong));
369369
}
370370
371+
:host([readonly][theme~="small"]) .slider {
372+
top: 1px;
373+
left: 1px;
374+
}
375+
376+
:host([readonly][theme~="large"]) .slider {
377+
top: 3px;
378+
left: 3px;
379+
}
380+
371381
/* Readonly + checked + color variant: desaturated variant tint on the border. */
372382
:host([theme~="primary"][checked][readonly]) .switch {
373383
background-color: transparent;

0 commit comments

Comments
 (0)