question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Nested @supports doesn't seem to work

See original GitHub issue

Less:

.foo() {
    font-weight: 300;
    -webkit-font-smoothing: subpixel-antialiased;
    @supports not (-webkit-font-smoothing: subpixel-antialiased) {
        font-weight: 400;
    }
}

html {
    .foo;
}

Generated CSS:

html {
  font-weight: 300;
  -webkit-font-smoothing: subpixel-antialiased;
}
@supports not (-webkit-font-smoothing: subpixel-antialiased) {
  font-weight: 400;
}

Expected CSS:

html {
  font-weight: 300;
  -webkit-font-smoothing: subpixel-antialiased;
}
@supports not (-webkit-font-smoothing: subpixel-antialiased) {
  html {
    font-weight: 400;
  }
}

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Reactions:1
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
nilssolankicommented, Feb 6, 2018

Workaround for people stuck on older versions of less:

Use the @supports directive outside of all your code. E.g.:

@supports not (-webkit-font-smoothing: subpixel-antialiased) {
  html {
    font-weight: 400;
  }
}
0reactions
SomMericommented, Sep 17, 2014

Related to #2104

Read more comments on GitHub >

github_iconTop Results From Across the Web

Doesn't seem to work in Nested Forms - WordPress.org
Anyone else having this problem? maybe because I have a lot of Address fields, I get a console error with nested form field...
Read more >
Why are nested functions not supported by the C standard?
This is because nested function definitions don't have access to the local variables of the surrounding block -- only to the globals of...
Read more >
Can't connect Nest thermostat to the app - Google Support
Can't connect Nest thermostat to the app · 1. Make sure your internet service is working · 2. Check your app version ·...
Read more >
Runner: Data load from CSV doesn't seem to work with nested ...
I'm working with a few API calls that use nested elements in their bodies -- i.e. in this sort of shape: { "parent"...
Read more >
CSS Nesting Module - W3C
Abstract. This module introduces the ability to nest one style rule inside another, with the selector of the child rule relative to the ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found