When importing <paper-progress>, it additionally imports paper-styles/color.html. This adds a not-insignificant 7.64kb (2.03kb gzipped) when bundling, or another HTTP request when using imports.
Expected outcome
I believe an extremely common use case is for a developer to style the primary and secondary progress bars with their own color, and not the Google green. I do think it's a common use case to leave the container and disabled progress bar the default Google grey.
The bar uses the following four variables imported from paper-styles:
When the progress bar is styled differently and a project does not use paper-styles at all, it is frustrating to have extra data that is never being used.
I think the best solution would be to remove the paper-styles/color.html import and add a tertiary default for the colors. That way, if the user has included paper-styles/color.html in their project, the progress bar can use them as defaults without forcing the huge color list to be included.
Another alternative could be to refactor the paper-styles repo and split color.html into several different files for the different colors and only import the google colors needed. That might be a bit overkill though.
Steps to reproduce
Import <paper-progress> into a project that is not importing paper-styles/color.html.
Description
When importing
<paper-progress>
, it additionally importspaper-styles/color.html
. This adds a not-insignificant 7.64kb (2.03kb gzipped) when bundling, or another HTTP request when using imports.Expected outcome
I believe an extremely common use case is for a developer to style the primary and secondary progress bars with their own color, and not the Google green. I do think it's a common use case to leave the container and disabled progress bar the default Google grey.
The bar uses the following four variables imported from paper-styles:
Actual outcome
When the progress bar is styled differently and a project does not use paper-styles at all, it is frustrating to have extra data that is never being used.
I think the best solution would be to remove the
paper-styles/color.html
import and add a tertiary default for the colors. That way, if the user has includedpaper-styles/color.html
in their project, the progress bar can use them as defaults without forcing the huge color list to be included.Ex:
Another alternative could be to refactor the paper-styles repo and split
color.html
into several different files for the different colors and only import the google colors needed. That might be a bit overkill though.Steps to reproduce
Import
<paper-progress>
into a project that is not importingpaper-styles/color.html
.Browsers Affected