Style guide specific styles (like syntax highlighting) shouldn't be included in the normal site styles #2

Open
stubbornella opened this Issue Feb 21, 2014 · 1 comment

Projects

None yet

1 participant

@stubbornella

In the docs, it looks like you are suggesting including stylesheets specific to the style guide like syntax highlighting and docs styles in application.scss. I think it would be better to isolate those styles and only include them in the layout if the current page is the style guide itself:

# application.scss
@import 'hologram_rails/github';
@import 'hologram_rails/docs';

On my project, we have:

# styleguide.scss
@import 'hologram_rails/github';
@import 'hologram_rails/docs';

And we conditionally include it if the current page is the style guide. What do you think?

@stubbornella

Ah, I should have mentioned goals for this.

  1. Not having style guide styles pollute the main site styles.
  2. Not having extra unused selectors delivered with the application. (This can slow down render and paint times causing janky javascript interactions and sends more data over the wire causing slower page load)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment