if-max-height
Syntax
if-max-height: (element) integer;
This conditional action will return true if the chosen selector has a maximum display height of the specified value. This is useful if you need to set a class based on an element's height.
element = Selector reference to a specific element.
integer = The maximum height of the element. This can include the "px" or it can be left out.
For example, this will return true if the element #myInput has a height less than 400px.
@conditional ifSmallDiv {
if-max-height: #myDiv 400px;
}
When used on an event selector with no element in parentheses, it will default to checking "self". Eg. #myDiv:if-max-height(400px): ...
Note: Internally this uses the element.getBoundingClientRect() JavaScript method of fetching the height of the element.