Answer the question
In order to leave comments, you need to log in
How to prevent global styles from being overridden by styles from v-html?
Hey!
I'm working on displaying messages from ebay. They come as html, which I put in the v-html directive.
Some of them contain styles that conflict with the global ones - either padding will appear on the body, or some kind of margin. From some letters, the whole layout can break down. I have not come across this before, and if I output html, then it is "checked". There is also no way to sanitize the received data, you need to display it as it is. But how can content be encapsulated?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question