Giter VIP home page Giter VIP logo

am-strap-kfc's Introduction

AM Strap

A DRY modular styling framework built with SCSS using attribute modules. It is recommended to normalize your project before importing AM Strap. Ensure required browser support by using autoprefixer when compiling.

Contents

  1. Install
  2. Grid
  3. Buttons
  4. Forms
  5. Float
  6. Align

Install

NPM

npm install am-strap

Bower

bower install am-strap

At the start of your stylesheet, import individual files from the modules directory or use the all file to import all modules. To customise styles for a module, add it's config map before the import declaration and edit the relevant values.

Grid

The grid system is based on Bootstrap but uses attribute modules. Please reference their documentation for additional details on how to use it - just remember to convert to the relevant attribute modules and values.

Config

$am-columns: 12;

$am-breakpoints: (
  "xs": (
    "container": fluid,
    "padding": 1rem,
    "width": 0px
  ),
  "sm": (
    "container": fluid,
    "padding": 1rem,
    "width": 420px
  ),
  "md": (
    "container": set,
    "padding": 1rem,
    "width": 768px
  ),
  "lg": (
    "container": set,
    "padding": 2rem,
    "width": 992px
  ),
  "xl": (
    "container": set,
    "padding": 2rem,
    "width": 1200px
  )
);

HTML Usage

<div am-container>
  <div am-row>
    <div am-col="md-6 xs-12"></div>
    <div am-col="md-3 xs-6"></div>
    <div am-col="md-3 xs-6"></div>
  </div>
</div>
<div am-col="sm-6" am-push="sm-6"></div>
<div am-col="sm-6" am-pull="sm-6"></div>
<div am-col="md-6" am-offset="md-3"></div>
<div am-col="md-6" am-hidden="xs sm"></div>
<div am-col="xs-12" am-visible="xs sm"></div>

CSS Usage

@media #{$only-sm} {
  // Styles for sm only
}
@media #{$above-md} {
  // Styles for above md
}
@media #{$below-lg} {
  // Styles for below lg
}

Buttons

Config

$am-btn: (
  "height": 3rem,
  "fill-color": #ffffff,
  "fill-background-color": #333333,
  "ghost-color": #111111,
  "ghost-border-color": #111111,
  "ghost-border-width": 2px,
  "loading-background-color": #333333
);

Accepted values

  • ghost
  • fill
  • tick (optional hover state)
  • arrow (optional hover state)

Usage

<a href="" am-btn="ghost">Text</a>
<a href="" am-btn="fill">Text</a>
<a href="" am-btn="ghost tick">Text</a>
<a href="" am-btn="fill arrow">Text</a>

Forms

Config

$am-form: (
  "color": #111111,
  "input-height": 3rem,
  "padding": 1rem,
  "border-width": 2px,
  "border-color": #cccccc,
  "background-color": transparent,  
  "checkbox-height": 2rem,
  "checkbox-checked-size": 1.25rem,
  "placeholder-color": #888888,
  "response-negative-color": #ed9696,
  "response-positive-color": #9bd49b
);

Accepted values

  • input
  • textarea
  • select
  • checkbox

Usage

<input type="text" am-form="input">
<textarea am-form="textarea"></textarea>
<div am-form="select">
  <select>
    <option selected="true" disabled="disabled">--Select--</option>
    <option value="Option 1">Option 1</option>
    <option value="Option 2">Option 2</option>
  </select>
</div>
<div am-form="checkbox">
  <input type="checkbox" id="checkbox-1">
  <label for="checkbox-1"></label>
  <label for="checkbox-1">Label text</label>
</div>

Float

Accepted values

  • clear
  • left
  • right
  • none
  • initial
  • inherit

Usage

<div am-float="clear">
  <div am-float="left">
    Element floated left
  </div>
  <div am-float="right">
    Element floated right
  </div>
</div>

Align

Accepted values

  • left
  • right
  • center
  • justify
  • initial
  • inherit

Usage

<div am-align="left">
  Text aligned left
</div>
<div am-align="right">
  Text aligned right
</div>

am-strap-kfc's People

Contributors

caribou-code avatar

Watchers

James Cloos avatar  avatar Matt Booth avatar Dave avatar Tony avatar  avatar

Forkers

katawura

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.