MicrosoftEdge / MicrosoftEdge/MSEdgeExplainers
[Local References In <link> Tags] Explainer introduction section misstates current styling preferences of elements
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 1.4k
- Forks
- 286
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 8
Description
The explainer includes this section in the introduction:
The current preferred approach for styling elements under a Shadow DOM is through
<link>tags, but these tags have several downsides, namely that they must be an external file or a dataURI. The performance of an external file and developer ergonomics of generating a dataURI make both of these options difficult to use. Because of that, developers using Custom Elements have expressed strong interest in addressing these issues.
I think this is pretty inaccurate. I believe the vast majority of elements in the wild use adoptedStyleSheets to style their shadow roots. <link> tags are impractical for most reusable components because they do not control the URL space that the link's href would point into - that's an app concern.
Any cross-shadow style sharing proposal that doesn't work for adoptedStyleSheets will also be as impractical.
I wonder where the claim that the current preferred approach is <link> tags comes from? Was there any survey of elements to back this up? I know of many web components projects and can't remember seeing a link tag used in that way. If you kept this section, could you point to any real world examples?
I think the section would be more accurately stated something like:
The current preferred approach for styling elements under a Shadow DOM is through
adoptedStyleSheets, butadoptedStyleSheetsdo not have a serialized form in HTML. Because of that, developers using Custom Elements have expressed strong interest in addressing these issues.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the quoted introduction section in the relevant explainer and compare its claim about styling Shadow DOM elements with the issue's discussion of adoptedStyleSheets and link tags. Update the section to accurately describe the current approach and the lack of a serialized HTML form, then verify that the surrounding explanation remains consistent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html
- Domain
- documentation, web-dev
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100