-
Notifications
You must be signed in to change notification settings - Fork 800
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Subscription and payment blocks: improve loading animation (#38174)
- Loading branch information
Showing
8 changed files
with
168 additions
and
79 deletions.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
projects/plugins/jetpack/changelog/update-subscribe-modal-loading
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: minor | ||
Type: enhancement | ||
|
||
Subscribe block: improve loading animation |
23 changes: 23 additions & 0 deletions
23
projects/plugins/jetpack/extensions/blocks/subscriptions/spinner.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 0 additions & 3 deletions
3
projects/plugins/jetpack/extensions/blocks/subscriptions/view.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
90 changes: 53 additions & 37 deletions
90
projects/plugins/jetpack/extensions/shared/memberships.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,67 @@ | ||
/* Additional styling to thickbox that displays modal */ | ||
/* stylelint-disable selector-max-id */ | ||
@import '@automattic/jetpack-base-styles/gutenberg-base-styles'; | ||
|
||
.jetpack-memberships-modal #TB_title { | ||
display: none; | ||
@keyframes jetpack-memberships_button__spinner-animation { | ||
100% { | ||
transform: rotate(360deg); | ||
} | ||
} | ||
|
||
#memberships-modal-window.jetpack-memberships-modal, | ||
#TB_window.jetpack-memberships-modal { | ||
background-color: transparent; | ||
background-image: url( 'https://s0.wp.com/i/loading/dark-200.gif' ); | ||
background-size: 50px; | ||
background-repeat: no-repeat; | ||
background-position: center 150px; | ||
margin: 0 !important; | ||
box-shadow: none; | ||
-webkit-box-shadow: none; | ||
-moz-box-shadow: none; | ||
border: none; | ||
bottom: 0; | ||
left: 0; | ||
right: 0; | ||
top: 0; | ||
width: 100% !important; | ||
height: 100%; | ||
.jetpack-memberships-spinner { | ||
display: none; | ||
width: 1em; | ||
height: 1em; | ||
margin: 0 0 0 5px; | ||
svg { | ||
/* Better center-align the spinner with button text, because 1m height doesn't take line-height into account */ | ||
margin-bottom: -2px; | ||
width: 100%; | ||
height: 100%; | ||
} | ||
} | ||
|
||
#memberships-modal-window.jetpack-memberships-modal { | ||
padding: 21px; | ||
.jetpack-memberships-spinner-rotating { | ||
transform-origin: center; | ||
animation: jetpack-memberships_button__spinner-animation .75s infinite linear | ||
} | ||
|
||
.jetpack-memberships-modal #TB_iframeContent, | ||
.jetpack-memberships-modal #memberships-modal-iframe { | ||
margin: 0 !important; | ||
height: 100% !important; | ||
width: 100% !important; | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
right: 0; | ||
bottom: 0; | ||
.is-loading .jetpack-memberships-spinner { | ||
display: inline-block; | ||
} | ||
/* This is a class added by Thickbox on open modals. */ | ||
BODY.modal-open { | ||
|
||
body.jetpack-memberships-modal-open { | ||
overflow: hidden; | ||
} | ||
|
||
dialog::backdrop { | ||
background-color: #000; | ||
opacity: 0.7; | ||
dialog.jetpack-memberships-modal { | ||
opacity: 1; | ||
|
||
&, iframe { | ||
position: fixed; | ||
margin: 0; | ||
padding: 0; | ||
height: 100%; | ||
width: 100%; | ||
top: 0; | ||
left: 0; | ||
right: 0; | ||
bottom: 0; | ||
box-shadow: none; | ||
border: 0; | ||
background: transparent; | ||
} | ||
|
||
&::backdrop { | ||
background-color: #000; | ||
opacity: 0.7; | ||
transition: opacity .2s ease-out; | ||
} | ||
|
||
&.is-loading { | ||
&, &::backdrop { | ||
opacity: 0; | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters