There are no tracking or monitoring cookies on this site. There are only cookies used for documentation examples related to cookies.
Close

Processing...
This may take a few seconds.

if-media-min-width

Syntax

if-media-min-width: (width)px;

This conditional action will return true if the page has a minimum width as specified. You would use this for responsive websites to only run certain commands when the screen had a certain width. For example, you might have a menu with different actions to run when displayed on a mobile or desktop.

width = The minimum width of the page to check, including "px" if applicable.

For example, this will return true if the page has a minimum width of 721px:

@conditional largeDevice {
    if-media-min-width: 721px;
}

Note: This command is shorthand for window.matchMedia('all and (min-width: xx)').

if-media-min-width