Skip to main content

Print width - eights

This provides styles for widths using eighths that only apply when the page is printed.

The following sizes are available:

  • print-w-1-8
  • print-w-2-8
  • print-w-3-8
  • print-w-4-8
  • print-w-5-8
  • print-w-6-8
  • print-w-7-8
  • print-w-8-8

Each width size has a class to go with each of the media query viewport sizes. For example:

print-w-1-8-3xs
print-w-1-8-2xs
print-w-1-8-xs
print-w-1-8-sm
print-w-1-8-md
print-w-1-8-lg
print-w-1-8-xl
print-w-1-8-2xl
print-w-1-8-3xl
print-w-1-8-4xl
print-w-1-8-5xl

How to import into your CSS​

Import this into your CSS with:

@import 'cacao-css/dist/width/print-width-8.css';

Imports are available for all media query viewport sizes.

@import 'cacao-css/dist/width/3xs/print-width-8.css';
@import 'cacao-css/dist/width/2xs/print-width-8.css';
@import 'cacao-css/dist/width/xs/print-width-8.css';
@import 'cacao-css/dist/width/sm/print-width-8.css';
@import 'cacao-css/dist/width/md/print-width-8.css';
@import 'cacao-css/dist/width/lg/print-width-8.css';
@import 'cacao-css/dist/width/xl/print-width-8.css';
@import 'cacao-css/dist/width/2xl/print-width-8.css';
@import 'cacao-css/dist/width/3xl/print-width-8.css';
@import 'cacao-css/dist/width/4xl/print-width-8.css';
@import 'cacao-css/dist/width/5xl/print-width-8.css';

See Import Cacao CSS for more information.

Source CSS​

Default styles​

width/print-width-8.css
/* =========================================================================== *\
Width 8's
\* =========================================================================== */

@media print {
.print-w-1-8 {
width: calc(100% / 8);
}

.print-w-2-8 {
width: 25%;
}

.print-w-3-8 {
width: calc(100% / 8 * 3);
}

.print-w-4-8 {
width: 50%;
}

.print-w-5-8 {
width: calc(100% / 8 * 5);
}

.print-w-6-8 {
width: 75%;
}

.print-w-7-8 {
width: calc(100% / 8 * 7);
}

.print-w-8-8 {
width: 100%;
}
}

3xs styles​

width/3xs/print-width-8.css
/* =========================================================================== *\
Width 8's
\* =========================================================================== */
@media (--m-3xs) {
@media print {
.print-w-1-8-3xs {
width: calc(100% / 8);
}

.print-w-2-8-3xs {
width: 25%;
}

.print-w-3-8-3xs {
width: calc(100% / 8 * 3);
}

.print-w-4-8-3xs {
width: 50%;
}

.print-w-5-8-3xs {
width: calc(100% / 8 * 5);
}

.print-w-6-8-3xs {
width: 75%;
}

.print-w-7-8-3xs {
width: calc(100% / 8 * 7);
}

.print-w-8-8-3xs {
width: 100%;
}
}
}

2xs styles​

width/2xs/print-width-8.css
/* =========================================================================== *\
Width 8's
\* =========================================================================== */
@media (--m-2xs) {
@media print {
.print-w-1-8-2xs {
width: calc(100% / 8);
}

.print-w-2-8-2xs {
width: 25%;
}

.print-w-3-8-2xs {
width: calc(100% / 8 * 3);
}

.print-w-4-8-2xs {
width: 50%;
}

.print-w-5-8-2xs {
width: calc(100% / 8 * 5);
}

.print-w-6-8-2xs {
width: 75%;
}

.print-w-7-8-2xs {
width: calc(100% / 8 * 7);
}

.print-w-8-8-2xs {
width: 100%;
}
}
}

xs styles​

width/xs/print-width-8.css
/* =========================================================================== *\
Width 8's
\* =========================================================================== */
@media (--m-xs) {
@media print {
.print-w-1-8-xs {
width: calc(100% / 8);
}

.print-w-2-8-xs {
width: 25%;
}

.print-w-3-8-xs {
width: calc(100% / 8 * 3);
}

.print-w-4-8-xs {
width: 50%;
}

.print-w-5-8-xs {
width: calc(100% / 8 * 5);
}

.print-w-6-8-xs {
width: 75%;
}

.print-w-7-8-xs {
width: calc(100% / 8 * 7);
}

.print-w-8-8-xs {
width: 100%;
}
}
}

sm styles​

width/sm/print-width-8.css
/* =========================================================================== *\
Width 8's
\* =========================================================================== */
@media (--m-sm) {
@media print {
.print-w-1-8-sm {
width: calc(100% / 8);
}

.print-w-2-8-sm {
width: 25%;
}

.print-w-3-8-sm {
width: calc(100% / 8 * 3);
}

.print-w-4-8-sm {
width: 50%;
}

.print-w-5-8-sm {
width: calc(100% / 8 * 5);
}

.print-w-6-8-sm {
width: 75%;
}

.print-w-7-8-sm {
width: calc(100% / 8 * 7);
}

.print-w-8-8-sm {
width: 100%;
}
}
}

md styles​

width/md/print-width-8.css
/* =========================================================================== *\
Width 8's
\* =========================================================================== */
@media (--m-md) {
@media print {
.print-w-1-8-md {
width: calc(100% / 8);
}

.print-w-2-8-md {
width: 25%;
}

.print-w-3-8-md {
width: calc(100% / 8 * 3);
}

.print-w-4-8-md {
width: 50%;
}

.print-w-5-8-md {
width: calc(100% / 8 * 5);
}

.print-w-6-8-md {
width: 75%;
}

.print-w-7-8-md {
width: calc(100% / 8 * 7);
}

.print-w-8-8-md {
width: 100%;
}
}
}

lg styles​

width/lg/print-width-8.css
/* =========================================================================== *\
Width 8's
\* =========================================================================== */
@media (--m-lg) {
@media print {
.print-w-1-8-lg {
width: calc(100% / 8);
}

.print-w-2-8-lg {
width: 25%;
}

.print-w-3-8-lg {
width: calc(100% / 8 * 3);
}

.print-w-4-8-lg {
width: 50%;
}

.print-w-5-8-lg {
width: calc(100% / 8 * 5);
}

.print-w-6-8-lg {
width: 75%;
}

.print-w-7-8-lg {
width: calc(100% / 8 * 7);
}

.print-w-8-8-lg {
width: 100%;
}
}
}

xl styles​

width/xl/print-width-8.css
/* =========================================================================== *\
Width 8's
\* =========================================================================== */
@media (--m-xl) {
@media print {
.print-w-1-8-xl {
width: calc(100% / 8);
}

.print-w-2-8-xl {
width: 25%;
}

.print-w-3-8-xl {
width: calc(100% / 8 * 3);
}

.print-w-4-8-xl {
width: 50%;
}

.print-w-5-8-xl {
width: calc(100% / 8 * 5);
}

.print-w-6-8-xl {
width: 75%;
}

.print-w-7-8-xl {
width: calc(100% / 8 * 7);
}

.print-w-8-8-xl {
width: 100%;
}
}
}

2xl styles​

width/2xl/print-width-8.css
/* =========================================================================== *\
Width 8's
\* =========================================================================== */
@media (--m-2xl) {
@media print {
.print-w-1-8-2xl {
width: calc(100% / 8);
}

.print-w-2-8-2xl {
width: 25%;
}

.print-w-3-8-2xl {
width: calc(100% / 8 * 3);
}

.print-w-4-8-2xl {
width: 50%;
}

.print-w-5-8-2xl {
width: calc(100% / 8 * 5);
}

.print-w-6-8-2xl {
width: 75%;
}

.print-w-7-8-2xl {
width: calc(100% / 8 * 7);
}

.print-w-8-8-2xl {
width: 100%;
}
}
}

3xl styles​

width/3xl/print-width-8.css
/* =========================================================================== *\
Width 8's
\* =========================================================================== */
@media (--m-3xl) {
@media print {
.print-w-1-8-3xl {
width: calc(100% / 8);
}

.print-w-2-8-3xl {
width: 25%;
}

.print-w-3-8-3xl {
width: calc(100% / 8 * 3);
}

.print-w-4-8-3xl {
width: 50%;
}

.print-w-5-8-3xl {
width: calc(100% / 8 * 5);
}

.print-w-6-8-3xl {
width: 75%;
}

.print-w-7-8-3xl {
width: calc(100% / 8 * 7);
}

.print-w-8-8-3xl {
width: 100%;
}
}
}

4xl styles​

width/4xl/print-width-8.css
/* =========================================================================== *\
Width 8's
\* =========================================================================== */
@media (--m-4xl) {
@media print {
.print-w-1-8-4xl {
width: calc(100% / 8);
}

.print-w-2-8-4xl {
width: 25%;
}

.print-w-3-8-4xl {
width: calc(100% / 8 * 3);
}

.print-w-4-8-4xl {
width: 50%;
}

.print-w-5-8-4xl {
width: calc(100% / 8 * 5);
}

.print-w-6-8-4xl {
width: 75%;
}

.print-w-7-8-4xl {
width: calc(100% / 8 * 7);
}

.print-w-8-8-4xl {
width: 100%;
}
}
}

5xl styles​

width/5xl/print-width-8.css
/* =========================================================================== *\
Width 8's
\* =========================================================================== */
@media (--m-5xl) {
@media print {
.print-w-1-8-5xl {
width: calc(100% / 8);
}

.print-w-2-8-5xl {
width: 25%;
}

.print-w-3-8-5xl {
width: calc(100% / 8 * 3);
}

.print-w-4-8-5xl {
width: 50%;
}

.print-w-5-8-5xl {
width: calc(100% / 8 * 5);
}

.print-w-6-8-5xl {
width: 75%;
}

.print-w-7-8-5xl {
width: calc(100% / 8 * 7);
}

.print-w-8-8-5xl {
width: 100%;
}
}
}