Don't add default margin to font awesome icons

We were removing the margin half of the time, and sometimes removing it
made us use `!important` rules.
This commit is contained in:
Javi Martín
2021-06-29 16:18:47 +02:00
parent 5531a0b2bc
commit 450d954526
12 changed files with 18 additions and 13 deletions

View File

@@ -74,6 +74,7 @@ $outline-focus: 3px solid #ffbf47 !default;
$input-height: $line-height * 2 !default; $input-height: $line-height * 2 !default;
$font-icon-margin: rem-calc(4) !default;
$icon-width: $line-height * 2 !default; $icon-width: $line-height * 2 !default;
$off-screen-left: -1000rem !default; $off-screen-left: -1000rem !default;

View File

@@ -23,6 +23,10 @@
.preview-link { .preview-link {
@include has-fa-icon(eye, regular); @include has-fa-icon(eye, regular);
@include hollow-button; @include hollow-button;
&::before {
margin-right: $font-icon-margin;
}
} }
.publish-link { .publish-link {

View File

@@ -36,7 +36,6 @@
&::after { &::after {
bottom: $padding / 2; bottom: $padding / 2;
color: $white; color: $white;
margin-right: 0;
position: absolute; position: absolute;
right: calc(#{$padding} + #{$quote-padding}); right: calc(#{$padding} + #{$quote-padding});
} }

View File

@@ -22,7 +22,6 @@
&::before { &::before {
font-size: 1.6em; font-size: 1.6em;
margin-right: 0 !important;
} }
} }

View File

@@ -33,10 +33,6 @@
position: absolute; position: absolute;
right: $close-icon-margin; right: $close-icon-margin;
top: $close-icon-margin; top: $close-icon-margin;
&::before {
margin-right: 0;
}
} }
&:hover { &:hover {

View File

@@ -71,7 +71,6 @@
&::after { &::after {
font-size: 2em; font-size: 2em;
margin-left: auto; margin-left: auto;
margin-right: 0;
transform: translateY(-25%); transform: translateY(-25%);
} }
} }

View File

@@ -6,5 +6,9 @@
color: $brand-secondary; color: $brand-secondary;
font-weight: bold; font-weight: bold;
margin-top: $line-height; margin-top: $line-height;
&::before {
margin-right: $font-icon-margin;
}
} }
} }

View File

@@ -204,7 +204,6 @@
&::after { &::after {
font-weight: bold; font-weight: bold;
margin-left: 0.5em; margin-left: 0.5em;
margin-right: 0;
} }
} }
} }

View File

@@ -1470,6 +1470,7 @@ table {
&::before { &::before {
font-size: rem-calc(24); font-size: rem-calc(24);
margin-right: $font-icon-margin;
} }
} }
@@ -1863,6 +1864,7 @@ table {
.show-children::before, .show-children::before,
.collapse-children::before { .collapse-children::before {
margin-right: $font-icon-margin;
transform: translateY(-1px); transform: translateY(-1px);
} }
@@ -1891,6 +1893,7 @@ table {
} }
&::before { &::before {
margin-right: $font-icon-margin;
transform: translateY(-1px); transform: translateY(-1px);
} }
} }
@@ -2456,6 +2459,10 @@ table {
@include has-fa-icon(times, solid); @include has-fa-icon(times, solid);
color: $color-alert; color: $color-alert;
} }
&::before {
margin-right: $font-icon-margin;
}
} }
} }

View File

@@ -1,7 +1,6 @@
%font-icon { %font-icon {
@extend %fa-icon; @extend %fa-icon;
font-family: "Font Awesome 5 Free"; font-family: "Font Awesome 5 Free";
margin-right: rem-calc(4);
vertical-align: middle; vertical-align: middle;
} }

View File

@@ -7,8 +7,8 @@
@include has-fa-icon(circle, solid, after); @include has-fa-icon(circle, solid, after);
&::before { &::before {
@include breakpoint(medium) { @include breakpoint(small only) {
margin-right: 0; margin-right: $font-icon-margin;
} }
} }
@@ -18,7 +18,6 @@
color: #ecf00b; color: #ecf00b;
font-size: $circle-icon-size; font-size: $circle-icon-size;
margin-right: 0;
position: absolute; position: absolute;
left: $notification-icon-size - rem-calc(5); left: $notification-icon-size - rem-calc(5);
top: $menu-link-top-padding - $circle-icon-size / 2; top: $menu-link-top-padding - $circle-icon-size / 2;

View File

@@ -1215,7 +1215,6 @@
&::after { &::after {
margin-left: $line-height / 4; margin-left: $line-height / 4;
margin-right: 0;
} }
} }
} }