1

The @layer CSS at-rule declares a cascade layer. Rules within a cascade layer cascade together, giving more control over the cascade to web developers.

@layer utilities {
  .padding-sm {
    padding: .5rem;
  }

  .padding-lg {
    padding: .8rem;
  }
}

I can use @layer in Codepen and it works fine. But I do I get it to work on VSCode?

andreban
  • 4,621
  • 1
  • 20
  • 49
makazoid
  • 29
  • 6
  • 2
    It's experimental feature that is not supported by any browser, so no wonder other tools does not support it too. – Justinas Feb 09 '22 at 10:25
  • @Justinas I understand that but there are browsers like Chrome Canary that do. I'm trying to figure out how I can try out this feature while wanting to coding in VSCode instead of Codepen. – makazoid Feb 09 '22 at 12:44
  • 1
    Write plugin for VSCode – Justinas Feb 09 '22 at 12:50
  • 2
    @Justinas It was already supported by Firefox 97 released the day before your comment (February 8). It is also now supported in Chrome 99 released yesterday (March 1). – Jim Mar 02 '22 at 14:30

0 Answers0