Skip to content

Commit d3d546f

Browse files
authored
Merge pull request #440 from BeAPI/fix/target-blank-icon
Fix text icon external for target blank
2 parents 2ac78ff + 33b6cc1 commit d3d546f

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

src/scss/02-tools/_m-text-icon.scss

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
*
1414
*/
1515

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

2222
&::#{$position} {
@@ -31,3 +31,13 @@
3131
transition: background-color .5s $ease-out-expo;
3232
}
3333
}
34+
35+
@mixin text-external-icon($icon: "external", $position: after, $color: currentColor, $size: 12px, $gap: 8px) {
36+
@include text-icon($icon, $position, $color, $size);
37+
display: inline;
38+
39+
&::#{$position} {
40+
display: inline-block;
41+
margin-inline-start: $gap;
42+
}
43+
}

src/scss/03-base/_links.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ a {
44
cursor: pointer;
55

66
&[target="_blank"] {
7-
@include text-icon("external");
7+
@include text-external-icon;
88
}
99

1010
@include hover {
@@ -13,5 +13,5 @@ a {
1313
}
1414

1515
.link-external {
16-
@include text-icon("external");
16+
@include text-external-icon;
1717
}

0 commit comments

Comments
 (0)