Without encapsulation, any script injected into a page shares one global CSS namespace. A site rule like a wildcard box-sizing reset or a broad button style leaks into the embedded component, and the component's own CSS can just as easily leak out and break the host site. Developers historically worked around this with iframes or defensive class prefixing, both of which have real costs.
Attaching a shadow root solves it at the platform level. CSS defined inside applies only inside, page selectors cannot reach in, and only explicitly inherited properties and CSS custom properties cross the boundary, which makes controlled theming possible without giving up isolation.
This is why Clerkzo renders its chat widget inside a Shadow DOM. A single script tag can be dropped onto any site, however its CSS is written, and the widget will look the way it should without altering the page around it.
Related terms
Browse all 142 terms- Document Object Model (DOM)The Document Object Model, or DOM, is the structured map a browser builds of your web page after loading it. Code can read and change that map, which is how anything on a page moves, updates or responds to a click.
- System promptA system prompt is the set of instructions supplied to a language model ahead of a conversation, defining its role, scope, tone and rules. It is not visible to the end user but shapes every response the model produces.
- AI agentAn AI agent is a software system that uses a language model to work towards a goal by deciding what to do next, calling tools or APIs, and acting on the results. It goes beyond generating text to taking actions in a loop until the task is done.
- Conversion rate optimization (CRO)Conversion rate optimization (CRO) is the systematic practice of increasing the percentage of website visitors who complete a desired action, such as submitting a form, booking a call, or making a purchase. It combines behavioural research, hypothesis-driven changes, and measurement to improve results from existing traffic rather than buying more of it.