Skip to content

Commit 15002b6

Browse files
committed
fix alignment issues of ha-checkbox
1 parent 9857de1 commit 15002b6

2 files changed

Lines changed: 17 additions & 4 deletions

File tree

custom_components/alarmo/frontend/src/components/alarmo-duration-picker.ts

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ export class AlarmoDurationPicker extends LitElement {
225225
margin-left: 10px;
226226
}
227227
ha-checkbox {
228-
margin-top: 4px;
228+
margin-top: 18px;
229229
}
230230
ha-input {
231231
width: 70px;
@@ -238,20 +238,29 @@ export class AlarmoDurationPicker extends LitElement {
238238
ha-input::part(wa-input) {
239239
text-align: center;
240240
}
241+
ha-input#minutes::part(wa-base) {
242+
border-top-right-radius: 0px;
243+
}
244+
ha-input#seconds::part(wa-base) {
245+
border-top-left-radius: 0px;
246+
}
241247
.time-separator {
242248
background-color: var(--ha-color-form-background);
243249
color: var(--ha-color-text-secondary);
244250
border-bottom: 1px solid var(--ha-color-border-neutral-loud);
245251
box-sizing: border-box;
246252
height: 56px;
247-
width: 12px;
248-
margin-inline-start: calc(var(--ha-space-1) * -1);
249-
margin-inline-end: calc(var(--ha-space-1) * -1);
253+
width: 9px;
250254
display: flex;
251255
align-items: center;
252256
justify-content: center;
253257
font-size: 16px;
254258
font-weight: 600;
259+
transition: background 0.15s ease-in-out;
260+
}
261+
:host([disabled]) .time-separator {
262+
background-color: var(--ha-color-form-background-disabled);
263+
opacity: 0.5;
255264
}
256265
div.column {
257266
display: flex;

custom_components/alarmo/frontend/src/components/alarmo-table.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,10 @@ export class AlarmoTable extends LitElement {
344344
div.table-cell > ha-icon-button {
345345
color: var(--secondary-text-color);
346346
}
347+
div.table-cell > ha-checkbox {
348+
display: flex;
349+
align-items: center;
350+
}
347351
div.table-cell > * {
348352
transition: color 0.2s ease-in-out;
349353
}

0 commit comments

Comments
 (0)