Set shortcuts with the same name as the class
NicolaSpadari opened this issue · comments
Nicola Spadari commented
Just started using unocss in a nuxt project, I'm migrating my apply
classes to unocss shortcuts
, and I'd like the container to be centered by default, like bootstrap does
My issue:
shortcuts: [
// ...
["container", "container mx-auto"],
// ...
],
This doesn't work, the container still doesn't have the margin properties, it's intended or it's a bug?
For now I'm using another class, like .box
for the alias.
Anthony Fu commented
This causes a circular reference and naming collision. It just won't work.
If you want to extend some utils, you could simply add
.container {
@apply mx-auto;
}
in your CSS.