bikeshed icon indicating copy to clipboard operation
bikeshed copied to clipboard

Codify domintro

Open jyasskin opened this issue 7 years ago • 10 comments

@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.

jyasskin avatar Apr 10 '18 23:04 jyasskin

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?

tabatkins avatar May 04 '18 22:05 tabatkins

IDB uses domintro too: https://github.com/w3c/IndexedDB/blob/7b7362334eda06747b5c8130479591710ce367e1/index.bs#L2007

xfq avatar May 05 '18 02:05 xfq

And DOM P & S: https://github.com/w3c/DOM-Parsing/blob/ba763b4d81a5a1fb5ec37deebf93659d853850e7/index.html#L223 (although it's written in ReSpec)

xfq avatar May 05 '18 02:05 xfq

And I'd like to start using it in UIEvents and other web platform specs.

garykac avatar May 06 '18 19:05 garykac

@tabatkins that would be great, thank you!

domenic avatar May 07 '18 19:05 domenic

Reopening to consider pulling in some reasonable default styling for .domintro

tabatkins avatar May 15 '18 23:05 tabatkins

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;
}

?

jyasskin avatar Sep 27 '22 21:09 jyasskin

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?

jyasskin avatar May 23 '23 20:05 jyasskin

Yeah, we should probably ping tr-design for this.

tabatkins avatar May 23 '23 23:05 tabatkins

Pinged.

jyasskin avatar May 24 '23 00:05 jyasskin