jeluard / lucuma

Web Components library for ClojureScript
96 stars 8 forks source link

Allow to specify content per media query #21

Closed jeluard closed 10 years ago

jeluard commented 10 years ago

Similarly to what is done for style.

Additional question here is what to do when queries match change? (this is not a problem for style as this is handled natively by the browser)

jeluard commented 10 years ago

Check foundation's interchange concept for inspiration.

jeluard commented 10 years ago

Following syntax is now available: {:media "(max-width: 500px)" :content [:div "some div"] :on-attached (fn [] ...) :on-detached (fn [] ...)} with on-attached / on-detached referencing functions called each time content is attached / detached to /from the DOM.