TEIC/CETEIcean

Styling Shadow DOM elements

hcayless opened this issue · 1 comments

Shadow DOM styles are encapsulated, meaning an anchor tag in shadow DOM inside a <ptr> won't get styled by, say tei-ptr a {} in a document stylesheet, or even by a {}. You have to either inject styles into the Shadow DOM inside a <style> tag, or (via the same mechanism) import the main stylesheet into the Shadow DOM. There are methods for pushing styles from the main CSS down into the Shadow DOM, but these are now deprecated.

We should think about ways to make it easy to inject styles. Possibly just a third element in template arrays containing style directives or imports. Also need to provide examples. #2 is a related issue.

Shadow DOM is deprecated in CETEIcean because of the encapsulation issue—we generally want the page stylesheet to provide styling for custom element content.