-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Preserve unit for some 0 values #10
Comments
As far as I know, |
In CSS Values and Units Module Level 3, 8.3. Attribute References: ‘attr()’, ‘length’ ‘angle’ ‘time’ ‘frequency’:
and:
I think the spec suggests unit-less is not only for length unit. |
The spec is pretty clear in 4.3.2 : (http://www.w3.org/TR/CSS2/syndata.html#values)
It doesn't appear anytime else in the whole spec. I don't say that it won't work in browser. Just that it may be invalid to remove these units. :) |
Same in CSS3: 5. Distance Units: the <length> type
I may be wrong, but this:
seems to suggest that "even if length is a dimension, the unit identifier is optional". Meaning it is not the case for other dimensions. After all, 6. Other Units (angles, times, frequencies, resolutions) does not mention anything about using Fwiw, I did some digging and I found this article about <angle> on MDN where it says:
|
hm, yes, I came across the MDN article so 0 angkles are preserved: I'll add time always be 0s. Not sure what to do about the others, some browser testing is in order |
btw, http://dabblet.com/gist/3746116 looks good in FF 30 Mac |
There are bugs with some unitless 0.
For example, here are two examples with times (check in Chrome and Firefox to see differences)
http://jsbin.com/ledeb/2/edit
http://dabblet.com/gist/3746116
I think
s
andms
unit should be preserved, even with 0?The text was updated successfully, but these errors were encountered: