googlearchive / core-style

Manage styling inside other elements and can be used to make themes.
https://www.polymer-project.org/0.5/docs/elements/core-style.html
10 stars 13 forks source link

Question: Is this element obsolete if I use CSS preprocessors? #16

Open antitoxic opened 9 years ago

antitoxic commented 9 years ago

Having a detailed research I ended up here: https://github.com/Polymer/polymer/issues/1052#issuecomment-69727620

I am understanding it right: Core-style simply shares bits of CSS across elements?

If this is so I can use something like SASS or LESS, right? And simply share a partial or variables across my elements styling?

May be I can ask the question in this way: is core-style intended for the developers that want or are forced to use vanilla CSS for styling?

I cant think of a scenario where a preprocessor like SASS would't fit a use-case that core-style does.

ebidel commented 9 years ago

They are complementary to each other. core-style allows reusing client-side styles across elements, but also supports data binding inside styles: https://www.polymer-project.org/docs/elements/core-elements.html#core-style. That's something LESS/SASS won't be able to do at run time.

antitoxic commented 9 years ago

I forgot about the dynamic binding. Thank you.

It's probably the fact that i don't see a use case where i will dynamically change the colour, instead of overriding with css.

On Tue, 20 Jan 2015 14:30 Eric Bidelman notifications@github.com wrote:

They are complementary to each other. core-style allows reusing client-side styles across elements, but also supports data binding inside styles: https://www.polymer-project.org/docs/elements/core-elements.html#core-style. That's something LESS/SASS won't be able to do at run time.

— Reply to this email directly or view it on GitHub https://github.com/Polymer/core-style/issues/16#issuecomment-70646501.