I would definitely suggest breaking up your CSS into chunks specific to each component. We need to break free of the idea of having one massive CSS file and one massive JS file like we did in the past. With web components write small css files and embed them inside your self contained elements.
If I import an <app-panel> I shouldn't need to download all the CSS for every other app-* widget. :) On Tue, May 27, 2014 at 1:27 PM, Douglas Hubler <[email protected]> wrote: > With chrome 35 in stable channel, this issue now has come to a head. > > We're planning on ditching bootstrap (for a combination of reasons) and > coming up with a single css file for our application. This css will be > referenced on the main page and on *each* element as Karsten originally > tested. Kartsten reported performance hits so I avoided @import and @media > in my css. I used devtools/Network to verify css is downloaded exactly > once and web server is contacted exactly twice. This stands true no > matter how many polymer elements I put on the page, how many nested the > elements there are or how many different types of polymer elements I > import. The only caveat with this approach is having to specify css in > every element which really isn't that bad. Karsten, if you have more > suggestions on where I might see issues, please reply if you could. > > In reality, if wanted to keep bootstrap I could just edit it to avoid > @media per Eliot's reply. > > The only disconcerting point about this plan is that each polymer element > is importing *way* more CSS definitions then it's actually using, but as > long as it's not negatively affecting performance, I can get over this > issue. > > > Follow Polymer on Google+: plus.google.com/107187849809354688692 > --- > You received this message because you are subscribed to the Google Groups > "Polymer" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/polymer-dev/3ee81bb8-71ff-402a-8139-53c8a4e3e95c%40googlegroups.com<https://groups.google.com/d/msgid/polymer-dev/3ee81bb8-71ff-402a-8139-53c8a4e3e95c%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > Follow Polymer on Google+: plus.google.com/107187849809354688692 --- You received this message because you are subscribed to the Google Groups "Polymer" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/CAPJYB1hNn3CZz%2B%2BSDX%2B0HwSnYNoOk%2B12PQnrskHdDaZcr-uvfQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
