-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Reusing css libraries through out Polymer elements #459
Comments
Hey @franleplant, Would you mind asking this question over on StackOverflow? When you ask the question make sure to tag it with Thanks! |
Hey @robdodson! But anyway, I'll ask over Stack Overflow. Thanks! |
@franleplant Can you pls share the SO link? I am stuck with the same issue. -Thanks. |
@arvindr21 http://stackoverflow.com/questions/22733896/polymer-custom-elements-reusing-css-with-import This is a big subject in respect of web components draft, will the browser handle this duplicate requests? How will it handle requests for the same library to different URL, etc. Its complicated. It looks like the best way to go right now is to have the libraries globally, and also it looks like its better to create little components, instead of like components. Also one other thing to take in account is that maybe in the future, when the Web Components spec is completed, libraries will be rethinked into web components, so instead of trying to create a component that uses a library, you will use the library through componets, or something like that, I dont know Im just thinking jajajaja. I hope this help. |
@franleplant Thanks! that was helpful. My idea is also very similar. I wanted to take the Bootstrap framework and convert it into components like Now the question is should each component inherit the theme for the component to work? or Can we add a global reference? I hope you notice the problem including the framework CSS/JS with every component. And I feel that including the theme CSS/JS using the link & script tags is not much of "componentizing". I do understand about the encapsulation of styles inside an web component but still want the theme component to "leak". Not sure even if my thinking is correct. So what would be a preference here? Thanks. |
That is a question for a more knowledgeable man than me, Ill be happy to see others opinions on the subject though. Fran |
Hey Guys!
I cant seem to make this work:
tag.html
I have also tried to move the import outside
<polymer-element>
but it does not work either.bootstrap.html
contains this:If instead of an import I load a simple old link pointing to
bootstrap.css
then it works, but, If I also usebootstrap.css
in the Index, the site will load two timesbootstrap.css
Is this a limitation of Web Components?
Is this an issue of Polymer?
Ill enjoy being useful.
Fran
The text was updated successfully, but these errors were encountered: