1

I have a component called basic, with the following in it's css file (basic.css)

td {
 background: red;
}

The rendered CSS comes out like

td[c-basic_basic]{background: red;}

Is there a way to make the rendered CSS come out like

td{background: red;}

from within that basic.css file?

2

For now, the only way to get literal CSS loaded is to use loadStyle. CSS is not meant to be "broken out of", because that is the design of LWC. You can read more about the Shadow DOM for more information.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.