Closed Bug 777641 Opened 12 years ago Closed 12 years ago

max-width is ignored when using resize and max-width is a percent

Categories

(Core :: Layout, defect)

14 Branch
x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: beatgammit, Unassigned)

Details

Attachments

(1 file)

Attached file index.html
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20100101 Firefox/14.0.1
Build ID: 20120717144008

Steps to reproduce:

I created a basic example using the CSS resize property. My basic example had two divs inside a parent div that was set to display: box. The left inner div was set to resizable: horizontal and had a max-width as a percent. The parent element also had a percent width.


Actual results:

When resizing the resizable element all the way to the edge of the screen, the max-width was ignored and the element went off the screen. When the resizable element was set to a static max-width, the max-width was honored.


Expected results:

The max-width should have been honored, meaning the box should not have been able to be resized beyond it's max width. This is the behavior of fixed width elements, and the behavior should be the same with percent max-widths.

This example works as expected in the current version of Chrome (20.0.1132.57).
Attachment #646052 - Attachment mime type: text/plain → text/html
Component: Untriaged → Layout
Product: Firefox → Core
http://www.w3.org/TR/CSS21/visudet.html#min-max-widths says for the percentage case:

  If the containing block's width depends on this element's width, then the resulting
  layout is undefined in CSS 2.1.

which is what you're running into because you're using XUL boxes.

Note that -moz-box and -webkit-box are completely different things with totally different behaviors, and there is no "box" display type...
Status: UNCONFIRMED → RESOLVED
Closed: 12 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: