Skip to content
This repository was archived by the owner on Aug 22, 2023. It is now read-only.
This repository was archived by the owner on Aug 22, 2023. It is now read-only.

Define variables in media queries? #145

@JamesCoyle

Description

@JamesCoyle

It seems this doesn't work but should according to the spec AFAIK. I read about it here.

@media screen and (max-width: 1280px) {
    :root {
        --total-width: 1000px;
    }
}

The above code should change the value of the --total-width variable if the media query is active. I believe when supported the browser should be able to handle this. To make it work with Myth though it would require pulling every definition where the variable is used up into the media query.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions