wunderio / wunderfront-toolkit

A frontend toolkit for building websites under the WunderKraut brand
1 stars 0 forks source link

WunderFront

Table of Contents

  1. Requirements
  2. Installation
  3. Using WunderFront
    1. Variables
    2. Mixins

Requirements

WunderFront is a Compass extension, so make sure you have so make sure you have Sass and Compass installed. Some features may not be available if you are not using the Ruby compiler to compile your Sass, including this extension totally breaking.

The minimum version of Sass required is Sass 3.2.0

The minimum version of Compass required is Compass 0.12.0

If the compiler you are using is not compatible with the above minimum versions, it will not compile correctly.

Installation

There are two ways you can install this extension; either as a Ruby Gem or as a Bower Component. This extension may require custom Ruby functions, and installing it as a Bower package may not work

RubyGems

gem install wunderfront

If installing as a Ruby Gem, Compass can then use it like any other Compass extension. You can create a new project and automatically require it:

compass create <my_project> -r wunderfront

Or, you can add it to an existing project by adding the following to your config.rb file:

@import "wunderfront"

You can also import specific files or groups of files:

@import "wunderfront/utilities" @import "wunderfront/base" @import "wunderfront/componenets"

Bower

bower install wunderfront --save-dev

If installing as a Bower Component, you are going to need to add the path to your config.rb in order to be able to use WunderFront as any other Compass extension. The following assumes your Bower components folder is named bower_components and it's at the same directory level as your config.rb file:

add_import_path "bower_components/wunderfront/sass"

Using WunderFront

The "$wk-produce-css-classes" variable

By default, importing these stylesheet will not generate any CSS and only provide mixins and variables. If you want SMACSS style reusables classes, you can set this variable before importing:

$wk-produce-css-classes: true;

Variables

To import only variables and nothing else, add the following to your Sass file: @import "wunderfront/utilities/variables"

Generic Colors

Brand colours

Fonts

Helper mixins

To import only variables and nothing else, add the following to your Sass file: @import "wunderfront/utilities/mixins"

Layout helper mixins

Base styling

Elements

body, h1, h2, h3, h4, h5, h6, a

Components

Team

Person