-
Notifications
You must be signed in to change notification settings - Fork 93
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
Do not depend on Roboto #111
Comments
This is not something we can do right now, since it will break all paper elements' styles. We will take this in consideration for the next major release. |
Also, to fill in some background information, the gold elements are just paper-inputs for e-commerce applications. Paper-inputs were initially designed to follow the material design spec, which is very tied to the Roboto font: https://www.google.com/design/spec/components/text-fields.html#text-fields-labels (search for "font", all of them are specced to Roboto) |
Depending on We worked around this issue by doing a cat /dev/null > .../bower_components/font-roboto/roboto.html before vulcanizing our app, which obviously is subpar. Continuing the off-topic discussion:
If this is indeed true, then you are not doing a good job at expressing this hierarchy. On elements.polymer-project.org they are described as:
But a dependency on Paper elements is not mentioned while Paper elements clearly depend on Google Material Design ("Paper elements are a set of visual elements that implement Google's Material Design.", emphasis mine) . This is misleading. Also, they hierarchy could have been expressed visually but instead all element categories (including Paper and Gold) are displayed equally: |
Maybe there could be a way to disable using roboto when using any element incl. paper? A very valid case is if one (like me) uses a different font:
Please fix this. |
This is something we also need. |
This is something we're working on as part of the 2.0 release of this element. The plan is to have all the |
Ping. Been seeing a lot of comments about this lately. Is there any way we can do this for 3? |
This is still an issue. Loading roboto should be opt-in. |
It is, according to font-roboto package : simply add window.polymerSkipLoadingFontRoboto = true to your index.html file. (or any starting point.) Concerned code : // Give the user the choice to opt out of font loading.
if (!window.polymerSkipLoadingFontRoboto) {
const link = document.createElement('link');
link.rel = 'stylesheet';
link.type = 'text/css';
link.crossOrigin = 'anonymous';
link.href =
'https://fonts.googleapis.com/css?family=Roboto+Mono:400,700|Roboto:400,300,300italic,400italic,500,500italic,700,700italic';
document.head.appendChild(link);
} |
I am using
paper-styles
throughgold-email-input
.Firstly, I do not get why a Gold element would depend on a Paper element, but that's not want I want to argue about.
My issue is that even though my app does not use the Roboto font, it is imported as a transitive dependency (
gold-email
input depends onpaper-styles
depends onfont-robot
). Not only is it downloaded as part of that element (e.g. bundled in some file) but actually there are requests being sent to Google servers.This adds unnecessary load time. Also the fact that some Polymer element (an input field) causes cross-origin requests by default is counterintuitive. And there is no sane way to avoid that currently.
Now that raises the question why
paper-styles
depends onfont-roboto
. Per definition Paper elements cover Material Design. Is Robot an integral part of Material Design? I'd say no. Therefore the dependency is questionable.I also commented PolymerElements/font-roboto#8
The text was updated successfully, but these errors were encountered: