Comments (18)
We're looking at removing font-roboto
from typography.html
in the 2.0 version of elements, and requiring you to explicitly import it.
from font-roboto.
https://github.com/PolymerElements/font-roboto-local
from font-roboto.
As @JosefJezek kindly pointed out, the font-roboto-local import is probably your best bet here.
from font-roboto.
http://stackoverflow.com/questions/31441720/overriding-dependencies-in-bower-json-file
from font-roboto.
It would be a good idea to do something similar with colors.html. The amount of colors is just too many imported by default. People that don't use the color theme (our site for example) at all will have to import those colors for nothing. Currently we're importing colors.html but don't use any of those colors in our own elements, instead we defined our own colors based on the color pattern.
Maybe do something similar to how iron-icons does it, import one or two basic color schemes (e. g. google-blue and greyscale-shades) and the rest of it can be imported with colors-advanced-scheme.html or something like that.
from font-roboto.
I am having the same issue. My app does not use Roboto, but gold-email-input
depends on paper-styles
which in turn depends onfont-roboto
thus adding completely unnecessary load time to my page.
Furthermore I'd argue that it is unacceptable for any user of this package to not be able to suppress cross-origin calls! E.g. what if I do not want my application to talk to Google's servers?
from font-roboto.
+1 needs to be removed, for now i exclude it during vulcanization.
from font-roboto.
You can simple resolve this issue using bower flat dependency tree. Check out this line...
https://github.com/StartPolymer/progressive-web-app-template/blob/master/bower.json#L12
I am using empty roboto.html
...
https://github.com/StartPolymer/empty-elements/blob/master/roboto.html
I define fonts in index.html...
https://github.com/StartPolymer/progressive-web-app-template/blob/master/index.html#L183
from font-roboto.
@JosefJezek That's a workaround, not a resolution of the original issue.
from font-roboto.
Also that workaround really kills time whenever you have to do a new build (guess you could automate it I guess but would be nicer to just have it removed).
@notwaldorf I recall some talks about version 2.0 of all the elements in the future. Do you have a roadmap and outline what you want to achieve for the 2.0 milestone? Not just for this one but in general. It would be interesting to see where you are going (not just at the Polymer summit please, I really hate the pre-summit 3 months no updates at all wait time) and how we can help out potentially in the future.
from font-roboto.
/cc @tjsavage
from font-roboto.
@JosefJezek a much easier "workaround" would be to exclude it during vulcanization:
grunt.config.set('vulcanize', {
...
stripExcludes : [
'assets/bower_components/font-roboto/roboto.html',
'assets/bower_components/iron-icons/iron-icons.html'
]
...
from font-roboto.
I'd be happy if the async attribute were added to the link[rel="stylesheet"] element that loads the font.
from font-roboto.
Best solution for now:
- Create .bowerrc file in the same folder where you have
bower.json
. - Add the following inside the file:
{
...
"scripts": {
"postinstall": "node -e \"require('fs').writeFileSync('bower_components/font-roboto/roboto.html', '')\""
}
...
}
this will clean the contents of roboto.html
after bower install
3) reinstall bower components
Another option:
- Create .bowerrc file in the same folder where you have
bower.json
. - Add the following inside the file:
"ignoredDependencies": [
"font-roboto"
]
so .bowerrc
will look something like this:
{
...
{
"ignoredDependencies": [
"font-roboto"
]
}
...
}
- reinstall bower components, you will see in the console:
bower paper-styles#1 - 2 skipped font-roboto
Now you can run polymer serve
.
To build without errors run this command before build:
mkdir bower_components/font-roboto/ && touch bower_components/font-roboto/roboto.html
from font-roboto.
@truefusion for your specific case postinstall
script in .bowerrc
will look like this:
{
...
"scripts": {
"postinstall": "node -e \"var fs=require('fs'); var f=fs.readFileSync('bower_components/font-roboto/roboto.html', 'utf8'); fs.writeFileSync('bower_components/font-roboto/roboto.html', f.replace(/link /, 'link async '))\""
}
...
}
from font-roboto.
@notwaldorf is font-roboto
remove from polymer 2.0 elements? or is this still pending.
from font-roboto.
@jaichandra The 2.0 elements didn't have any true breaking changes (that weren't required by the hybrid port), so font-roboto
is still there, as removing it would have been a breaking change
from font-roboto.
so in the new year 2019 it still breaking the app and all element to jam in loading?
my app got 100%cpu because of it.
from font-roboto.
Related Issues (15)
- Tag a release. HOT 2
- Combine two fonts in order to save unnecessary request
- Polymer 2 support?
- The polymer3 modularizer conversion did not create a .js file HOT 1
- Update package.json version
- Relative protocol in font URL breaks in Chrome extension HOT 5
- It loads style into imported document, what is deprecated and throw warnings
- npm ERR! enoent ENOENT: no such file or directory, rename
- Robot Draft vs. Roboto HOT 1
- Failed lighthouse report
- User data sent to third party
- External resources disallowed in Chrome Apps HOT 2
- paper-styles/paper-styles-classes - after font roboto factoring - can no longer be vulcanized HOT 1
- font-roboto does not work with a number of languages written in Latin/Greek/Cyrillic HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from font-roboto.