JSFiddle - React, Tailwind, and code Playground
by Barry Carter
HTML
Individual tiles
<hr style="clear: both;"/>
<div class="stat-tile stat-success">
<h2>Successes</h2>
<p>120</p>
<span></span>
</div>
<div class="stat-tile stat-calls">
<h2>Calls</h2>
<p>99999</p>
<span></span>
</div>
<hr style="clear: both;"/>
Using a strip
<hr style="clear: both;"/>
<div class="stat-tile-strip">
<div class="stat-success">
<h2>Successes</h2>
<p>120</p>
<span></span>
</div>
<div class="stat-calls">
<h2>Calls</h2>
<p>99999</p>
<span></span>
</div>
</div>
CSS
@font-face {
font-family:icomoon;
src:url(http://s3.amazonaws.com/icomoon.io/4/IcoMoonApp/icomoon.eot?-m9wrda);
src:url(http://s3.amazonaws.com/icomoon.io/4/IcoMoonApp/icomoon.eot?#iefix-m9wrda) format("embedded-opentype"),
url(http://s3.amazonaws.com/icomoon.io/4/IcoMoonApp/icomoon.ttf?-m9wrda) format("truetype"),
url(http://s3.amazonaws.com/icomoon.io/4/IcoMoonApp/icomoon.woff?-m9wrda) format("woff"),
url(fonts/2ad343be.icomoon.svg#icomoon) format("svg"),url(fonts/69e79c77.icomoon.woff) format("woff"),
url(http://s3.amazonaws.com/icomoon.io/4/IcoMoonApp/icomoon.svg?-m9wrda#icomoon) format("svg");
}
.stat-tile{
font-family: 'icomoon';
speak: none;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
width: 150px;
height: 120px;
padding: 5px;
float: left;
margin-right: 8px;
text-align: center;
}
.stat-tile h2 {
font-size: 20px
}
.stat-tile p {
font-weight: 400;
}
.stat-tile span {
float: right;
font-size: 20px
}
.stat-tile.stat-success { background-color: green; }
.stat-tile.stat-success span:before { content: "\e611";}
.stat-tile.stat-calls { background-color: orange; }
.stat-tile.stat-calls span:before { content: "\e600";}
/* a strip of tiles */
.stat-tile-strip div {
font-family: 'icomoon';
speak: none;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
width: 150px;
height: 120px;
padding: 5px;
float: left;
margin-right: 8px;
text-align: center;
}
.stat-tile-strip h2 {
font-size: 20px
}
.stat-tile-strip p {
font-weight: 400;
}
.stat-tile-strip span {
float: right;
font-size: 20px
...