In 2008 our team investigated GWT - a technology for writing web components for Javascript in Java which would compile down.
A new member of the team said:
You will have a problem with the CSS of the component and the page clashing with each other.
It turned out he was correct.
I was having a conversation with a friend today about Web Components. I asked him how you stop the CSS of the page and the components clashing with each other.
He said:
With Web Components and the Shadow DOM it is all under control. It solves the problem of leaky CSS.
My question is: How do Web Components and the Shadow DOM prevent leaky CSS across components?