Side navigation
#10877 closed feature (fixed)
Opened November 23, 2011 06:51PM UTC
Closed May 21, 2012 05:46PM UTC
Last modified March 30, 2014 10:19AM UTC
Make outerWidth/Height a setter
Reported by: | jzaefferer | Owned by: | mikesherov |
---|---|---|---|
Priority: | low | Milestone: | 1.8 |
Component: | dimensions | Version: | 1.7.1 |
Keywords: | Cc: | scottgonzalez | |
Blocked by: | Blocking: |
Description
The math required by the regular boxmodel leaves it traces in a lot of places where we need to set the width or height of an element that has border, padding or margin.
jQuery UI currently extends inner/outer/Width/Height as setters, but we only use the outerXxx methods: https://github.com/jquery/jquery-ui/blob/master/ui/jquery.ui.core.js#L132-L174
By actually integrating that in core, the require code would obviously be a lot less. For consistency it might make sense to make both outerXxx and innerXxx a setter, but really only outer is important.
Attachments (0)
Change History (20)
Changed November 23, 2011 06:52PM UTC by comment:1
cc: | → scott.gonzalez |
---|
Changed November 23, 2011 07:08PM UTC by comment:2
component: | unfiled → dimensions |
---|---|
keywords: | → 1.8-discuss |
status: | new → open |
type: | enhancement → feature |
version: | git → 1.7.1 |
Changed December 13, 2011 02:45PM UTC by comment:4
description: | The math required by the regular boxmodel leaves it traces in a lot of places where we need to set the width or height of an element that has border, padding or margin. \ \ jQuery UI currently extends inner/outer/Width/Height as setters, but we only use the outerXxx methods: https://github.com/jquery/jquery-ui/blob/master/ui/jquery.ui.core.js#L132-L174 \ \ By actually integrating that in core, the require code would obviously be a lot less. For consistency it might make sense to make both outerXxx and innerXxx a setter, but really only outer is important. → The math required by the regular boxmodel leaves it traces in a lot of places where we need to set the width or height of an element that has border, padding or margin.\ \ jQuery UI currently extends inner/outer/Width/Height as setters, but we only use the outerXxx methods: https://github.com/jquery/jquery-ui/blob/master/ui/jquery.ui.core.js#L132-L174\ \ By actually integrating that in core, the require code would obviously be a lot less. For consistency it might make sense to make both outerXxx and innerXxx a setter, but really only outer is important. |
---|
+1
Changed December 13, 2011 04:24PM UTC by comment:5
+0, Not sure here, what the cost in size?
Changed December 13, 2011 05:27PM UTC by comment:6
description: | The math required by the regular boxmodel leaves it traces in a lot of places where we need to set the width or height of an element that has border, padding or margin.\ \ jQuery UI currently extends inner/outer/Width/Height as setters, but we only use the outerXxx methods: https://github.com/jquery/jquery-ui/blob/master/ui/jquery.ui.core.js#L132-L174\ \ By actually integrating that in core, the require code would obviously be a lot less. For consistency it might make sense to make both outerXxx and innerXxx a setter, but really only outer is important. → The math required by the regular boxmodel leaves it traces in a lot of places where we need to set the width or height of an element that has border, padding or margin. \ \ jQuery UI currently extends inner/outer/Width/Height as setters, but we only use the outerXxx methods: https://github.com/jquery/jquery-ui/blob/master/ui/jquery.ui.core.js#L132-L174 \ \ By actually integrating that in core, the require code would obviously be a lot less. For consistency it might make sense to make both outerXxx and innerXxx a setter, but really only outer is important. |
---|
+1, Yes, but as with everything in 1.8 contingent on final size. This intersects with our box-sizing: border-box
issues as well.
Changed December 14, 2011 01:35PM UTC by comment:7
description: | The math required by the regular boxmodel leaves it traces in a lot of places where we need to set the width or height of an element that has border, padding or margin. \ \ jQuery UI currently extends inner/outer/Width/Height as setters, but we only use the outerXxx methods: https://github.com/jquery/jquery-ui/blob/master/ui/jquery.ui.core.js#L132-L174 \ \ By actually integrating that in core, the require code would obviously be a lot less. For consistency it might make sense to make both outerXxx and innerXxx a setter, but really only outer is important. → The math required by the regular boxmodel leaves it traces in a lot of places where we need to set the width or height of an element that has border, padding or margin.\ \ jQuery UI currently extends inner/outer/Width/Height as setters, but we only use the outerXxx methods: https://github.com/jquery/jquery-ui/blob/master/ui/jquery.ui.core.js#L132-L174\ \ By actually integrating that in core, the require code would obviously be a lot less. For consistency it might make sense to make both outerXxx and innerXxx a setter, but really only outer is important. |
---|
+1, This is something people would expect jQuery to handle, and I'd love to work on this, so yes. Also, we can pretty much just rip the code straight from jquery ui. I do have some concerns though with code paths for hidden elements, but should be fun to implement.
Changed December 14, 2011 04:12PM UTC by comment:8
-1
Changed December 19, 2011 05:35PM UTC by comment:9
description: | The math required by the regular boxmodel leaves it traces in a lot of places where we need to set the width or height of an element that has border, padding or margin.\ \ jQuery UI currently extends inner/outer/Width/Height as setters, but we only use the outerXxx methods: https://github.com/jquery/jquery-ui/blob/master/ui/jquery.ui.core.js#L132-L174\ \ By actually integrating that in core, the require code would obviously be a lot less. For consistency it might make sense to make both outerXxx and innerXxx a setter, but really only outer is important. → The math required by the regular boxmodel leaves it traces in a lot of places where we need to set the width or height of an element that has border, padding or margin. \ \ jQuery UI currently extends inner/outer/Width/Height as setters, but we only use the outerXxx methods: https://github.com/jquery/jquery-ui/blob/master/ui/jquery.ui.core.js#L132-L174 \ \ By actually integrating that in core, the require code would obviously be a lot less. For consistency it might make sense to make both outerXxx and innerXxx a setter, but really only outer is important. |
---|
+1
Changed April 04, 2012 01:15AM UTC by comment:10
owner: | → mikesherov |
---|---|
status: | open → assigned |
Changed April 04, 2012 01:16AM UTC by comment:11
keywords: | 1.8-discuss |
---|---|
milestone: | None → 1.8 |
priority: | undecided → low |
Changed May 05, 2012 11:07PM UTC by comment:12
+1 -- have wondered why this was not done a long time ago
Changed May 19, 2012 06:52PM UTC by comment:13
Changed May 19, 2012 09:05PM UTC by comment:14
I'm still a -1 on this feauture, especially given the added size to core.
Changed May 19, 2012 10:33PM UTC by comment:15
@timmywil, I hear the concern. There are strategies for smaller size that I outlined in the PR. Thoughts?
Changed May 21, 2012 05:46PM UTC by comment:16
resolution: | → fixed |
---|---|
status: | assigned → closed |
Fix #10877. Make outerWidth/Height a setter. Closes gh-783.
Changeset: e0151e5827d7091f311c82d9f951aaaa2688ba8c
Changed August 10, 2012 10:22PM UTC by comment:17
keywords: | → needsdocs |
---|
Changed October 15, 2012 08:02PM UTC by comment:18
keywords: | needsdocs |
---|
Changed March 29, 2014 11:55PM UTC by comment:19
Why is this not documented in http://api.jquery.com/outerWidth/ and http://api.jquery.com/outerHeight/ ?
Changed March 30, 2014 10:19AM UTC by comment:20
API docs ticket is still open: https://github.com/jquery/api.jquery.com/issues/98