Skip to content

Commit 5780181

Browse files
authored
Update DPT reference schema format for readability (#420)
1 parent dca4ebf commit 5780181

1 file changed

Lines changed: 22 additions & 9 deletions

File tree

src/views/dpt_reference.ts

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -153,11 +153,11 @@ export class KnxDptReference extends LitElement {
153153
details.push(html`options: <code>${pythonList}</code>`);
154154
}
155155
return html`
156-
<li>
156+
<li class="schema-field">
157157
<code>${field.name}</code>
158-
<span>
159-
${details.map((part, index) => html`${index > 0 ? ", " : ""}${part}`)}
160-
</span>
158+
<ul class="schema-field-details">
159+
${details.map((part) => html`<li>${part}</li>`)}
160+
</ul>
161161
</li>
162162
`;
163163
})}
@@ -419,18 +419,31 @@ export class KnxDptReference extends LitElement {
419419
}
420420
421421
.schema-list {
422-
display: grid;
423-
grid-template-columns: max-content 1fr;
424-
gap: 2px 12px;
422+
display: flex;
423+
flex-direction: column;
424+
gap: 8px;
425425
margin: 0;
426426
padding: 0;
427427
margin-inline-start: var(--ha-space-2);
428428
list-style: none;
429429
line-height: 1.3;
430430
}
431431
432-
.schema-list li {
433-
display: contents;
432+
.schema-field {
433+
display: flex;
434+
flex-direction: column;
435+
gap: 2px;
436+
}
437+
438+
.schema-field-details {
439+
margin: 0;
440+
padding: 0;
441+
margin-inline-start: var(--ha-space-4);
442+
list-style: none;
443+
}
444+
445+
.schema-field-details li {
446+
line-height: 1.35;
434447
}
435448
436449
code {

0 commit comments

Comments
 (0)