Block
The block
object simply stacks an image on top of some text content.
This incredibly frequently occurring design pattern is now wrapped up in a simple, reusable, configurable abstraction.
Dependencies
The block
object depends on two other modules:
If you install the Block object using Bower or npm, you will get these
dependencies at the same time. If not using Bower or npm, please be sure to
install and @import
these dependencies in the relevant way.
Installation
You can install the block
module via Bower, npm, or copy and paste.
Install using Bower:
$ bower install tree-block --save
Once installed, @import
into your project in its Object layer:
;
Install using npm:
$ npm install tree-block --save
Install via file download
The least recommended option for installation is to simply download
_object.block.scss
into your project and @import
it into your project in its
Objects layer.
Usage
Basic usage of the block
object uses the required classes:
Text-like content goes here.
The only valid children of the .o-block
node are .o-block__img
and
.o-block__body
.
Options
Other, optional classes can supplement the required base classes:
.o-block--flush
: remove the space between the stacked image- and text-content..o-block--[tiny|small|large|huge]
: alter the spacing between the stacked image- and text-content..o-block--[center|right]
: align both the image- and text-content.
For example:
Text-like content goes here.
Credits
- inuitcss Powerful, Sass-based, OOCSS framework designed with scalability and performance in mind.