-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(progress-bar): remove data url from progress-bar's css styling #8898
Conversation
<div class="mat-progress-bar-background mat-progress-bar-element"> | ||
<svg width="100%" height="5"> | ||
<defs> | ||
<pattern id="circle" x="5" y="0" width="10" height="5" patternUnits="userSpaceOnUse"> |
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.
AFAIK this ID has to be unique.
src/lib/progress-bar/progress-bar.ts
Outdated
* then placed back into the DOM again. This is necessary as the browser only defines the | ||
* styling of SVG pattern elements as it is placed into the DOM. | ||
*/ | ||
private _reappendCircleSvgElement() { |
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.
I'm not convinced that this is necessary. The progress spinner supports changing the colors without having to re-append the element to the DOM. Are you sure that it doesn't have something to do with the circles not having a unique id?
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.
I think you are right
e6cc39d
to
97f8482
Compare
<div class="mat-progress-bar-background mat-progress-bar-element"> | ||
<svg width="100%" height="5"> | ||
<defs> | ||
<pattern id="{{progressbarId}}" x="5" y="0" width="10" height="5" patternUnits="userSpaceOnUse"> |
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.
Use [id]
instead of interpolation?
background-size: 10px 4px; | ||
display: none; | ||
svg { | ||
position: absolute; |
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.
Also comment on why the element is absolute
?
97f8482
to
2b4e1bf
Compare
8ec3e4b
to
237b400
Compare
237b400
to
3bd2224
Compare
3bd2224
to
a77110d
Compare
a3a7515
to
32ae3b0
Compare
32ae3b0
to
bb3bdb3
Compare
@jelbourn ready for another look when you have a moment. |
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.
LGTM
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Fixes #8876