InvisCSS's styling is pretty much the default styling that you get after NormalizeCSS is finished:
Block Quote
A simple paragraph with a hyperlink. Keep on reading to see what InvisCSS brings to you:
InvisCss provides an optional containing element to wrap site contents.
Usecontainer
for a responsive, variable width container, with a pleasant amount of whitespace to the left and right, as you can see on this page.
If you prefer a more rigid system, you can use container-fixed
instead.
<div class="container">
...
</div>
InvisCss uses a modified version of FlexBox Grid for grids. For anyone familiar with Bootstrap's Grid, you'll feel right at home.
Also provided is a generic, but also responsive, flex system. Start with a surrounding div having .flex
(or .row
):
.flex.spaced-sm
.flex.start-xs
NB: .start-xs is implied through browser defaults & isn't necessary.
.flex.center-xs.reverse-md
.flex.end-sm.start-md.center-lg
.flex.spaced-sm.wrap-xs
& responsive reordered
.flex.top-xs.middle-sm.baseline-md.bottom-lg
.flex.vertical-xs.vertical-reverse-sm.horizontal-md
Extra Small Devices | Small Devices | Medium Devices | Large Devices | State | |
---|---|---|---|---|---|
.hidden-xs |
Hidden | Visible | Visible | Visible | Visible |
.hidden-sm |
Visible | Hidden | Visible | Visible | Visible |
.hidden-md |
Visible | Visible | Hidden | Visible | Visible |
.hidden-lg |
Visible | Visible | Visible | Hidden | Visible |
.hidden-xs-sm |
Hidden | Hidden | Visible | Visible | Visible |
.hidden-xs-md |
Hidden | Hidden | Hidden | Visible | Visible |
.hidden-sm-lg |
Visible | Hidden | Hidden | Hidden | Visible |
.hidden-md-lg |
Visible | Visible | Hidden | Hidden | Visible |
Gone are the days of html tables for anything but data. InvisCss reinvigorates table layouts using properly formatted div's and CSS.
<div class="table stripe border">
<div class="row">
<div class="cell nowrap">...</div>
</div>
</div>
<div class="table vert-stripe horiz-border outer-border">
<div class="row">
<div class="cell col-md-5">...</div>
</div>
</div>
...or on the table itself
<div class="table stripe border col-md-8 center">
...
</div>
This is the default layout, with only aligned
specified on the form. Label
elements are rendered as right-aligned table cells automatically, and are responsive.
<form ...>
<div class="row">
<label for="exampleInputEmail1">Email address</label>
<input id="exampleInputEmail1" placeholder="Email" type="email">
</div>
...
</form>
* Requires Javascript
Just add stacked
to the form's class (or to a parent of the form elements) to always stack elements vertically.
<form class="center stack" ...>
...
</form>
* Requires Javascript
<div class="alert success">
...
</div>
<div class="alert info fade">
...<i class="inv-cancel close"></i>
</div>
<div class="alert warning">
...
</div>
<div class="alert danger">
...
</div>
By adding .timeout
and optional data-timeout="2500"
, you can choose to automatically close the alert. The timeout value is in milli-seconds.
Note: Dynamically adding alerts at run-time is supported on most browsers* (*except IE10, Opera Mini, Android 4.3)
Try It!
<div class="alert success fade timeout" data-timeout="3000">
...
</div>
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
Image at middle. Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
Image at bottom. Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
<div class="media">
<div class="thumbnail">...</div>
<div class="body">...</div>
</div>
Wrap it in .media-alternate
, or set individually using .right
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
Donec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit.
Donec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit.
Donec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit.
Donec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit.
Donec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit.
Donec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit.