Skip to content

Wisembly/tapestry

Repository files navigation

Tapestry Build Statusnpm versionBower version

CSS guidelines

Goals

  • Maintainable OOCSS components
  • Scalable code

Naming

  • BEM - Block-element--modifier
  • PascaleCase for component name
  • camelCase for component childs
  • Lowercase for modifiers
  • Use is-* and has-* modifiers when needed
<divclass="Component Component--modifier is-state"><divclass="Component-child"></div><divclass="Component-otherChild"></div></div>

Spacing and indentation

  • Two spaces indent
  • Space after : property declaration
  • Space before { rule declaration
  • Closing braces on a new line
.Component{display: inline-block}

Else

  • Never use IDs
  • No magic number
  • Only use !important on utility classes
  • Max nesting level: 3

Development

Installation

npm install npm install -g gulp pug-cli backstopjs 

Run

gulp// starts server and watch files, available on localhost:3000gulpicons// builds icons

Pre-commit and pre-push

Installation

Pre-commit hook ensures code has been linted.

npm run pre-commit

Bypass

To bypass the pre-commit, just add -n option.

git ci -n git ci -nm "My commit message" 

Release

npmrunrelease// builds, commits, push, tags, publishes to Bower and NPM and deploys to GitHub Pages

Deploying

It can be run manually:

npmrundeploy

Tests

Tests are run with Travis and have to be updated before branch merges. They can be run locally with these following commands.

npmrunlint// linterbackstopreference// visual tests: builds referencesbackstoptest// visual tests: compares references with actual HEAD

About

Wisembly - UI Elements

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 11