Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Improve the look of the spinner (#6083)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonBrandner committed Nov 2, 2021
1 parent 73731cc commit f643839
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 101 deletions.
2 changes: 1 addition & 1 deletion res/css/views/elements/_InlineSpinner.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ limitations under the License.
}

.mx_InlineSpinner_icon {
display: inline-block;
display: inline-block !important; // Override regular mx_Spinner_icon
}
29 changes: 25 additions & 4 deletions res/css/views/elements/_Spinner.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
Copyright 2015, 2016 OpenMarket Ltd
Copyright 2021 Šimon Brandner <simon.bra.ag@gmail.com>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -37,8 +38,28 @@ limitations under the License.
}

.mx_Spinner_icon {
background-color: $primary-content;
mask: url('$(res)/img/spinner.svg');
mask-size: contain;
animation: 1.1s steps(12, end) infinite spin;
background-color: $quinary-content;
mask: url('$(res)/img/spinner/spinner-background.svg');
mask-size: 100%;

display: flex;
justify-content: center;
align-items: center;

width: 100%;
height: 100%;

&::before {
background-color: $secondary-content;
mask: url('$(res)/img/spinner/spinner-foreground.svg');
mask-size: 100%;

width: 100%;
height: 100%;

content: "";
display: flex;

animation: 1s linear spin infinite;
}
}
96 changes: 0 additions & 96 deletions res/img/spinner.svg

This file was deleted.

3 changes: 3 additions & 0 deletions res/img/spinner/spinner-background.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions res/img/spinner/spinner-foreground.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f643839

Please sign in to comment.