Sizing
The Sizing Utilities provide px / rem-based and responsive sizing options to extend Bootstrap's sizing utilities . These classes let you control width, height, or square dimensions with pixel precision, while also adapting responsively to screen sizes.
All classes use the al- prefix and follow utility-first conventions.
Overview
| Utility Type | Class Format | Description |
|---|---|---|
| Fixed Width | .al-w-{value} | Set width using rem |
| Fixed Height | .al-h-{value} | Set height using rem |
| Max Width | .al-mw-{value} | Set max-width using % |
| Max Height | .al-mh-{value} | Set max-height using % |
| Fixed Size | .al-size-{value} | Set width, height, and min-width in rem |
| Responsive Width (%) | .al-w-{breakpoint}-{value} | Set % width at breakpoints |
| Responsive Height Reset | .al-h-{breakpoint}-auto | Reset height to auto below breakpoint |
Fixed Size
Sass maps
// Values in %
$percentage-sizes: (0: 0%, 10: 10%, 25: 25%, 50: 50%, 75: 75%, 100: 100%);
// values in rem / px
$sizes: (
1: 0.063,
2: 0.125,
3: 0.188,
4: 0.25,
5: 0.313,
6: 0.375,
7: 0.438,
8: 0.5,
9: 0.563,
10: 0.625,
12: 0.75,
16: 1,
18: 1.125,
20: 1.25,
22: 1.375,
24: 1.5,
25: 1.563,
26: 1.625,
28: 1.75,
30: 1.875,
32: 2,
35: 2.188,
36: 2.25,
40: 2.5,
45: 2.813,
48: 3,
50: 3.125,
55: 3.438,
56: 3.5,
60: 3.75,
64: 4,
65: 4.063,
70: 4.375,
75: 4.688,
80: 5,
85: 5.313,
90: 5.625,
95: 5.938,
100: 6.25,
110: 6.875,
120: 7.5,
130: 8.125,
140: 8.75,
150: 9.375,
170: 10.625,
190: 11.875,
200: 12.5,
250: 15.625,
300: 18.75
);
Usage Examples
height: 150px
Responsive Width
Apply percentage width based on breakpoints.
| Breakpoint | Media Query | Prefix |
|---|---|---|
| sm | min-width: 575px | .al-w-sm-{value} |
| md | min-width: 768px | .al-w-md-{value} |
| lg | min-width: 992px | .al-w-lg-{value} |
| xl | min-width: 1200px | .al-w-xl-{value} |
| xxl | min-width: 1400px | .al-w-xxl-{value} |
Sass maps
$percentage-sizes: (
0: 0%,
10: 10%,
25: 25%,
50: 50%,
75: 75%,
100: 100%
);
Usage Examples
Responsive Height Auto
| Class | Applies Below | Result |
|---|---|---|
| .al-h-sm-auto | max-width: 574px | height: auto |
| .al-h-md-auto | max-width: 767px | height: auto |
| .al-h-lg-auto | max-width: 991px | height: auto |
| .al-h-xl-auto | max-width: 1199px | height: auto |
| .al-h-xxl-auto | max-width: 1399px | height: auto |
Usage Examples
Developer Notes
-
$sizes: defines rem values for width, height, and size
-
$width-sizes: defines percentage values for responsive widths
-
$height-reset-breakpoints: used for responsive height:auto
-
All utilities are built using Sass loops for scalability and consistency
-
All utilities use !important for priority over Bootstrap defaults
-
Fully responsive and consistent with Bootstrap's grid system