if-display
Syntax
if-display: selector;
This conditional action will return true if the selector does not have a css display property of "none".
selector = The selector you want to check. This can be any valid CSS selector that will return one result. If more than one result is gotten from the selector, the first one will be chosen.
For example, this will return true if the element #myDiv is does not have a css display property of "none".
@conditional myDivOnScreen {
if-display: #myDiv;
}
When used on an event selector with no parameters in parentheses, it will default to checking "self". Eg. #myDiv:if-display: ...
Note: This command uses the window.getComputedStyle function internally. For more information on this, see here:
https://developer.mozilla.org/en-US/docs/Web/API/Window/getComputedStyle