[csswg-drafts] [css-overflow] [css2?] Baseline of an inline-block with overflow:clip. (#6212)

emilio has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-overflow] [css2?] Baseline of an inline-block with overflow:clip. ==
Blink and Gecko differ on what baseline should an element with `display: inline-block` and `overflow: clip`.

Example ([live](http://software.hixie.ch/utilities/js/live-dom-viewer/saved/9184)):

```html
<!doctype html>

Clip:
<br>
<div style="border:1px solid red; display:inline-block">
  <div style="overflow:clip; width:10px; height:10px; background:blue; display:inline-block;">Hallo Welt</div>
</div>

<br>
Visible:
<br>
<div style="border:1px solid red; display:inline-block">
  <div style="width:10px; height:10px; background:blue; display:inline-block;">Hallo Welt</div>
</div>
<br>
Hidden:
<br>
<div style="border:1px solid red; display:inline-block">
  <div style="overflow:hidden; width:10px; height:10px; background:blue; display:inline-block;">Hallo Welt</div>
</div>
```

@bfgeek pointed out that CSS2.1 has:

>  The baseline of an 'inline-block' is the baseline of its last line box in the normal flow, unless it has either no in-flow line boxes or if its 'overflow' property has a computed value other than 'visible', in which case the baseline is the bottom margin edge.

However CSS2 was written before `overflow: clip` was a thing. I intuitively expect `overflow: clip` to behave like `overflow: visible` here (because it's not an scrollable box), but I could see the argument the other way around. Thoughts?

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6212 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 14 April 2021 17:07:38 UTC