I import the following file into my sidebar link.
.container
display: block
border-radius: 15pt
cursor: pointer
padding: 10pt 10pt 10pt 10pt
margin: 5pt
background: red
color: white
&.active
background-color: purple
basically, it should be red when not selected, purple otherwise. But this doesn't work, because .container and .active will be mangled:
._container_gvhok_1 {
display: block;
border-radius: 15pt;
cursor: pointer;
padding: 10pt 10pt 10pt 10pt;
margin: 5pt;
background: red;
color: white;
}
._container_gvhok_1._active_gvhok_10 {
background-color: purple;
color: white;
}
I want container to be mangled, but not active. How can I achieve that?
.container
display: block
border-radius: 15pt
cursor: pointer
padding: 10pt 10pt 10pt 10pt
margin: 5pt
color: white
&:global(.active)
background-color: navy
figured it out. :global prevents mangling (& position matters!!!)