Skip to content

Commit

Permalink
make loading element position important
Browse files Browse the repository at this point in the history
When the `.loading` class is applied to a `.tooltip`, the loading element
is wrongly positioned. This is due to the `left` and `top` rules in the
`.tooltip::after` class.

Solution to this issue is to set `!important` to `left` and `top` rules
in the `.loading::after` class.

Fixes picturepan2#649
  • Loading branch information
endorama committed Oct 7, 2020
1 parent 8847251 commit f2fd745
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utilities/_loading.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
content: "";
display: block;
height: $unit-4;
left: 50%;
left: 50% !important; // !important fixes https://github.com/picturepan2/spectre/issues/649
margin-left: -$unit-2;
margin-top: -$unit-2;
opacity: 1;
padding: 0;
position: absolute;
top: 50%;
top: 50% !important; // !important fixes https://github.com/picturepan2/spectre/issues/649
width: $unit-4;
z-index: $zindex-0;
}
Expand Down

0 comments on commit f2fd745

Please sign in to comment.