We're migrating to frontend - which only has signed commits in the master branch
We use kalei to generate our CSS documentation right in your browser.
You can test if you have git, make and node installed by trying to call them in your terminal/cmd.
git --version
node -v
make -v
- Install git our version control
- Install git lfs our version control for large files like pictures and illustrator documents
- Install nodejs our server platform and platform for various helper tools
- Install make for Windows. It's preinstalled on Mac. Probably also with your linux distro. Make is a task runner designed for compiling files.
- Go to https://github.com/Firefund/styleguide/ and copy the git url.
- Download the repository (
git clone --depth=1 https://github.com/Firefund/styleguide.git) and cd into the styleguide folder. npm i- download the node packages that we depend on.npm run kalei- Go to localhost:8080 in your browser (preferably in two or three different, like firefox and chrome to ensure that your styles work in all browsers)
- Start developing css in
styles/blocks/
- Find or create a card in Waffle - our kanban tool
- Create a css file in
styles/blocks/- name it after your BEM block - add the file path to
styles/styleguide.css.@import "blocks/YourFileName.css"; - if you need to use any of the variables defined in
styles/_variables.css, you need to import it with:@import "../variables";<- no url
The anatomy for clean CSS declaration blocks is the following:
/* Sorting the CSS in BEM blocks */
FIRST: position/box-model
position:
display:
top/right/bottom/left
float
content (only used with position: absolute/relative and ::before and/or ::after)
SECOND: size
height:
margin:;
padding;
border
THIRD: font/text
color
font-*
text-*
line-height
FOURTH: background
FIFTH: transitions/transforms/animation
SIXTH: weird stuff
cursor:
list-style:
Happy coding!
