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