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?

1 Answer 1


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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .