Answer the question
In order to leave comments, you need to log in
How to not apply a style file to a specific block using javascript?
Friends, tell me, I'm not strong in javascript, is it possible to make sure that a style file is not applied to a specific block on the site? For example, there is a style file app.css, there is a block, for example, with id="widget". How to write using javascript that the app.css file was not used for the widget block? If this is even real.
Answer the question
In order to leave comments, you need to log in
Try connecting the external block with styles as a web component. You can read more about them here -
https://learn.javascript.ru/webcomponents In particular, pay attention to the Shadow DOM, which allows you to encapsulate the styles of an element so that it does not depend on global styles.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question