Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@supports CSS Feature Queries not working #632

Open
meltajon opened this issue Apr 3, 2017 · 3 comments
Open

@supports CSS Feature Queries not working #632

meltajon opened this issue Apr 3, 2017 · 3 comments

Comments

@meltajon
Copy link

meltajon commented Apr 3, 2017

When trying to use @supports, the output is nothing. For example:

@supports (display: grid) {
     // code that will only run if CSS Grid is supported by the browser
    display: grid;
 }

The output is simply null.

I'm guessing it's trying to treat @supports as a variable instead of literally, like @media.

@thokaro
Copy link

thokaro commented Jun 6, 2018

Is there no solution?

@WORX-Developer
Copy link

This is really a big issue.
Is there any solution yet?

@tmolitor-stud-tu
Copy link

You can simply add supports to the list of block directives, but note: you can not use any variables or other lesscss functions inside the supports expression (but of course you can use those in the body of the supports rule).

 	static protected $supressDivisionProps =
 		array('/border-radius$/i', '/^font$/i');
 
-	protected $blockDirectives = array("font-face", "keyframes", "page", "-moz-document");
+	protected $blockDirectives = array("font-face", "keyframes", "page", "-moz-document", "supports");
 	protected $lineDirectives = array("charset");
 
 	/**

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants