Element highlighting shows non existing margin for divs with limited width. To reproduce inspect red square in the example attached.
Created attachment 111287 [details] example of the error
Yah, I was confused by this the other day. The issue is that, as a display:block, the rest of the line is is displayed with the "margin" color but it isn't really a margin. I don't know the technical term for this region.
This could just be called block probably.
Antti just pointed me to: http://www.w3.org/TR/CSS21/visudet.html#blockwidth > The following constraints must hold among the used values of the other properties: > > 'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' + 'margin-right' = width of containing block > > If 'width' is not 'auto' and 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' > (plus any of 'margin-left' or 'margin-right' that are not 'auto') is larger than the width of the containing block, > then any 'auto' values for 'margin-left' or 'margin-right' are, for the following rules, treated as zero. > > If all of the above have a computed value other than 'auto', the values are said to be "over-constrained" and one of > the used values will have to be different from its computed value. If the 'direction' property of the containing block > has the value 'ltr', the specified value of 'margin-right' is ignored and the value is calculated so as to make the > equality true. If the value of 'direction' is 'rtl', this happens to 'margin-left' instead. Seems like in this case that really is the margin.
Great. We should have correct values in Metrics pane and Computed Style section then. Renaming the bug.
<rdar://problem/19281516>
<rdar://problem/19281650>