Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/img/static/arrow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/img/static/external.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion src/scss/02-tools/_f-get-svg-url.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
);

Expand Down
8 changes: 5 additions & 3 deletions src/scss/02-tools/_m-text-icon.scss
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -17,30 +16,33 @@
*/

@mixin text-icon($icon: "arrow", $position: after, $color: currentColor, $size: 12px, $gap: 8px) {
position: relative;
display: inline-flex;
gap: $gap;
align-items: center;

&::#{$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;
}
}

@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;
}
}
12 changes: 10 additions & 2 deletions src/scss/03-base/_links.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,22 @@ a {
cursor: pointer;

&[target="_blank"] {
@include text-icon("external");
@include text-external-icon("external");
}

@include hover {
text-decoration: none;
}
}

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");
}
Loading