postcss-utilities
Version:
PostCSS plugin to add a collection of mixins, shortcuts, helpers and tools for your CSS
167 lines (150 loc) • 3.1 kB
CSS
body {
margin: 0;
padding: 0;
font-family: sans-serif;
}
.container {
max-width: 990px;
margin: 0 auto;
padding-left: 15px;
padding-right: 15px;
}
/* Truncate
========================================================================== */
.truncate {
float: left;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
width: 500px;
}
.multiline {
width: 500px;
display: block;
display: -webkit-box;
height: 4.5em;
line-height: 1.5;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
font-size: 1.2em;
}
/* Hide Visually
========================================================================== */
a {
float: left;
border: 0;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
color: #fff;
}
/* Clear Fix
========================================================================== */
.cfx:after {
content: '';
display: block;
clear: both;
visibility: hidden;
}
.cfx {
color: #000;
}
.cfx:after {
content: '';
display: block;
clear: both;
visibility: hidden;
}
/* Horizontal Rule
========================================================================== */
hr {
float: left;
height: 1px;
border: 0;
border-top: 1px solid #cecece;
margin: 3em 0;
color: #fff;
}
.custom-hr {
height: 1px;
border: 0;
border-top: 1px solid red;
margin: 1em 0;
}
/* Circle
========================================================================== */
.circle {
float: left;
border-radius: 50%;
width: 200px;
height: 200px;
background-color: red;
color: #fff;
}
/* Reset List
========================================================================== */
ul {
float: left;
margin-top: 0;
margin-bottom: 0;
padding-left: 0;
color: #000;
}
ul li {
list-style: none;
}
/* Aspect Ratio
========================================================================== */
.box-16-9 {
background-color: #ccc;
position: relative;
display: block;
height: 0;
padding: 0;
overflow: hidden;
padding-bottom: 56.25%;
margin-bottom: 20px;
}
.box-4-3 {
background-color: #ccc;
position: relative;
display: block;
height: 0;
padding: 0;
overflow: hidden;
padding-bottom: 75%;
margin-bottom: 20px;
}
.aspect-default {
position: relative;
display: block;
height: 0;
padding: 0;
overflow: hidden;
padding-bottom: 56.25%;
}
/* Center Block
========================================================================== */
.center-block {
float: left;
display: block;
margin-left: auto;
margin-right: auto;
top: 0;
}
/* Center
========================================================================== */
.center {
float: left;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
color: #fff;
}