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