diff --git a/src/img/static/arrow.svg b/src/img/static/arrow.svg
new file mode 100644
index 00000000..df32251c
--- /dev/null
+++ b/src/img/static/arrow.svg
@@ -0,0 +1 @@
+
diff --git a/src/img/static/external.svg b/src/img/static/external.svg
new file mode 100644
index 00000000..79cad0b4
--- /dev/null
+++ b/src/img/static/external.svg
@@ -0,0 +1 @@
+
diff --git a/src/scss/02-tools/_f-get-svg-url.scss b/src/scss/02-tools/_f-get-svg-url.scss
index 221ba9dd..70dc6977 100644
--- a/src/scss/02-tools/_f-get-svg-url.scss
+++ b/src/scss/02-tools/_f-get-svg-url.scss
@@ -40,7 +40,6 @@
// name-of-the-svg: (viewBox, content of the svg element)
"arrow": ("0 0 18 14", "%3Cpath d='M17.25 7 10.37.12l-.96.97 5.2 5.22H.76V7.7h13.87L9.4 12.9l.96.96L17.25 7Z'/%3E"),
"down": ("0 0 11.2 6.7", "3Cpath d='M0 .5C0 .4.1.2.2.1c.2-.2.5-.1.7.1l4.6 5.3.1.1s.1 0 .1-.1L10.3.1c.2-.1.5-.2.7 0 .2.2.2.5.1.7L6.5 6.2c-.2.3-.5.5-.9.5s-.7-.2-.9-.6L.1.8C0 .7 0 .6 0 .5z'/%3E"),
- "external": ("0 0 20 20", "3Cpath d='M3.1 19.6A3.1 3.1 0 0 1 0 16.4V3.1A3.2 3.2 0 0 1 3.1 0H4c.4 0 .7.3.7.7 0 .4-.3.8-.7.8H3c-.9 0-1.6.7-1.6 1.6v13.3c0 1 .7 1.7 1.6 1.7h13.2c.9 0 1.6-.8 1.6-1.7v-.8c0-.4.4-.7.8-.7s.7.3.7.7v.8c0 1.7-1.4 3.2-3.1 3.2H3ZM18.7 0c.4 0 .7.3.7.7v10c0 .4-.4.7-.8.7s-.7-.3-.7-.8V2.5l-9.7 9.8c-.3.2-.8.3-1 0a.7.7 0 0 1 0-1l9.7-9.8H8.8c-.5 0-.8-.3-.8-.7 0-.4.3-.8.8-.8h9.9Z'/%3E"),
"close": ("0 0 20 20", "3Cpath d='M5.442 5.442 5 5.883l2.058 2.059L9.116 10l-2.058 2.058L5 14.117l.442.441.441.442 2.059-2.058L10 10.884l2.058 2.058L14.117 15l.441-.442.442-.441-2.058-2.059L10.884 10l2.058-2.058L15 5.883l-.442-.441L14.117 5l-2.059 2.058L10 9.116 7.942 7.058 5.883 5l-.441.442'/%3E"),
);
diff --git a/src/scss/02-tools/_m-text-icon.scss b/src/scss/02-tools/_m-text-icon.scss
index 149836db..e58e1371 100644
--- a/src/scss/02-tools/_m-text-icon.scss
+++ b/src/scss/02-tools/_m-text-icon.scss
@@ -1,5 +1,4 @@
@use "../01-abstract/constants" as *;
-@use "f-get-svg-url" as *;
/**
* Add icon before text with mask to have the same color of the text
@@ -17,7 +16,6 @@
*/
@mixin text-icon($icon: "arrow", $position: after, $color: currentColor, $size: 12px, $gap: 8px) {
- position: relative;
display: inline-flex;
gap: $gap;
align-items: center;
@@ -25,12 +23,14 @@
&::#{$position} {
display: block;
width: $size;
+ min-width: $size;
height: $size;
content: "";
background-color: $color;
- mask-image: get-svg-url($icon);
+ mask-image: url(../img/static/#{$icon}.svg);
mask-position: center;
mask-repeat: no-repeat;
+ mask-size: contain;
transition: background-color .5s $ease-out-expo;
}
}
@@ -38,9 +38,11 @@
@mixin text-external-icon($icon: "external", $position: after, $color: currentColor, $size: 12px, $gap: 8px) {
@include text-icon($icon, $position, $color, $size);
display: inline-block;
+ gap: 0;
&::#{$position} {
display: inline-block;
margin-inline-start: $gap;
+ vertical-align: middle;
}
}
diff --git a/src/scss/03-base/_links.scss b/src/scss/03-base/_links.scss
index 6bf33a7a..e95fc07a 100644
--- a/src/scss/03-base/_links.scss
+++ b/src/scss/03-base/_links.scss
@@ -7,7 +7,7 @@ a {
cursor: pointer;
&[target="_blank"] {
- @include text-icon("external");
+ @include text-external-icon("external");
}
@include hover {
@@ -15,6 +15,14 @@ a {
}
}
+a,
+button {
+ text-decoration-thickness: 1px !important;
+ text-underline-position: from-font;
+ text-decoration-skip-ink: none;
+ cursor: pointer;
+}
+
.link-external {
- @include text-icon("external");
+ @include text-external-icon("external");
}