'How to nest @layer components in Tailwind CSS

Does anyone know how to nest @layer components in Tailwind?

I tried to find it in the docs, but doesn't have any examples of it being nested, nor does the video tutorial by Tailwind Labs https://www.youtube.com/watch?v=TrftauE2Vyk

So it is possible this is not doable.

I am trying to be able to do <div class="custom-border"> </div>

Any help or guidance much appreciated :)



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source