mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-21 08:16:36 +00:00
Add section max width variable to section view (#19995)
This commit is contained in:
parent
d951e68c10
commit
8ca5b7528b
@ -253,12 +253,19 @@ export class SectionsView extends LitElement implements LovelaceViewElement {
|
||||
--grid-gap: 32px;
|
||||
--grid-max-section-count: 4;
|
||||
--grid-section-min-width: 320px;
|
||||
--grid-section-max-width: 500px;
|
||||
|
||||
/* Calculated */
|
||||
--max-count: min(var(--section-count), var(--grid-max-section-count));
|
||||
--grid-max-width: calc(
|
||||
--grid-max-width: min(
|
||||
calc(
|
||||
(var(--max-count) + 1) * var(--grid-section-min-width) +
|
||||
(var(--max-count) + 2) * var(--grid-gap) - 1px
|
||||
),
|
||||
calc(
|
||||
var(--max-count) * var(--grid-section-max-width) +
|
||||
(var(--max-count) + 1) * var(--grid-gap)
|
||||
)
|
||||
);
|
||||
|
||||
display: grid;
|
||||
|
Loading…
x
Reference in New Issue
Block a user