From 1b5e0cf92d5bce423b44ad758effd6b272fe3358 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Sch=C3=A4r?= <59233938+schaertim@users.noreply.github.com> Date: Wed, 25 Sep 2024 16:30:52 +0200 Subject: [PATCH] chore(styles): centered switch and added last missing token --- .changeset/dull-zoos-whisper.md | 2 +- packages/styles/src/components/form-check.scss | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.changeset/dull-zoos-whisper.md b/.changeset/dull-zoos-whisper.md index 358ffa78fb..a1e6d8fd8c 100644 --- a/.changeset/dull-zoos-whisper.md +++ b/.changeset/dull-zoos-whisper.md @@ -2,4 +2,4 @@ '@swisspost/design-system-styles': patch --- -Added v2 styles for the ´switch´ component and utilised available tokens. +Added v2 styles for the ´switch´ component utilizing tokens. diff --git a/packages/styles/src/components/form-check.scss b/packages/styles/src/components/form-check.scss index e842dabc7d..f546bae0a9 100644 --- a/packages/styles/src/components/form-check.scss +++ b/packages/styles/src/components/form-check.scss @@ -214,13 +214,16 @@ $switch-handle-icon: url("data:image/svg+xml,"); .form-switch { + display: flex; + align-items: center; + @include utility-mx.focus-style( $offset: tokens.get('switch', 'focus-outline-offset'), $width: tokens.get('switch', 'focus-border-width'), - $color: tokens.get('switch', 'focus-stroke') + $color: tokens.get('switch', 'focus-stroke'), + $style: tokens.get('switch', 'focus-border-style') ) { border-radius: tokens.get('switch', 'focus-border-radius'); - border-style: tokens.get('switch', 'focus-border-style'); } .form-check-input {