From 318a2ce67c028fb763e4d8f862e426170221017b Mon Sep 17 00:00:00 2001 From: Michael Claesson Date: Tue, 11 Feb 2025 12:35:29 +0100 Subject: [PATCH] feat: support for action position (#1010) --- source/sass/component/_notice.scss | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/source/sass/component/_notice.scss b/source/sass/component/_notice.scss index ff5d16c7a..a5af4fd38 100644 --- a/source/sass/component/_notice.scss +++ b/source/sass/component/_notice.scss @@ -171,6 +171,31 @@ $c-notice-border-radius: var(--notice-border-radius, $border-radius-sm) !default @include stretch(); } +.c-notice.c-notice--action-below { + grid-template-areas: + "icon title" + "icon message" + ". actions"; + + .c-notice__actions { + margin-top: var(--base, 8px); + justify-content: flex-start; + } + + // Remove gaps when elements are missing + &:not(:has(.c-notice__title)) { + grid-template-areas: + "icon message" + ". actions"; + } + + &:not(:has(.c-notice__message)) { + grid-template-areas: + "icon title" + ". actions"; + } +} + .c-notice + .c-notice { margin-top: calc(#{$base} * 2); }