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.

Media queries

Active CSS supports standard CSS media queries in the config, but you can currently only use them outside event selectors.

There are three ways to use media queries. Remember - you put this in your Active CSS config file, not your CSS file...

The way CSS does it - you can do this in Active CSS:
@media (max-width: 1020px) {
    body:scroll {
        func: requestScroll;
    }
}
Or as an Active CSS conditional function:
body:if-media-max-width(1020px):scroll {
    func: requestScroll;
}
Or as an Active CSS dedicated conditional

You can do this if you need to have more than one conditional function or if you would rather have your condition declared in one place and give it a name:

@conditional smallDevice {
    if-media-max-width: 1020px;
}

body:smallDevice:scroll {
    func: requestScroll;
}

Use any of the above methods as you wish.

See the Conditionals section for more information on using conditionals.