#10877 closed feature (fixed)
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 (last modified by )
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.
Change History (20)
comment:1 Changed 12 years ago by
Cc: | scott.gonzalez added |
---|
comment:2 Changed 12 years ago by
Component: | unfiled → dimensions |
---|---|
Keywords: | 1.8-discuss added |
Status: | new → open |
Type: | enhancement → feature |
Version: | git → 1.7.1 |
comment:3 Changed 12 years ago by
comment:6 Changed 11 years ago by
Description: | modified (diff) |
---|
+1, Yes, but as with everything in 1.8 contingent on final size. This intersects with our box-sizing: border-box
issues as well.
comment:7 Changed 11 years ago by
Description: | modified (diff) |
---|
+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.
comment:10 Changed 11 years ago by
Owner: | set to mikesherov |
---|---|
Status: | open → assigned |
comment:11 Changed 11 years ago by
Keywords: | 1.8-discuss removed |
---|---|
Milestone: | None → 1.8 |
Priority: | undecided → low |
comment:14 Changed 11 years ago by
I'm still a -1 on this feauture, especially given the added size to core.
comment:15 Changed 11 years ago by
@timmywil, I hear the concern. There are strategies for smaller size that I outlined in the PR. Thoughts?
comment:16 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Fix #10877. Make outerWidth/Height a setter. Closes gh-783.
Changeset: e0151e5827d7091f311c82d9f951aaaa2688ba8c
comment:17 Changed 11 years ago by
Keywords: | needsdocs added |
---|
comment:18 Changed 11 years ago by
Keywords: | needsdocs removed |
---|
comment:19 Changed 9 years ago by
Why is this not documented in http://api.jquery.com/outerWidth/ and http://api.jquery.com/outerHeight/ ?
comment:20 Changed 9 years ago by
API docs ticket is still open: https://github.com/jquery/api.jquery.com/issues/98
#10994 is a duplicate of this ticket.