Skip to main content

Width - sevenths

This provides styles for widths using sevenths.

The following sizes are available:

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

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

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

How to import into your CSS

Import this into your CSS with:

@import 'cacao-css/dist/width/width-7.css';

Imports are available for all media query viewport sizes.

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

See Import Cacao CSS for more information.

Source CSS

Default styles

width/width-7.css
/* =========================================================================== *\
Width 7's
\* =========================================================================== */

.w-1-7 {
width: calc(100% / 7);
}

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

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

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

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

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

.w-7-7 {
width: 100%;
}

3xs styles

width/3xs/width-7.css
/* =========================================================================== *\
Width 7's
\* =========================================================================== */

@media (--m-3xs) {
.w-1-7-3xs {
width: calc(100% / 7);
}

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

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

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

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

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

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

2xs styles

width/2xs/width-7.css
/* =========================================================================== *\
Width 7's
\* =========================================================================== */

@media (--m-2xs) {
.w-1-7-2xs {
width: calc(100% / 7);
}

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

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

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

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

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

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

xs styles

width/xs/width-7.css
/* =========================================================================== *\
Width 7's
\* =========================================================================== */

@media (--m-xs) {
.w-1-7-xs {
width: calc(100% / 7);
}

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

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

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

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

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

.w-7-7-xs {
width: 100%;
}
}

sm styles

width/sm/width-7.css
/* =========================================================================== *\
Width 7's
\* =========================================================================== */

@media (--m-sm) {
.w-1-7-sm {
width: calc(100% / 7);
}

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

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

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

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

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

.w-7-7-sm {
width: 100%;
}
}

md styles

width/md/width-7.css
/* =========================================================================== *\
Width 7's
\* =========================================================================== */

@media (--m-md) {
.w-1-7-md {
width: calc(100% / 7);
}

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

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

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

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

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

.w-7-7-md {
width: 100%;
}
}

lg styles

width/lg/width-7.css
/* =========================================================================== *\
Width 7's
\* =========================================================================== */

@media (--m-lg) {
.w-1-7-lg {
width: calc(100% / 7);
}

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

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

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

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

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

.w-7-7-lg {
width: 100%;
}
}

xl styles

width/xl/width-7.css
/* =========================================================================== *\
Width 7's
\* =========================================================================== */

@media (--m-xl) {
.w-1-7-xl {
width: calc(100% / 7);
}

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

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

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

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

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

.w-7-7-xl {
width: 100%;
}
}

2xl styles

width/2xl/width-7.css
/* =========================================================================== *\
Width 7's
\* =========================================================================== */

@media (--m-2xl) {
.w-1-7-2xl {
width: calc(100% / 7);
}

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

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

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

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

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

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

3xl styles

width/3xl/width-7.css
/* =========================================================================== *\
Width 7's
\* =========================================================================== */

@media (--m-3xl) {
.w-1-7-3xl {
width: calc(100% / 7);
}

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

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

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

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

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

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

4xl styles

width/4xl/width-7.css
/* =========================================================================== *\
Width 7's
\* =========================================================================== */

@media (--m-4xl) {
.w-1-7-4xl {
width: calc(100% / 7);
}

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

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

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

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

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

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

5xl styles

width/5xl/width-7.css
/* =========================================================================== *\
Width 7's
\* =========================================================================== */

@media (--m-5xl) {
.w-1-7-5xl {
width: calc(100% / 7);
}

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

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

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

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

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

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