During every height-equalization cycle, Hequalizer manages three CSS classes on the elements in the group. These classes let your stylesheets react to the measurement state — showing a transition during calculation, confirming an active equalized height, or handling the edge case of elements that measure as zero-height.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/soyleninjs/hequalizer/llms.txt
Use this file to discover all available pages before exploring further.
Classes are applied per element, not per group. In column mode, each group of elements is calculated independently, so elements in different rows can end up with different classes. For example, if one row’s tallest element is 80 px and another row’s tallest element is 0 px, the first group receives
.height-calculated while the second group receives .height-zero.Class lifecycle
Before every recalculation — whether triggered by init, resize, content change,update(), or refreshElements() — Hequalizer removes all three classes from all tracked elements and clears all tracked CSS variables. After measuring, it applies exactly one of the two outcome classes (.height-calculated or .height-zero) to each element or element group.
Classes reference
.height-calculating
Added to a batch of elements (all elements, or one column group at a time) immediately before their offsetHeight values are read, and removed immediately after the measurement loop finishes for that batch.
The class is present for an extremely short period — just long enough to read layout measurements. Use it to apply a subtle visual transition that smooths the moment when the CSS variable is about to be updated.
.height-calculated
Added after measurement when the calculated maximum height for the element’s group is greater than 0. Indicates that the element currently has an active equalized height applied via the CSS custom property.
Use this class to confirm that equalization is active, or to apply styles that assume the element has a defined height.
.height-zero
Added after measurement when the calculated maximum height for the element’s group equals 0. This happens when all elements in the group are hidden, have no content, or are otherwise unrenderable at the time of calculation.
Use .height-zero to visually hide or specially handle elements whose group has no measurable height.
When
columns is set to 1 or lower, equalization is disabled and the calculation returns early — no state class is applied (neither .height-zero nor .height-calculated). Only _cleanHeightElements() runs to strip any previously set classes and CSS variables.CSS usage examples
State class summary
| Class | Present when | Removed when |
|---|---|---|
.height-calculating | Measurement is in progress for this batch | Measurement loop for the batch finishes |
.height-calculated | Max height > 0 after calculation | Next recalculation begins |
.height-zero | Max height = 0 after calculation | Next recalculation begins |