Re: [csswg-drafts] [cssom] Resolved value for width et al should be computed value for display:contents

FYI, the relevant Gecko code is:
https://hg.mozilla.org/mozilla-central/annotate/8a494adbc5cc/layout/style/nsComputedDOMStyle.cpp#l4863

So, yes, when the element doesn't have a box, or is a non-replaced or 
SVG inline,
then 'calcWidth' is false and we use the else-branch on line 4887, 
which uses
the computed values.  But note that min-/max-* are used as well, so it
 seems to be
a little more than just "use the computed 'width' value".

A few examples:
`data:text/html,<div style="display:none; min-width:10px">`
I get a resolved 'width' of 1293px (the content-width of the implicit 
<body>)
`data:text/html,<div style="display:none; max-width:10px">`
results in width = 'auto'
`data:text/html,<div style="display:none; width:20px; 
max-width:10px">`
width = 10px
`data:text/html,<div style="display:none; min-width:20px; 
max-width:10px;">`
width = 'auto'
`data:text/html,<div style="display:none; width:0; min-width:20px; 
max-width:10px;">`
width = 20px

What do other UAs do in these cases?

-- 
GitHub Notification of comment by MatsPalmgren
Please view or discuss this issue at 
https://github.com/w3c/csswg-drafts/issues/482#issuecomment-247109034 
using your GitHub account

Received on Wednesday, 14 September 2016 18:24:48 UTC