Skip to content
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

The trouble with the now-deprecated applyAuthorStyles in Polymer Elements #532

Closed
Emasoft opened this issue Jun 21, 2014 · 1 comment
Closed

Comments

@Emasoft
Copy link

Emasoft commented Jun 21, 2014

THE TROUBLE WITH STYLES IN POLYMER ELEMENTS

About the now-deprecated "applyAuthorStyles" to polymer elements, I see a big problem in the design of the polymer platform itself.
As anybody who tried to use polymer elements in the real world, the styling is where developers find more troubles when integrating polymer elements (see for example this excellent article by Chris Strom, author of the book "Patterns in Polymer": http://japhr.blogspot.it/2014/06/a-tag-named-apply-author-styles.html ).
There’s an inherent and unresolved tension in creating styleable general-purpose components. Of course Polymer is too young as a platform, and it may not shows yet. This problem will become evident when a component evolves and acquires more styling.
Suppose you give your component a light gray background so that its “out of the box” appearance looks reasonable. An author overrides that background to be red so that it fits in with their red visual theme. Later, you decide that your component requires a border somewhere to clearly delineate its contents from the outer page. Unfortunately, the aforementioned author wasn’t prepared to override this new border. When they pick up a new version of your component, they’ll end up with a red background but a gray border. That may not be what they want. If this happens too often, the author may come to feel that the use of a general-purpose component is not worth the trouble. The best resolution to this tension is still an open question. For the time being, your best bet is to give your general-purpose component an extremely basic visual appearance. But with time authors would end thinking that is quickier and safer to write all the elements by themself in plain html with their own stylesheet, and this could spell the end of Polymer Elements adoption.

@robdodson
Copy link
Contributor

Closing. Discussion moved here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants