Fork me on GitHub

Groundwork

Fractal Styleguide, now with styles

To build the styleguide, Groundwork uses the magnificent Fractal by Mark Perkins from Clearleft (which is also home to the fiendishly ubiquitous @adactio).

It automatically picks up “components” (what I call “modules”) from your directory structure, so it plays perfectly with the whole Modular CSS thang. You create a CSS file, a template file (Handlebars by default), a JS file, SVG, PNG etc., and it’s all picked up in one tickety little bundle.

However, I noticed that the styles weren’t being picked up in the styleguide, so a quick visit to the Fractal Slack chat and @sturobson very kindly pointed me in the direction of the documentation: you have to define a template preview layout to pull in styles. Doh.

And now, it works.