Height - eights
This provides styles for heights using eighths.
The following sizes are available:
- h-1-8
- h-2-8
- h-3-8
- h-4-8
- h-5-8
- h-6-8
- h-7-8
- h-8-8
Each height size has a class to go with each of the media query viewport sizes. For example:
h-1-8-3xs
h-1-8-2xs
h-1-8-xs
h-1-8-sm
h-1-8-md
h-1-8-lg
h-1-8-xl
h-1-8-2xl
h-1-8-3xl
h-1-8-4xl
h-1-8-5xl
How to import into your CSS
Import this into your CSS with:
@import 'cacao-css/dist/height/height-8.css';
Imports are available for all media query viewport sizes.
@import 'cacao-css/dist/height/3xs/height-8.css';
@import 'cacao-css/dist/height/2xs/height-8.css';
@import 'cacao-css/dist/height/xs/height-8.css';
@import 'cacao-css/dist/height/sm/height-8.css';
@import 'cacao-css/dist/height/md/height-8.css';
@import 'cacao-css/dist/height/lg/height-8.css';
@import 'cacao-css/dist/height/xl/height-8.css';
@import 'cacao-css/dist/height/2xl/height-8.css';
@import 'cacao-css/dist/height/3xl/height-8.css';
@import 'cacao-css/dist/height/4xl/height-8.css';
@import 'cacao-css/dist/height/5xl/height-8.css';
See Import Cacao CSS for more information.
Source CSS
Default styles
height/height-8.css
/* =========================================================================== *\
Width 8's
\* =========================================================================== */
.h-1-8 {
height: calc(100% / 8);
}
.h-2-8 {
height: 25%;
}
.h-3-8 {
height: calc(100% / 8 * 3);
}
.h-4-8 {
height: 50%;
}
.h-5-8 {
height: calc(100% / 8 * 5);
}
.h-6-8 {
height: 75%;
}
.h-7-8 {
height: calc(100% / 8 * 7);
}
.h-8-8 {
height: 100%;
}
3xs styles
height/3xs/height-8.css
/* =========================================================================== *\
Width 8's
\* =========================================================================== */
@media (--m-3xs) {
.h-1-8-3xs {
height: calc(100% / 8);
}
.h-2-8-3xs {
height: 25%;
}
.h-3-8-3xs {
height: calc(100% / 8 * 3);
}
.h-4-8-3xs {
height: 50%;
}
.h-5-8-3xs {
height: calc(100% / 8 * 5);
}
.h-6-8-3xs {
height: 75%;
}
.h-7-8-3xs {
height: calc(100% / 8 * 7);
}
.h-8-8-3xs {
height: 100%;
}
}
2xs styles
height/2xs/height-8.css
/* =========================================================================== *\
Width 8's
\* =========================================================================== */
@media (--m-2xs) {
.h-1-8-2xs {
height: calc(100% / 8);
}
.h-2-8-2xs {
height: 25%;
}
.h-3-8-2xs {
height: calc(100% / 8 * 3);
}
.h-4-8-2xs {
height: 50%;
}
.h-5-8-2xs {
height: calc(100% / 8 * 5);
}
.h-6-8-2xs {
height: 75%;
}
.h-7-8-2xs {
height: calc(100% / 8 * 7);
}
.h-8-8-2xs {
height: 100%;
}
}
xs styles
height/xs/height-8.css
/* =========================================================================== *\
Width 8's
\* =========================================================================== */
@media (--m-xs) {
.h-1-8-xs {
height: calc(100% / 8);
}
.h-2-8-xs {
height: 25%;
}
.h-3-8-xs {
height: calc(100% / 8 * 3);
}
.h-4-8-xs {
height: 50%;
}
.h-5-8-xs {
height: calc(100% / 8 * 5);
}
.h-6-8-xs {
height: 75%;
}
.h-7-8-xs {
height: calc(100% / 8 * 7);
}
.h-8-8-xs {
height: 100%;
}
}
sm styles
height/sm/height-8.css
/* =========================================================================== *\
Width 8's
\* =========================================================================== */
@media (--m-sm) {
.h-1-8-sm {
height: calc(100% / 8);
}
.h-2-8-sm {
height: 25%;
}
.h-3-8-sm {
height: calc(100% / 8 * 3);
}
.h-4-8-sm {
height: 50%;
}
.h-5-8-sm {
height: calc(100% / 8 * 5);
}
.h-6-8-sm {
height: 75%;
}
.h-7-8-sm {
height: calc(100% / 8 * 7);
}
.h-8-8-sm {
height: 100%;
}
}
md styles
height/md/height-8.css
/* =========================================================================== *\
Width 8's
\* =========================================================================== */
@media (--m-md) {
.h-1-8-md {
height: calc(100% / 8);
}
.h-2-8-md {
height: 25%;
}
.h-3-8-md {
height: calc(100% / 8 * 3);
}
.h-4-8-md {
height: 50%;
}
.h-5-8-md {
height: calc(100% / 8 * 5);
}
.h-6-8-md {
height: 75%;
}
.h-7-8-md {
height: calc(100% / 8 * 7);
}
.h-8-8-md {
height: 100%;
}
}
lg styles
height/lg/height-8.css
/* =========================================================================== *\
Width 8's
\* =========================================================================== */
@media (--m-lg) {
.h-1-8-lg {
height: calc(100% / 8);
}
.h-2-8-lg {
height: 25%;
}
.h-3-8-lg {
height: calc(100% / 8 * 3);
}
.h-4-8-lg {
height: 50%;
}
.h-5-8-lg {
height: calc(100% / 8 * 5);
}
.h-6-8-lg {
height: 75%;
}
.h-7-8-lg {
height: calc(100% / 8 * 7);
}
.h-8-8-lg {
height: 100%;
}
}
xl styles
height/xl/height-8.css
/* =========================================================================== *\
Width 8's
\* =========================================================================== */
@media (--m-xl) {
.h-1-8-xl {
height: calc(100% / 8);
}
.h-2-8-xl {
height: 25%;
}
.h-3-8-xl {
height: calc(100% / 8 * 3);
}
.h-4-8-xl {
height: 50%;
}
.h-5-8-xl {
height: calc(100% / 8 * 5);
}
.h-6-8-xl {
height: 75%;
}
.h-7-8-xl {
height: calc(100% / 8 * 7);
}
.h-8-8-xl {
height: 100%;
}
}
2xl styles
height/2xl/height-8.css
/* =========================================================================== *\
Width 8's
\* =========================================================================== */
@media (--m-2xl) {
.h-1-8-2xl {
height: calc(100% / 8);
}
.h-2-8-2xl {
height: 25%;
}
.h-3-8-2xl {
height: calc(100% / 8 * 3);
}
.h-4-8-2xl {
height: 50%;
}
.h-5-8-2xl {
height: calc(100% / 8 * 5);
}
.h-6-8-2xl {
height: 75%;
}
.h-7-8-2xl {
height: calc(100% / 8 * 7);
}
.h-8-8-2xl {
height: 100%;
}
}
3xl styles
height/3xl/height-8.css
/* =========================================================================== *\
Width 8's
\* =========================================================================== */
@media (--m-3xl) {
.h-1-8-3xl {
height: calc(100% / 8);
}
.h-2-8-3xl {
height: 25%;
}
.h-3-8-3xl {
height: calc(100% / 8 * 3);
}
.h-4-8-3xl {
height: 50%;
}
.h-5-8-3xl {
height: calc(100% / 8 * 5);
}
.h-6-8-3xl {
height: 75%;
}
.h-7-8-3xl {
height: calc(100% / 8 * 7);
}
.h-8-8-3xl {
height: 100%;
}
}
4xl styles
height/4xl/height-8.css
/* =========================================================================== *\
Width 8's
\* =========================================================================== */
@media (--m-4xl) {
.h-1-8-4xl {
height: calc(100% / 8);
}
.h-2-8-4xl {
height: 25%;
}
.h-3-8-4xl {
height: calc(100% / 8 * 3);
}
.h-4-8-4xl {
height: 50%;
}
.h-5-8-4xl {
height: calc(100% / 8 * 5);
}
.h-6-8-4xl {
height: 75%;
}
.h-7-8-4xl {
height: calc(100% / 8 * 7);
}
.h-8-8-4xl {
height: 100%;
}
}
5xl styles
height/5xl/height-8.css
/* =========================================================================== *\
Width 8's
\* =========================================================================== */
@media (--m-5xl) {
.h-1-8-5xl {
height: calc(100% / 8);
}
.h-2-8-5xl {
height: 25%;
}
.h-3-8-5xl {
height: calc(100% / 8 * 3);
}
.h-4-8-5xl {
height: 50%;
}
.h-5-8-5xl {
height: calc(100% / 8 * 5);
}
.h-6-8-5xl {
height: 75%;
}
.h-7-8-5xl {
height: calc(100% / 8 * 7);
}
.h-8-8-5xl {
height: 100%;
}
}