To prevent CSS collisions, all selectors used by LiveKit Components (classes, CSS variables, and custom data attributes) are prefixed. This prefixing is handled automatically via PostCSS plugins during the build step.
When writing or inspecting styles, you should be aware of how the prefix (e.g., lk) is applied to various elements:
- Classes:
.button becomes .lk-button - CSS Variables:
--border-color becomes --lk-border-color - Variable usage:
var(--fg) becomes var(--lk-fg) - Data Attributes:
[data-active='false'] becomes [data-lk-active='false'] - Pseudo-selectors with attributes:
&[data-muted='true'] becomes &[data-lk-muted='true']
Note: The attr() function is currently not supported for prefixing (e.g., attr(data-participant-name) remains unchanged and does not become attr(data-lk-participant-name)).