✨ For this demo utility classes are generated only for padding. But the possibilities are endless; using this demo you can extend it even further as much as you want.
👨💻 The classes are named using the format {property}{sides}-{size}
for default (xs) and {property}{sides}-{breakpoint}-{size}
for sm, md, lg, xl, and xxl.
To enable responsive utility just put "responsive": true
for that particular property.
e.g. The classes are, .p-5
, .p-sm-5
, .p-md-5
, .p-lg-5
, p-xl-5
, .p-xxl-5
and so on.
Classes follow a 5-grid structure.
.p-* = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,.... and etc.
* = 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50 in 'px'
Generates mobile first media queries from xs
to xxl
, so you dont have to write explicitly @media (min-width: 768px) { .... }
instead you just include mixins like this @include breakpoint-min(lg) { ... }
$breakpoints: ( xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px, xxl: 1400px, );
✨ The idea of fluid typography has been around in application development for a while, but to make this work in the browser, developers had to use a variety of solutions.
👨💻 Depending on the viewport width, fluid typography adjusts nicely between the minimum and maximum value. Typically, it starts at a minimum value and stays constant until a certain screen width point, at which time it starts to rise. When it hits a maximum value at a different screen width, it keeps going with that maximum value.
👨🏫 For instance, if we wanted our font size to be between 2em and 3em, where 2em is the minimum size at the smallest viewport width of 320px and 3em is the maximum size at the highest viewport width of 1366px. Then our equation will look like this -
font-size: calc(2em + 1 * (100vw - 320px) / 1046);
@media (min-width: 1366px){
.fluid-h2 {
font-size: 3em;
}
}
@media (min-width: 320px){
.fluid-h2 {
font-size: calc(2em + 1 * (100vw - 320px) / 1046);
}
}
.fuild-h2 {
font-size: 2em;
font-weight: 600;
line-height: 1.21;
}