Bridger Zoske

Q&A

Answers

  • December 18, 2019 at 7:32 PM
  • Visible to group members and anyone with the link
1. ::part() css pseudo-element is useful for 'allowing shadow hosts to selectively expose chosen elements from their shadow tree to the outside page for styling purposes.' The tab example here (https://developer.mozilla.org/en-US/docs/Web/CSS/::part) is a perfect situation for ::part().

2. connectedCallback is invoked each time the custom element is appended into a document-connected element so its useful when initializing. 

3. Shadow DOM is used primarily to modularize styling.  

4. S
hadowRoot.

5. <slot>  can be used to dynamically add html.