envato-archive / guide

Document your application with a living component library and styleguide
https://rubygems.org/gems/guide
MIT License
8 stars 3 forks source link

Only inject stylesheets for HTML scenarios #71

Closed lukearndt closed 8 years ago

lukearndt commented 8 years ago

We noticed recently on Envato Market that a text scenario had display issues when the corresponding HTML version had a node-specific stylesheet.

Node-specific stylesheets don't make sense for text scenarios, so let's limit them to HTML.

Edit: I've moved the decision-making logic up into the view model, plus extended this pattern to guard against including node-specific JavaScript on text-only templates.

AeroCross commented 8 years ago

Thanks for this change mate 🌟 👍