Skip to content

Conversation

domenic
Copy link
Member

@domenic domenic commented Jul 19, 2016

@domenic domenic added normative change topic: shadow Relates to shadow trees (as defined in DOM) labels Jul 19, 2016
@annevk annevk merged commit 43c5786 into master Jul 20, 2016
@annevk annevk deleted the shadow-dom-link-stylesheet branch July 20, 2016 07:30
robertknight added a commit to hypothesis/client that referenced this pull request Feb 12, 2021
When Shadow DOM was first considered for use in the client `<link
rel="stylesheet">` was not widely supported as a way to load external styles into
shadow roots. This was resolved in the spec in whatwg/html#1572
and has now long been supported by all browsers.

Using `<link>` simplifies the code and also avoids a possible problem with sites
that have a strict CSP policy that disallows inline styles. In the
browser extension context a `<link>` can still work in that scenario as long as the
stylesheet is loaded from a `chrome-extension://` URL.
robertknight added a commit to hypothesis/client that referenced this pull request Feb 12, 2021
When Shadow DOM was first considered for use in the client `<link
rel="stylesheet">` was not widely supported as a way to load external styles into
shadow roots. This was resolved in the spec in whatwg/html#1572
and has now long been supported by all browsers.

Using `<link>` simplifies the code and also avoids a possible problem with sites
that have a strict CSP policy that disallows inline styles. In the
browser extension context a `<link>` can still work in that scenario as long as the
stylesheet is loaded from a `chrome-extension://` URL.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
normative change topic: link topic: shadow Relates to shadow trees (as defined in DOM)
Development

Successfully merging this pull request may close these issues.

2 participants