#11887 closed feature (notabug)
Add an entry for $.cssNumber to the API docs
Reported by: | BillyRayPreachersSon | Owned by: | BillyRayPreachersSon |
---|---|---|---|
Priority: | low | Milestone: | None |
Component: | css | Version: | 1.7.2 |
Keywords: | 1.9-discuss | Cc: | |
Blocked by: | Blocking: |
Description (last modified by )
I think it would be worthwhile adding an entry for $.cssNumber to the API docs, alongside the existing entry for $.cssHooks.
At present, the only mention of it is right at the bottom of the entry for $.cssHooks, and so it's very easy to miss.
The main reason I think it might be a useful addition is for anyone wondering why setting the line-height style without a value does not give the same results as setting the font-size style without a value, e.g.:
var size = 10; el.css({ fontSize:size, lineHeight:size });
Personally, I'd add it to both the "CSS" and "Mainpulation -> Style Properties" categories, as those would be the places I'd be looking if I had the aforementioned issue.
Change History (12)
comment:1 Changed 11 years ago by
comment:2 follow-up: 5 Changed 11 years ago by
Owner: | set to BillyRayPreachersSon |
---|---|
Status: | new → pending |
So are you asking that we expose jQuery.cssNumber as part of the API so that users can change it? Or just that the information contained there be included in the pages for .css()
at api.jquery.com?
comment:3 Changed 11 years ago by
dmethvin, I'm personally torn on this one. While it may be nice for plugin developers to be able to rely on $.cssNumber and $.cssProps, if we expose it, we're locked in. Perhaps just adding it to .css() and mentioning them as unstable hooks for plugin devs is good enough?
comment:4 Changed 11 years ago by
Component: | unfiled → css |
---|---|
Milestone: | None → 1.9 |
Priority: | undecided → low |
Status: | pending → open |
Let's keep these internal for now, we can revisit in 1.9.
comment:5 Changed 11 years ago by
Replying to dmethvin:
So are you asking that we expose jQuery.cssNumber as part of the API so that users can change it? Or just that the information contained there be included in the pages for
.css()
at api.jquery.com?
Just that the information contained be included in the docs, really.
comment:6 Changed 11 years ago by
Type: | enhancement → feature |
---|
Bulk change from enhancement to feature.
comment:7 Changed 11 years ago by
Keywords: | 1.9-discuss added |
---|
comment:11 Changed 10 years ago by
Resolution: | → notabug |
---|---|
Status: | open → closed |
comment:12 Changed 10 years ago by
Milestone: | 1.9 → None |
---|
A small typo crept in there: "without a value" should read "without a unit".
Unfortunately, there appears to be no way to edit a ticket, even as the reporter.