External CSS in Polymer Dart
So, an upgrade to Polymer and now my app has been teasing me with missing styles.
For future reference, having this within a polymer element:
<link rel="stylesheet" href="/path/to/styles.css">
works at random. Which is disconcerting to begin with, to say the least.
The solution is straightforward (in retrospect, as is always the way) and just requires that you import the styles instead of linking to them:
<style>
@import "../../path/to/styles.css;
</style>
Simply edit all 40+ of the template files in your app and you're good to go again.
I haven't checked all of the release notes yet so I can't tell whether this is either:
- a change from a previous version
- down to my app reaching a certain level of complexity
With that in mind, YMMV.
Written by Iain Campbell
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Dart
Authors
inuyasha82
3.51K
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#