aboutsummaryrefslogtreecommitdiff
path: root/templates/@theme-base/pm-styles/_pm-loadingcontent.scss
diff options
context:
space:
mode:
authorcristiano <[email protected]>2020-12-31 11:52:25 +0000
committerGitHub <[email protected]>2020-12-31 11:52:25 +0000
commit692a8cba26a388bafe7f4c7bd717bc42bd22c94f (patch)
tree3499401624e6445dade4c80a4ab08812a5672b05 /templates/@theme-base/pm-styles/_pm-loadingcontent.scss
parent77953d96fd340f0ba53b2a293c69bcfcfb1ee7c1 (diff)
parent167fa2b153ac674f1c252f6041af30f4e3e59a22 (diff)
downloadprotonmail-themes-692a8cba26a388bafe7f4c7bd717bc42bd22c94f.tar.xz
protonmail-themes-692a8cba26a388bafe7f4c7bd717bc42bd22c94f.zip
Merge pull request #28 from csalmeida/themes-v4
Theme rewrite for ProtonMail v4
Diffstat (limited to 'templates/@theme-base/pm-styles/_pm-loadingcontent.scss')
-rw-r--r--templates/@theme-base/pm-styles/_pm-loadingcontent.scss76
1 files changed, 76 insertions, 0 deletions
diff --git a/templates/@theme-base/pm-styles/_pm-loadingcontent.scss b/templates/@theme-base/pm-styles/_pm-loadingcontent.scss
new file mode 100644
index 0000000..0cf480b
--- /dev/null
+++ b/templates/@theme-base/pm-styles/_pm-loadingcontent.scss
@@ -0,0 +1,76 @@
+[aria-busy="true"] {
+ background-image: url(#{$path-images}loading-atom-smaller.svg);
+ background-position: 50% 50%;
+ background-repeat: no-repeat;
+}
+
+button[aria-busy="true"] {
+ padding-left: em(5);
+ padding-right: em(27);
+ background-image: url(#{$path-images}loading-atom-smaller-disabled.svg);
+ background-position: calc(100% - .25em) 50%;
+ background-size: 1.5em;
+ background-repeat: no-repeat;
+}
+
+.pm-button--small[aria-busy="true"] {
+ padding-left: em(2);
+ padding-right: em(22);
+ background-size: 1.25em;
+ background-position: calc(100% - .125em) 50%;
+}
+
+tr[aria-busy="true"] {
+ background-image: none;
+
+ td::after {
+ content: '\00a0'; // Force a height with default line height
+ pointer-events: none;
+ visibility: hidden;
+ }
+}
+
+tr[aria-busy="true"] td,
+td[aria-busy="true"] {
+ position: relative;
+ background-image: none;
+ &::before {
+ content: '';
+ position: absolute;
+ top: 0;
+ right: 0;
+ left: 0;
+ bottom: 0;
+ background: var(--bgcolor-main-area, white) url(#{$path-images}loading-atom-smaller.svg) 50% 50% no-repeat;
+ }
+}
+
+svg[aria-busy="true"] {
+ & > * {
+ visibility: hidden;
+ }
+}
+
+.progressive[aria-busy="true"] {
+ position: relative;
+ background-image: none;
+ &::before {
+ content: '';
+ position: absolute;
+ top: 0;
+ right: 0;
+ left: 0;
+ bottom: 0;
+ background-image: none;
+ animation: backgroundLoading 1s linear infinite alternate;
+ }
+}
+
+@keyframes backgroundLoading {
+ 0% {
+ background-color: $white;
+ }
+ 100% {
+ background-color: #eee;
+ }
+}