-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Description
Currently, the text-spacing-editor tool may have limitations when working with web components that use Shadow DOM in open mode. This feature request is to enhance support for measuring and adjusting text spacing on elements rendered within open Shadow DOM trees.
Problem Statement
Web components using Shadow DOM (especially open mode) provide encapsulation while still allowing external access to the DOM tree. However, text spacing adjustments may not properly cascade or be accessible when elements are contained within Shadow DOM boundaries. This limits the tool's utility for modern web applications that heavily rely on web components.
Proposed Solution
Add native support for:
- Detecting and traversing open Shadow DOM trees
- Applying text spacing adjustments to text nodes within Shadow DOM elements
- Calculating proper spacing metrics that account for Shadow DOM encapsulation
- Ensuring CSS custom properties and inherited styles properly affect Shadow DOM content
Use Cases
- Modern web applications built with web components (e.g., those using Lit, Stencil, or vanilla web components)
- Accessibility tools that need to adjust text spacing across all visible text, including component internals
- Design systems that use Shadow DOM for style encapsulation
Additional Context
Shadow DOM open mode allows external scripts and styles to access and modify the DOM, making it an ideal candidate for enhancement. This would make the tool more compatible with the current web component ecosystem.
Related
If there are any existing issues or discussions about web component support, please link them here.