Skip to content

Commit

Permalink
πŸ› Remove deprecated loading indicator to prevent duplicated CSS (#4652)
Browse files Browse the repository at this point in the history
* πŸ› Remove deprecated loading indicator to prevent duplicated CSS

* 🚚 Move playground loading indicator into playground src
  • Loading branch information
matthiasrohmer authored Sep 23, 2020
1 parent 1bea01d commit 498cd80
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 25 deletions.
24 changes: 0 additions & 24 deletions frontend/scss/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -156,30 +156,6 @@ box-shadow: 0 25px 50px 0 rgba(0,0,0,0.21);
}
}

@mixin loading-indicator {
pointer-events: none;

&::after {
content: '';
display: block;
width: 45px;
height: 45px;
margin: 100px auto auto auto;
padding: 1px;
border: 3px solid color('silver');
border-radius: 50%;
border-left-color: transparent;
animation: rotate 1.5s linear infinite;
}
@keyframes rotate {
to { transform: rotate(360deg); }
}
}

%loading-indicator {
@include loading-indicator;
}

@mixin scrollbar {
&::-webkit-scrollbar {
width: 6px;
Expand Down
4 changes: 4 additions & 0 deletions playground/src/app.critical.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
@import 'components/atoms/_icon.scss';
@import 'components/atoms/anchor';

@keyframes rotate {
to { transform: rotate(360deg); }
}

:root {
--header-height: 56px;
--gradient-1: linear-gradient(225deg, rgba(41,50,60,1) 0%, rgba(72,85,99,1) 75%);
Expand Down
3 changes: 2 additions & 1 deletion playground/src/fly-in/fly-in.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@import 'components/atoms/_text.scss';
@import '../loader/loading-indicator.scss';

.fly-in {
$headerHeight: 64px;
Expand Down Expand Up @@ -66,7 +67,7 @@
overflow: scroll;

&.loading {
@include loading-indicator;
@extend %loading-indicator;
}
}

Expand Down
1 change: 1 addition & 0 deletions playground/src/import-url/import-url.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@import 'mixins.scss';
@import 'components/atoms/_text.scss';
@import '../loader/loading-indicator.scss';

.import-url {
&-bar {
Expand Down
1 change: 1 addition & 0 deletions playground/src/input-bar/input-bar.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@import '_variables.scss';
@import '_functions.scss';
@import 'components/atoms/_text.scss';
@import '../loader/loading-indicator.scss';

.input {
&-help-text {
Expand Down
1 change: 1 addition & 0 deletions playground/src/loader/loader.critical.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@import 'mixins.scss';
@import './loading-indicator.scss';

.loader {
z-index: 10;
Expand Down
16 changes: 16 additions & 0 deletions playground/src/loader/loading-indicator.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
%loading-indicator {
pointer-events: none;

&:after {
content: '';
display: block;
width: 45px;
height: 45px;
margin: 100px auto auto auto;
padding: 1px;
border: 3px solid color('silver');
border-radius: 50%;
border-left-color: transparent;
animation: rotate 1.5s linear infinite;
}
}

0 comments on commit 498cd80

Please sign in to comment.