Giter VIP home page Giter VIP logo

minable's Introduction

Minable CSS Framework

Minable is a very minimal but flexible CSS grid framework powered by Scss.

We have recently made some big changes to the naming conventions, this will not be compatible with any old versions of Minable!!!

Minable Classes

Minable makes use of BEM like naming convention for classes making for far more readable markup, if you're not familiar it stands for Block Element Modifier. It follows this basic structure:

.block {}
.block__element {}
.block--modifier {}
.block__element--modifier {}

For more information have a look at MindBEMding - Getting your head round BEM syntax by Harry Roberts, its a great read!

Minable wrapper

The Wrapper element sets the max width $min-wrapper-width of the content and centers it on the page, by default this is 60em (960px).

.min__w

An optional wide modifier can be set $min-wrapper-width-wide, by default this is set to false.

.min__w--wide

Minable Group

The Group element wraps Units, it also allows us to adjust the gutter on direct descendant min__u elements.

.min__g // Default gutter width set by $min-gutter, 32px default.
.min__g--gutter-small // Sets gutter to value of $min-gutter-small, 8px default.
.min__g--gutter-none // Removes gutter.

Minable Unit

The Unit defines the ratios of your columns as well as breakpoints where it will become effective.

.min__u--1-2 // 1/2 width unit with no specified breakpoint
.min__u--l-13-19 // 13/19 width unit at the large breakpoint (for some insane layouts)
.min__u--m-1-8 // 1/8 width at the medium breakpoint

Markup example

<div class="min__w">
  <div class="min__g">
    <div class="min__u--3-4 min__u--m-1-2">
      <p>This content will be 3/4 width on large screens and 1/2 on medium screens.</p>
    </div>
    <div class="min__u--1-4 min__u--m-1-2">
      <p>This content will be 3/4 width on large screens and 1/2 on medium screens.</p>
    </div>
  </div>
</div>

Grid Setup

Breakpoint and the unit generator is setup from the _settings.scss:

$break-l: 920px !default;
$break-m: 767px !default;
$break-s: 420px !default;

$min-breakpoint-generators: l $break-l, ml $break-ml, m $break-m, s $break-s;

Here we define some breakpoint values, we store these as variables so they can be easily reused for consistency i.e. $break-l: 920px !default;

We then pass a reference for the class names and the breakpoint size value we just difined into the $min-breakpoint-generators array:

$min-breakpoint-generators: l $break-l;

This will generate units such as: %min__u--l-1-2

Silent classes are generated to minimise footprint, just extend the new silent classes for use:

.min__u--l-1-2 {
  @extend %min__u--l-1-2;
}

More Docs coming soon

minable's People

Contributors

lbarratt avatar cbarratt avatar

Stargazers

bolser avatar  avatar

Watchers

bolser avatar  avatar James Cloos avatar  avatar

Forkers

ballzy

minable's Issues

Dry grid unit generation

Apply a more programmatic approach to the grid unit generation in _grid-unit.scss rather than explicitly writing every class. Would also allow for more control IE how many columns are generated etc.

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.