Side navigation
#11887 closed feature (notabug)
Opened June 10, 2012 11:50AM UTC
Closed October 29, 2012 04:45PM UTC
Last modified November 27, 2012 05:40PM UTC
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
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.
Attachments (0)
Change History (12)
Changed June 10, 2012 11:56AM UTC by comment:1
Changed June 12, 2012 03:23PM UTC by comment:2
owner: | → 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?
Changed June 26, 2012 12:23PM UTC by comment:3
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?
Changed June 26, 2012 12:57PM UTC by comment:4
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.
Changed August 18, 2012 09:57AM UTC by comment:5
Replying to [comment:2 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.
Changed September 09, 2012 01:10AM UTC by comment:6
type: | enhancement → feature |
---|
Bulk change from enhancement to feature.
Changed September 09, 2012 05:34AM UTC by comment:7
keywords: | → 1.9-discuss |
---|
Changed September 27, 2012 01:54PM UTC by comment:8
+1 to documenting the properties; -1 to documenting the API.
Changed October 14, 2012 10:28PM UTC by comment:9
description: | \ 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.: \ \ {{{#!js \ \ \ 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. \ → 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.: \ \ {{{#!js \ \ \ 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. \ |
---|
+1, knowledge is power
Changed October 22, 2012 05:21PM UTC by comment:10
+1
Changed October 29, 2012 04:45PM UTC by comment:11
resolution: | → notabug |
---|---|
status: | open → closed |
Changed November 27, 2012 05:40PM UTC by comment:12
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.