This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 2307 - line-height: 0 generates parse error
Summary: line-height: 0 generates parse error
Status: RESOLVED DUPLICATE of bug 2272
Alias: None
Product: CSSValidator
Classification: Unclassified
Component: CSS 2.0 (show other bugs)
Version: CSS Validator
Hardware: Macintosh All
: P2 normal
Target Milestone: ---
Assignee: Olivier Thereaux
QA Contact: qa-dev tracking
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-27 13:52 UTC by Adam Kuehn
Modified: 2008-12-01 03:03 UTC (History)
3 users (show)

See Also:


Attachments

Description Adam Kuehn 2005-09-27 13:52:54 UTC
A line-height value of 0 without a length unit generates a parse error and a
complaint about an empty string.  Adding any length unit value (e.g. "0em")
cures the error.  Of course, unit values are supposed to be optional.  This
appears to be a very recently-introduced issue (since 9/25/05 or thereabout).
Comment 1 Jonathan Stanley 2005-09-28 12:56:10 UTC
I can confirm this bug when validating to the CSS3 profile. Line-height of 0
should indeed be valid, as 0 == 0px, 0em, 0en, 0pt, etc.
Comment 2 kavol 2005-12-01 22:32:11 UTC
yes, I came across this bug too ... trying to validate CSS 2.1 source

(btw, not the right place to ask but this reminded me ... is there any other way 
to specify the CSS version 2.1 instead of 2 than using the advanced interface? I 
mean something within the document itself?)
Comment 3 Bj 2005-12-01 22:38:01 UTC
There is not, see http://lists.w3.org/Archives/Public/www-style/ for details 
(keywords would be e.g. "@version").
Comment 4 Jesse McCarthy 2006-01-04 17:45:55 UTC
Why has there been no action on this bug in the *100* days since it was 
reported?  Every day that a bug like this is allowed to fester it is 
embarrassing developers who have gone to the trouble to write valid code and 
rely on the validator to certify that.  Please fix this.
Comment 5 Bj 2006-01-04 17:57:07 UTC
No one provided a patch so far. If someone provides a good patch, I'm happy to 
commit it and ask Yves to update the online version of the Validator.
Comment 6 Jesse McCarthy 2006-01-04 19:37:20 UTC
Ok, but that's an excuse, not a solution.  I'm not blaming you -- in fact I 
have no idea who in particular is responsible for maintaining the validator.  
Who needs to have this bug brought to their attention to get some action?
Comment 7 Bj 2006-01-04 19:51:51 UTC
Whoever will write a patch or ensure that someone else will write one...
Comment 8 Jesse McCarthy 2006-01-04 19:55:24 UTC
Do you understand that that means nothing to me as a website developer who 
relies on this validator to demonstrate to potential clients, etc. that I'm 
writing valid code?

Who is running the show when it comes to this validator?  Is there any 
organizational structure behind it ensuring that things get done?
Comment 9 Bj 2006-01-04 20:02:51 UTC
See http://www.w3.org/QA/Tools/qa-dev/ but note that we are all painfully aware 
that the CSS Validator is not regularily maintained, in the end it'd be a 
matter of convincing someone like a W3C Member organization, W3C Management, or 
some other entity to pay someone to do it.
Comment 10 Eric Meyer 2006-02-09 00:15:39 UTC
(In reply to comment #0)
> A line-height value of 0 without a length unit generates a parse error and a
> complaint about an empty string.  Adding any length unit value (e.g. "0em")
> cures the error.  Of course, unit values are supposed to be optional.  This
> appears to be a very recently-introduced issue (since 9/25/05 or thereabout).

Actually, this seems to happen for any integer number with no unit; see http://jigsaw.w3.org/css-
validator/validator?profile=css2&warning=2&uri=http%3A%2F%2Falistapart.com%2F for one such 
example (line-height: 1;).  Apparently another way to step around this bug is to convert to decimal, as 
in: line-height: 1.0;.

Furthermore, unit values aren't optional.  United values for line-height have very, very different effects 
than unitless values; they're as different as apples and oranges.
Comment 11 Si^mon Pi^eters 2006-02-09 13:08:56 UTC

*** This bug has been marked as a duplicate of 2272 ***