Skip to main content

Auto height

This provides styles for setting the height of an element to be auto.

The following class is available:

  • h-auto

The height has a class to go with each of the media query viewport sizes. For example:

h-auto-3xs
h-auto-2xs
h-auto-xs
h-auto-sm
h-auto-md
h-auto-lg
h-auto-xl
h-auto-1xl
h-auto-3xl
h-auto-4xl
h-auto-5xl

How to import into your CSS

Import this into your CSS with:

@import 'cacao-css/dist/height/height-auto.css';

Imports are available for all media query viewport sizes.

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

See Import Cacao CSS for more information.

Source CSS

Default styles

height/height-auto.css
/* =========================================================================== *\
Auto height
\* =========================================================================== */

.h-auto {
height: auto;
}

3xs styles

height/3xs/height-auto.css
/* =========================================================================== *\
Auto height
\* =========================================================================== */

@media (--m-3xs) {
.h-auto-3xs {
height: auto;
}
}

2xs styles

height/2xs/height-auto.css
/* =========================================================================== *\
Auto height
\* =========================================================================== */

@media (--m-2xs) {
.h-auto-2xs {
height: auto;
}
}

xs styles

height/xs/height-auto.css
/* =========================================================================== *\
Auto height
\* =========================================================================== */

@media (--m-xs) {
.h-auto-xs {
height: auto;
}
}

sm styles

height/sm/height-auto.css
/* =========================================================================== *\
Auto height
\* =========================================================================== */

@media (--m-sm) {
.h-auto-sm {
height: auto;
}
}

md styles

height/md/height-auto.css
/* =========================================================================== *\
Auto height
\* =========================================================================== */

@media (--m-md) {
.h-auto-md {
height: auto;
}
}

lg styles

height/lg/height-auto.css
/* =========================================================================== *\
Auto height
\* =========================================================================== */

@media (--m-lg) {
.h-auto-lg {
height: auto;
}
}

xl styles

height/xl/height-auto.css
/* =========================================================================== *\
Auto height
\* =========================================================================== */

@media (--m-xl) {
.h-auto-xl {
height: auto;
}
}

2xl styles

height/2xl/height-auto.css
/* =========================================================================== *\
Auto height
\* =========================================================================== */

@media (--m-2xl) {
.h-auto-2xl {
height: auto;
}
}

3xl styles

height/3xl/height-auto.css
/* =========================================================================== *\
Auto height
\* =========================================================================== */

@media (--m-3xl) {
.h-auto-3xl {
height: auto;
}
}

4xl styles

height/4xl/height-auto.css
/* =========================================================================== *\
Auto height
\* =========================================================================== */

@media (--m-4xl) {
.h-auto-4xl {
height: auto;
}
}

5xl styles

height/5xl/height-auto.css
/* =========================================================================== *\
Auto height
\* =========================================================================== */

@media (--m-5xl) {
.h-auto-5xl {
height: auto;
}
}