• Stars
    star
    1,940
  • Rank 23,802 (Top 0.5 %)
  • Language
    HTML
  • License
    Other
  • Created over 11 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

⚡️🎨 A starting point for crafting living style guides.

Style-Guide-Boilerplate v3.3.2

A starting point for crafting living style guides.

View Demo

Note: Sample patterns have been included in the demo. Your site will have its own unique patterns.

Screenshot

Getting Started With Style Guide Boilerplate

Download the Style Guide Boilerplate

You can clone, fork, or download the repo from GitHub. Once you have the files for Style Guide Boilerplate, you'll create a directory on your site for them.

Set up a directory on your site for the style guide

I recommend creating a directory named style-guide in your site's root directory.

Upload the Style Guide Boilerplate files

Style Guide Boilerplate is currently PHP based so you will need a server that supports PHP. Upload the files from the GitHub repo to your newly created directory.

Hook up your own CSS into the style guide

In the <head> of Style Guide Boilerplate are custom styles for the boilerplate itself. These have all been prefixed with sg- so they hopefully shouldn't cause any conflicts with your website's own styles.

Below the custom styles for the boilerplate, you will add in your own custom stylesheet(s) which you use on your live site.

<!-- Style Guide Boilerplate Styles -->
<link rel="stylesheet" href="css/sg-style.css">

<!-- Replace below stylesheet with your own stylesheet -->
<link rel="stylesheet" href="css/style.css">

Review your live site CSS

You should be able to go to yoursite.com/style-guide/ and see how your live site's CSS affects base elements. The last step is creating your site's custom patterns/modules.

Create custom patterns

To create custom patterns like buttons, breadcrumbs, alert messages, etc., create a new .html file and add your HTML markup into the file.

Save the file as pattern-name.html into the markup/patterns directory inside of your style-guide directory.

You should now be able to see the new patterns at yoursite.com/style-guide/

Create personalized documentation

You can use markdown or html to create personalized documentation for your examples. Create a new .md or .html file and name it whatever your markup snippet file is named.

Save the file as markup-name.md or markup-name.html into the doc/base or doc/patterns directory inside of your style-guide directory.

For example, if you want to create doc for markup/patterns/breadcrumbs.html, create a file called breadcrumbs.md or breadcrumbs.html and save it into doc/patterns.

You should now be able to see the new doc at yoursite.com/style-guide/

Running the app

You can run the application with PHP's built in web server. Run the following command:

php -S localhost:8000

Now, browse to http://localhost:8000 to see the website.

Generating static HTML style guide

You can generate a static index.html version of style guide boilerplate by running the following command:

php index.php > index.html

Browser Support

I've built Style Guide Boilerplate with progressive enhancement in mind to work on a wide range of browsers.

Known supported browsers include:

  • Chrome
  • Firefox
  • Safari
  • Opera
  • IE8+
  • Safari for iOS
  • Stock Android Browser (4.0+)

Tested with BrowserStack.

BrowserStack

If you come across any bugs, or have any other issues with the boilerplate, please open an issue here on GitHub.

Additional Resources

Styleguides.io

Front-end Style Guides

Front-end Style Guide Roundup

Future-Friendly Style Guides

HTML KickStart

Oli.jp Style Guide

Jeremy Keith's Pattern Primer

Paul Robert Llyod's Style Guide

Pears

Starbucks Style Guide

Credit

Thanks to:

Jeremy Keith for letting me build on top of Pattern Primer.

Ports

Contributing to this project

Please take a moment to review the guidelines for contributing.

Licensing

Style Guide Boilerplate is licensed under the MIT License

More Repositories

1

stylelint-config-sass-guidelines

⚙ A stylelint config inspired by https://sass-guidelin.es/
JavaScript
443
star
2

Categorizr

A modern device detection script
PHP
185
star
3

CSS-Components-Modifiers-And-Subcomponents-Collection

A collection of common CSS module class names
CSS
84
star
4

Media-Query-Sync

Ⓜ️ A cross-browser solution for syncing Javascript functionality with CSS media queries
JavaScript
36
star
5

viewportwidth.js

A solution for determining accurate cross-browser viewport widths.
JavaScript
35
star
6

CSS-Coding-Standards

⭐ Personal coding standards for crafting CSS
21
star
7

Hi-Res-Images

A simple solution for loading high resolution images on devices that can support them
12
star
8

eleventy-site

Simple eleventy starter site
CSS
10
star
9

express-create-react-app-custom-template

Example repo to show how to inject server rendered HTML into a create-react-app based app.
JavaScript
8
star
10

stencil-storybook-boilerplate

A stencil + storybook boilerplate repo
TypeScript
7
star
11

vite-vue-cypress-code-coverage-example

Vue
5
star
12

notion-calendar-item-colorizer

Colorizes items in your notion calendar so they are easier to see
JavaScript
5
star
13

styled-components-custom-properties-theme-provider

Custom theme provider which uses CSS custom properties in browsers that support them, and falls back to styled components theme provider implementation in browsers that don't support CSS custom properties. 💅
JavaScript
5
star
14

terra-react-app

Terra UI app bootstrapped with create-react-app
JavaScript
3
star
15

brettjankord.com

Personal Site
MDX
2
star
16

create-react-app-perf-test

Sample create react app set up for performance testing with puppeteer
JavaScript
2
star
17

create-eleventy-site

Create a static site built with Eleventy
JavaScript
2
star
18

jest-serializer-stencil

A Jest snapshot serializer for Stencil components
TypeScript
2
star
19

mern-graphql-crud-app

MongoDB Express React NodeJS + GraphQL CRUD App
JavaScript
2
star
20

Utilities.css

A collection of common utility styles
1
star
21

circular-icon-wrapper

⭕ A react SVG component for rendering SVG icons in a circle
JavaScript
1
star
22

Base.css

A set of base styles used as a foundation for modular architected CSS
CSS
1
star
23

test-react-ui-button

Demo react component that uses SCSS and CSS modules
JavaScript
1
star
24

create-terra-react-app

Lite wrapper around create-react-app intended for creating prototypes with CRA + Terra UI components
JavaScript
1
star