Skip to main content

Bug Tracker

Side navigation

#11322 closed bug (invalid)

Opened February 10, 2012 06:33PM UTC

Closed February 15, 2012 11:49AM UTC

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/

Attachments (0)
Change History (1)

Changed February 15, 2012 11:49AM UTC by addyosmani comment:1

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/