This repository was archived by the owner on Sep 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
fix(progressCircular): fixes scaling issues #5891
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 |
---|---|---|
|
@@ -16,13 +16,14 @@ md-progress-circular { | |
padding-top: 0 !important; | ||
margin-bottom: 0 !important; | ||
|
||
transform: scale(0.5); | ||
z-index: $z-index-progress-circular; // Used to fix a Chrome bug with spinner animation | ||
|
||
.md-spinner-wrapper { | ||
display:block; | ||
position: relative; | ||
position: absolute; | ||
overflow: hidden; | ||
top: 50%; | ||
left: 50%; | ||
|
||
.md-inner { | ||
width: $progress-circular-size; | ||
|
@@ -74,7 +75,7 @@ md-progress-circular { | |
} | ||
|
||
|
||
.md-spinner-wrapper.md-mode-indeterminate { | ||
.md-mode-indeterminate .md-spinner-wrapper { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just curious, was there a reason why these were swapped? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The DOM structure had to change to make this happen. I added an extra container that could be scaled separate from the outer container. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah gotcha! I missed the space between them or I wouldn't have asked (I thought you literally just swapped the order of the selector 😄). |
||
animation: outer-rotate $progress-circular-outer-duration linear infinite; | ||
.md-inner { | ||
animation: sporadic-rotate $progress-circular-sporadic-duration $progress-circular-ease-in-out infinite; | ||
|
@@ -141,24 +142,25 @@ md-progress-circular { | |
// Keyframe animation for the Indeterminate Progress | ||
// | ||
@keyframes outer-rotate { | ||
100% { transform: rotate(360deg); } | ||
0% { transform: rotate(0deg) scale(0.5); } | ||
100% { transform: rotate(360deg) scale(0.5); } | ||
} | ||
@keyframes left-wobble { | ||
0%, 100% { transform: rotate(130deg); } | ||
50% { transform: rotate( -5deg); } | ||
0%, 100% { transform: rotate(130deg); } | ||
50% { transform: rotate( -5deg); } | ||
} | ||
@keyframes right-wobble { | ||
0%, 100% { transform: rotate(-130deg); } | ||
50% { transform: rotate( 5deg); } | ||
0%, 100% { transform: rotate(-130deg); } | ||
50% { transform: rotate( 5deg); } | ||
} | ||
@keyframes sporadic-rotate { | ||
12.5% { transform: rotate( 135deg); } | ||
25% { transform: rotate( 270deg); } | ||
37.5% { transform: rotate( 405deg); } | ||
50% { transform: rotate( 540deg); } | ||
62.5% { transform: rotate( 675deg); } | ||
75% { transform: rotate( 810deg); } | ||
87.5% { transform: rotate( 945deg); } | ||
100% { transform: rotate(1080deg); } | ||
12.5% { transform: rotate( 135deg); } | ||
25% { transform: rotate( 270deg); } | ||
37.5% { transform: rotate( 405deg); } | ||
50% { transform: rotate( 540deg); } | ||
62.5% { transform: rotate( 675deg); } | ||
75% { transform: rotate( 810deg); } | ||
87.5% { transform: rotate( 945deg); } | ||
100% { transform: rotate(1080deg); } | ||
} | ||
|
This file contains hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@robertmesserle - is the
translate( )
fixed regardless of the scale value ?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, it's a percentage-based translate, so it will center the spinner.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this line could use an explanation of its intent.