From 6686ccb1d42f74c2f31d6b7f94f02433443a4d44 Mon Sep 17 00:00:00 2001 From: Tomi Virkki Date: Thu, 22 Aug 2024 15:45:09 +0300 Subject: [PATCH] testing --- packages/dashboard/src/vaadin-dashboard-layout-mixin.js | 5 ++++- packages/dashboard/src/vaadin-dashboard-section.js | 5 +++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/dashboard/src/vaadin-dashboard-layout-mixin.js b/packages/dashboard/src/vaadin-dashboard-layout-mixin.js index 5d3c819b87c..dddf5345ea4 100644 --- a/packages/dashboard/src/vaadin-dashboard-layout-mixin.js +++ b/packages/dashboard/src/vaadin-dashboard-layout-mixin.js @@ -36,10 +36,13 @@ export const DashboardLayoutMixin = (superClass) => var(--_vaadin-dashboard-default-col-max-width) ); + /* Effective max column count */ + --_vaadin-dashboard-col-max-count: var(--vaadin-dashboard-col-max-count, infinity); + /* Effective column count */ --_vaadin-dashboard-effective-col-count: min( var(--_vaadin-dashboard-col-count), - var(--vaadin-dashboard-col-max-count) + var(--_vaadin-dashboard-col-max-count) ); display: grid; diff --git a/packages/dashboard/src/vaadin-dashboard-section.js b/packages/dashboard/src/vaadin-dashboard-section.js index ec7a307d76b..fc6a2ef223e 100644 --- a/packages/dashboard/src/vaadin-dashboard-section.js +++ b/packages/dashboard/src/vaadin-dashboard-section.js @@ -34,7 +34,8 @@ class DashboardSection extends ControllerMixin(ElementMixin(PolylitMixin(LitElem :host { display: grid; grid-template-columns: subgrid; - grid-column: 1 / -1 !important; + --_vaadin-dashboard-section-column: 1 / calc(var(--_vaadin-dashboard-effective-col-count) + 1); + grid-column: var(--_vaadin-dashboard-section-column) !important; gap: var(--vaadin-dashboard-gap, 1rem); } @@ -54,7 +55,7 @@ class DashboardSection extends ControllerMixin(ElementMixin(PolylitMixin(LitElem header { display: flex; - grid-column: 1 / -1; + grid-column: var(--_vaadin-dashboard-section-column); justify-content: space-between; align-items: center; }