From 20e568baeae5f2c63180d0255f7be07c80bcb843 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Thu, 10 Jun 2021 10:59:00 +0100 Subject: [PATCH] Add more opinionated container styles to make layout out components even easier --- packages/standard-components/src/Container.svelte | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/standard-components/src/Container.svelte b/packages/standard-components/src/Container.svelte index 8b6d295dbd..223dcc7d38 100644 --- a/packages/standard-components/src/Container.svelte +++ b/packages/standard-components/src/Container.svelte @@ -52,11 +52,17 @@ flex-direction: column; } + /* Grow containers inside a row need 0 width 0 so that they ignore content */ + /* The nested selector for data-type is the wrapper around all components */ + .direction-row :global(> [data-type="component"] > .size-grow) { + width: 0; + } + .size-shrink { flex: 0 1 auto; } .size-grow { - flex: 1 1 0; + flex: 1 1 auto; } .direction-row.hAlign-left,