whatwg / html

HTML Standard
https://html.spec.whatwg.org/multipage/
Other
8.09k stars 2.66k forks source link

Specify where text baseline is for form controls / widgets #5065

Open zcorpan opened 4 years ago

zcorpan commented 4 years ago

In https://github.com/whatwg/html/issues/4082#issuecomment-550356936 @MatsPalmgren wrote

I added three more columns that check each of the existing cases but with -webkit-appearance:none. [...] Chrome also synthesizes the baseline differently depending on that property for type=checkbox for example (content-box vs margin-box).

It's also worth noting that the baseline is different for some of these controls. For example, type=color uses the content-box edges, whereas type=range use the margin-box edges in Firefox but the border-box edges in Chrome. We need to agree on these baselines and specify them somewhere.

Firefox and Safari also has different baseline for radio and checkbox depending on -webkit-appearance.

zcorpan commented 4 years ago

The test in https://github.com/web-platform-tests/wpt/pull/20306 has a comment that could be used as a starting point for specifying this.

bfgeek commented 5 months ago

This also needs to specify how baselines are synthesized in an inline context. My default baselines are synthesized off the margin box.

I did some basic testing here: https://github.com/web-platform-tests/wpt/issues/45889#issue-2262046512

But TL;DR: