- From: Oriol Brufau via GitHub <noreply@w3.org>
- Date: Mon, 30 Jun 2025 21:46:47 +0000
- To: public-css-archive@w3.org
Loirooriol has just created a new issue for https://github.com/w3c/csswg-drafts: == [values][quirks] Should `calc()` be affected by percentage height calculation quirk? == https://quirks.spec.whatwg.org/#the-percentage-height-calculation-quirk > In [quirks mode](https://dom.spec.whatwg.org/#concept-document-quirks), for the purpose of calculating the [height](https://drafts.csswg.org/css-sizing-3/#propdef-height) of an element element, if [...] the specified value for the [height](https://drafts.csswg.org/css-sizing-3/#propdef-height) property of element is a [`<percentage>`](https://drafts.csswg.org/css-values-4/#percentage-value) [...] the [containing block](https://drafts.csswg.org/css-display-4/#containing-block) of element must be calculated using the following algorithm It mentions `<percentage>`, but suspect this was written with CSS2 in mind. What should happen with a `calc()` that mixes a length and a percentage? Browsers don't agree: Blink and WebKit keep applying the quirk, while Firefox does not. I think I prefer the Blink/WebKit behavior, it seems more self-consistent. ```html <!-- quirks --> <div style="height: calc(50% + 10px); background: cyan">foo</div> ``` Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12420 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Monday, 30 June 2025 21:46:48 UTC