Beautiful Pure-CSS Display Panel
Based off of some of the styling from http://themes.stammtec.de/?theme=peach
by Troy Alford
HTML
<bar id="mainBar">
<section class="bold large centered">$20</section>
<divider></divider>
<section class="bold left fill">Something really long that happens to be for sale for $20.00!</section>
</bar>
SCSS
html, body { font-size: 10pt; }
#mainBar {
margin: 50px auto;
height: 50px; width: 80%;
}
bar {
background-color: #84ABE4;
background-image: linear-gradient(top, #84ABE4 10%, #25539E 90%);
background-image: -o-linear-gradient(top, #84ABE4 10%, #25539E 90%);
background-image: -moz-linear-gradient(top, #84ABE4 10%, #25539E 90%);
background-image: -webkit-linear-gradient(top, #84ABE4 10%, #25539E 90%);
background-image: -ms-linear-gradient(top, #84ABE4 10%, #25539E 90%);
background-image: -webkit-gradient(
linear,
left top,
left bottom,
color-stop(0.1, #84ABE4),
color-stop(0.9, #25539E)
);
border: 1px solid #369;
border-radius: 5px;
box-shadow: inset 1px 1px 3px #FFF,
inset -1px -1px 3px #9CF,
-1px -1px 3px #84ABE4,
1px 1px 5px #25539E;
-webkit-transition: all 0.5s ease;
-moz-transition: all 0.5s ease;
-o-transition: all 0.5s ease;
transition: all 0.5s ease;
color: #fff;
display: block;
font-family: proxima-nova-n7, proxima-nova-1, proxima-nova-2, Helvetica, Arial, sans-serif;
padding: 5px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
&:hover {
box-shadow: inset 1px 1px 3px #FFF,
inset -1px -1px 3px #9CF,
-1px -1px 3px #628,
1px 1px 5px #628;
cursor: pointer;
}
> section, > divider {
display: inline-block;
margin: 0;
vertical-align: middle;
}
> section {
font-size: 1.2rem;
height: 30px;
padding: 10px;
text-shadow: 0px 1px 1px #555;
&.bold { font-weight: bold; }
&.large { font-size: 1.8rem; }
&.centered { text-align: center; }
&.fill { display: inline; }
&.left { text-align: left; }
&.right { text-align: right; }
}
...