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

Allow for additional stylesheets per example #110

Merged
merged 1 commit into from
Jan 8, 2018

Commits on Jan 8, 2018

  1. Allow for additional stylesheets per example

    For some examples (at the minute specifically the layout examples) we need to add additional styling to add borders or backgrounds to highlight individual elements within the example.
    
    At the minute this is being done by adding additional classes to the example (not yet committed), but this means that the app stylesheet is full of styles affecting only single examples, and the HTML and Nunjucks code includes extra classes which we would not want users to be copying into their own app.
    
    By allowing users to include additional stylesheets, the additional styling can exist in the same directory as the example and included from there.
    
    As an example, you might add the following to an example's frontmatter:
    
    ---
    layout: layout-example.njk
    stylesheets:
    - annotate-layout.css
    ---
    36degrees committed Jan 8, 2018
    Configuration menu
    Copy the full SHA
    20085fa View commit details
    Browse the repository at this point in the history