Codify domintro
@domenic points out that HTML and other specs have a class="domintro" element at the top of many sections that includes a description of the purpose of the entity defined in that section.
The style used in those specs says the element is "for web developers", but it's also helpful for implementers and other spec-writers trying to figure out 1) whether we're reading the right algorithm, and 2) whether the algorithm correctly implements its intent.
Bikeshed should at least include domintro in the set of non-normative class names. Bikeshed could also include the default style until that migrates to tr-design. There may be other help Bikeshed could provide to get these sections written well.
So far I think only WHATWG specs use that particular class, so rather than building it in, I've added a new Informative Classes metadata that WHATWG can add to its defaults boilerplate, to mark domintro as an informative class.
@domenic Do you want me to go ahead and add it to WHATWG's metadata?
IDB uses domintro too: https://github.com/w3c/IndexedDB/blob/7b7362334eda06747b5c8130479591710ce367e1/index.bs#L2007
And DOM P & S: https://github.com/w3c/DOM-Parsing/blob/ba763b4d81a5a1fb5ec37deebf93659d853850e7/index.html#L223 (although it's written in ReSpec)
And I'd like to start using it in UIEvents and other web platform specs.
@tabatkins that would be great, thank you!
Reopening to consider pulling in some reasonable default styling for .domintro
It's also used in at least https://wicg.github.io/close-watcher/, https://wicg.github.io/navigation-api/, and https://wicg.github.io/scheduling-apis/ now, with styling cobbled together from bits of the WHATWG stylesheet. I'm suggesting another use in https://wicg.github.io/turtledove/, and it'd be nice not to have to propagate the styles yet again. Want a PR with just
.domintro {
position: relative;
color: green;
background: #DDFFDD;
margin: 2.5em 0 2em 0;
padding: 1.5em 1em 0.5em 2em;
}
.domintro dt, .domintro dt * {
color: black;
font-size: inherit;
}
.domintro dd {
margin: 0.5em 0 1em 2em; padding: 0;
}
.domintro dd p {
margin: 0.5em 0;
}
.domintro::before {
content: 'For web developers (non-normative)';
background: green;
color: white;
padding: 0.15em 0.25em;
font-style: normal;
position: absolute;
top: -0.8em;
left: -0.8em;
}
?
90652a820d408493d429e471a35a9c4a628d9f60 made this not just a patch to https://github.com/speced/bikeshed-boilerplate/blob/main/boilerplate/stylesheet.include. Should we be pushing https://github.com/w3c/tr-design/ to incorporate the domintro style, or should bikeshed regain a way to add to the W3C styles?
Yeah, we should probably ping tr-design for this.
Pinged.