Bug Tracker

Opened 8 years ago

Closed 8 years ago

#11322 closed bug (invalid)

outer[Height/Width](true) improperly including negative margins

Reported by: whitters Owned by:
Priority: low Milestone: None
Component: css Version: 1.7.1
Keywords: Cc:
Blocked by: Blocking:

Description

I'm not sure this is actually a bug, because it depends on how you want height and width to be defined, and how margins affect those lengths.

This is problematic when the full outer height of an element is needed, but one of the margins is negative. The negative margin does not always affect the actual dimension of the element.

Here is a quick and dirty jsFiddle to demonstrate the values. http://jsfiddle.net/wxxSQ/

Change History (1)

comment:1 Changed 8 years ago by addyosmani

Component: unfiledcss
Priority: undecidedlow
Resolution: invalid
Status: newclosed

I've looked through your test case and I honestly don't feel like this is a bug. Should you need to handle full outer heights with a negative margin where you want custom behaviour to affect the actual element's dimensions, a cssHook could probably be used to handle your case. http://api.jquery.com/jQuery.cssHooks/

Note: See TracTickets for help on using tickets.