This is the source code for the Neat website. It’s built with Middleman.
You can find the Neat Sass library source code here.
-
Get the code:
git clone https://github.com/thoughtbot/neat.bourbon.io.git -
Set up your machine:
bin/setup -
Run the app:
bundle exec middlemanopen http://localhost:4567
Neat uses SassDoc to document its source code. For this website, we use a
Rake task to run SassDoc’s CLI, which parses documentation-specific comments
from Neat’s source and outputs them as versioned JSON files
(e.g. neat_2_0_0.json). We then use a proxy in Middleman to generate
unique pages for each version.
To generate documentation for a published version of Neat,
use the generate_docs_for task:
rake generate_docs_for 2.0.0
The website is hosted on Netlify, and is automatically built and deployed when
changes are pushed to the master branch. Credentials for Netlify can be found
in 1Password.
This project uses:
- Sass, with Bourbon
- BEM-style CSS class names
library/: Global variables, mixins and functions; all non-rendering Sassbase/: Unclassed HTML elements (e.g.a {},input {})patterns/: Abstractions, highly reusable pieces of style that are used in any number of unrelated contexts (e.g..media {})components/: Discrete, implementation-specific piece of UI (e.g..site-nav {})views/: An object who's styles are modified by the view's body class (e.g..page-index {})
- Autoprefixer
- SCSS-Lint, with Hound (configuration)
- A variety of CSS units:
emfor typographical-related elementsremfor lengths related to componentspxfor borders, text shadows, etc.vw/vhfor lengths that should be relational to the viewport
modular-scale()(which outputsemvalues) for font sizes