From cb3638491c125345728d0bf0ed8378b09a7f94db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ce=CC=81dric=20Andrietti?= Date: Mon, 13 Jan 2025 14:38:58 +0100 Subject: [PATCH 1/2] Fix text icon external for target blank --- src/scss/02-tools/_m-text-icon.scss | 14 ++++++++++++-- src/scss/03-base/_links.scss | 4 ++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/scss/02-tools/_m-text-icon.scss b/src/scss/02-tools/_m-text-icon.scss index d1cc9f84..eaa02574 100644 --- a/src/scss/02-tools/_m-text-icon.scss +++ b/src/scss/02-tools/_m-text-icon.scss @@ -13,10 +13,10 @@ * */ -@mixin text-icon($icon: "arrow", $position: after, $color: currentColor, $size: 12px) { +@mixin text-icon($icon: "arrow", $position: after, $color: currentColor, $size: 12px, $gap: 8px) { position: relative; display: inline-flex; - gap: 8px; + gap: $gap; align-items: center; &::#{$position} { @@ -31,3 +31,13 @@ transition: background-color .5s $ease-out-expo; } } + +@mixin text-external-icon($icon: "external", $position: after, $color: currentColor, $size: 12px, $gap: 8px) { + @include text-icon($icon); + display: inline; + + &::#{$position} { + display: inline-block; + margin-inline-start: $gap; + } +} diff --git a/src/scss/03-base/_links.scss b/src/scss/03-base/_links.scss index 2e952751..f25b2fe5 100644 --- a/src/scss/03-base/_links.scss +++ b/src/scss/03-base/_links.scss @@ -4,7 +4,7 @@ a { cursor: pointer; &[target="_blank"] { - @include text-icon("external"); + @include text-external-icon; } @include hover { @@ -13,5 +13,5 @@ a { } .link-external { - @include text-icon("external"); + @include text-external-icon; } From 33b6cc14518afa9d469118f55f464063fdd6c375 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ce=CC=81dric=20Andrietti?= Date: Mon, 13 Jan 2025 14:42:43 +0100 Subject: [PATCH 2/2] Fix text icon external mixin --- src/scss/02-tools/_m-text-icon.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scss/02-tools/_m-text-icon.scss b/src/scss/02-tools/_m-text-icon.scss index eaa02574..10b21752 100644 --- a/src/scss/02-tools/_m-text-icon.scss +++ b/src/scss/02-tools/_m-text-icon.scss @@ -33,7 +33,7 @@ } @mixin text-external-icon($icon: "external", $position: after, $color: currentColor, $size: 12px, $gap: 8px) { - @include text-icon($icon); + @include text-icon($icon, $position, $color, $size); display: inline; &::#{$position} {