Closed
Bug 816679
Opened 12 years ago
Closed 12 years ago
Percentage max height ignored if parent has auto height but percentage max-height and grandparent has fixed height
Categories
(Core :: Layout, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: scottl-mozbugzills, Unassigned)
References
Details
Attachments
(1 file)
1.13 MB,
image/png
|
Details |
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.16 (KHTML, like Gecko) Chrome/24.0.1297.0 Safari/537.16 Steps to reproduce: Reduced case: http://sample.scott.to/ffbug.html Actual results: The img seems not to respect the size of the container if that size is derived via max-height. Expected results: Webkit's behavior is more inline with what I expected, but hey they seem to be the only ones that feel that way.
Reporter | ||
Updated•12 years ago
|
OS: Linux → Windows XP
Updated•12 years ago
|
Component: Untriaged → Layout
Product: Firefox → Core
Comment 1•12 years ago
|
||
That's because the spec says to do what we do...
Comment 2•12 years ago
|
||
Though it's hard to tell what behavior the testcase is expecting, exactly. Especially given that it has no actual image...
Comment 3•12 years ago
|
||
Arghh, looks like Firefox is correctly implementing a lousy spec. http://www.w3.org/TR/CSS21/visudet.html#min-max-heights "percentage Specifies a percentage for determining the used value. The percentage is calculated with respect to the height of the generated box's containing block. If the height of the containing block is not specified explicitly (i.e., it depends on content height), and this element is not absolutely positioned, the percentage value is treated as '0' (for 'min-height') or 'none' (for 'max-height')." I suppose I'll go and file a bug with the google and see if that goes anywhere. This is quite disappointing. As a web developer, I expect max-height to more or less the same as does "height", but in this case per the spec -- it just does nothing.
Comment 4•12 years ago
|
||
(In reply to Boris Zbarsky (:bz) from comment #2) > Though it's hard to tell what behavior the testcase is expecting, exactly. > Especially given that it has no actual image... Is the image I attached not suitable? https://bugzilla.mozilla.org/attachment.cgi?id=686750 I was expecting the webkit behavior, but I gather that while it is more logical it is not to the standard.
Comment 5•12 years ago
|
||
Ah, I missed that. Yeah, that's just what the spec says.
Status: UNCONFIRMED → RESOLVED
Closed: 12 years ago
Resolution: --- → INVALID
Summary: IMG with max-height does not respect a parent with max-height → Percentage max height ignored if parent has auto height but percentage max-height and grandparent has fixed height
(In reply to Scott Lindsey from comment #3) > This is quite disappointing. As a web developer, I expect max-height to > more or less the same as does "height", but in this case per the spec -- it > just does nothing. How is max-height different from height here?
Comment 7•12 years ago
|
||
Ahh, your right. Neither height nor max-height (by percentage) on the image have any effect if the parent element has a height that was generated automatically.
You need to log in
before you can comment on or make changes to this bug.
Description
•