From fcaf38dd1303918ddff3381ffc5a28f1cb3cfa89 Mon Sep 17 00:00:00 2001 From: Jeremias Peier Date: Thu, 31 Oct 2024 11:37:31 +0100 Subject: [PATCH 01/12] refactor: apply new direction design --- src/elements/core/styles/core.scss | 4 + .../train-formation.snapshot.spec.snap.js | 14 +-- src/elements/train/train-formation/readme.md | 5 - .../train/train-formation/train-formation.ts | 36 +----- src/elements/train/train/train.scss | 114 +++--------------- src/elements/train/train/train.ts | 45 ++++--- 6 files changed, 49 insertions(+), 169 deletions(-) diff --git a/src/elements/core/styles/core.scss b/src/elements/core/styles/core.scss index 38ddec81fe..1c743b012f 100644 --- a/src/elements/core/styles/core.scss +++ b/src/elements/core/styles/core.scss @@ -153,3 +153,7 @@ input[data-sbb-time-input] { max-width: var(--sbb-time-input-s-max-width); } } + +sbb-train-formation:has(sbb-train[direction-label]) { + --sbb-train-formation-reserve-spacing-display: block; +} diff --git a/src/elements/train/train-formation/__snapshots__/train-formation.snapshot.spec.snap.js b/src/elements/train/train-formation/__snapshots__/train-formation.snapshot.spec.snap.js index 49861475ab..852f216a12 100644 --- a/src/elements/train/train-formation/__snapshots__/train-formation.snapshot.spec.snap.js +++ b/src/elements/train/train-formation/__snapshots__/train-formation.snapshot.spec.snap.js @@ -1,7 +1,7 @@ /* @web/test-runner snapshot v1 */ export const snapshots = {}; -snapshots["sbb-train-formation should render with one train DOM"] = +snapshots["sbb-train-formation should render with one train DOM"] = `