The flag
object module is an object similar in appearance to
the media object, but which
provides slightly more advanced functionality.
The flag
object depends on two other modules:
If you install the flag
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.
You can install the flag
module via Bower, npm, or copy and paste.
$ bower install tree-flag --save
Once installed, @import
into your project in its Objects layer:
@import "bower_components/tree-flag/object.flag";
$ npm install tree-flag --save
The least recommended option for installation is to simply download
_object.flag.scss
into your project and @import
it into your project in
its Objects layer.
Basic usage of the flag
object uses the required classes:
<div class="o-flag">
<div class="o-flag__img">
<img src="/path/to/image.png" alt="" />
</div>
<div class="o-flag__body">
<p>Text-like content goes here.</p>
</div>
</div>
The only valid children of the .o-flag
node are .o-flag__img
and
.o-flag__body
.
Other, optional classes can supplement the required base classes:
.o-flag--[tiny|small|large|huge]
: alter the spacing between the image- and text-content..o-flag--rev
: reversed flag objects have their image-content to the right, and text-content to the left..o-flag--flush
: no space between image- and text-content..o-flag--[top|bottom]
: align object to top or bottom..o-flag--responsive
: a very basic responsive implementation of the flag object.
For example:
<div class="o-flag o-flag--flush">
<div class="o-flag__img">
<img class="o-flag__img" src="/path/to/image.png" alt="" />
</div>
<div class="o-flag__body">
<p>Text-like content goes here.<p>
</div>
</div>
- inuitcss Powerful, Sass-based, OOCSS framework designed with scalability and performance in mind.