Open hackwaly opened 2 years ago
I think this is a good idea too. What do you think about doing something similar to what we do with @media rules, and supporting the native API? Eg.
const class = css`
@layer component {
border-radius: 8px;
}
`;
I think this is a good idea too. What do you think about doing something similar to what we do with @media rules, and supporting the native API? Eg.
const class = css` @layer component { border-radius: 8px; } `;
I think the native syntax is better.
Describe the enhancement
Inspired from https://github.com/unocss/unocss#layers
linaria.config.js
Add optional options argument which can be used to pass
layer
option tocss
function.Output rules with care of layers order, except that in development environment could just simply rely on browser's native css layers feature.
Motivation
The
cx
function of@linaria/atomic
has high runtime overhead.Possible implementations
Related Issues