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 2272 - <number> should not require a digit
Summary: <number> should not require a digit
Status: RESOLVED FIXED
Alias: None
Product: CSSValidator
Classification: Unclassified
Component: CSS 2.0 (show other bugs)
Version: CSS Validator
Hardware: All All
: P1 minor
Target Milestone: ---
Assignee: Yves Lafon
QA Contact: qa-dev tracking
URL:
Whiteboard:
Keywords:
: 2285 2307 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-09-20 17:19 UTC by Si^mon Pi^eters
Modified: 2006-11-14 01:27 UTC (History)
5 users (show)

See Also:


Attachments
Patch to allow 'line-height: 1;' (2.90 KB, patch)
2006-02-11 00:32 UTC, Jesse Skinner
Details
Fixes line-height: <number> (1.94 KB, patch)
2006-02-16 18:48 UTC, Jesse Skinner
Details

Description Si^mon Pi^eters 2005-09-20 17:19:38 UTC
According to CSS2, <number> could be an <integer>[1]. So the following style
sheet is valid CSS2:

 E { line-height:1; }

Reproducable: Always
Steps to reproduce:
 1.
http://jigsaw.w3.org/css-validator/validator?text=E+%7B+line-height%3A1%3B+%7D&usermedium=all
Actual results: "Invalid number : line-height Parse Error - [empty string]"
Expected results: "No error or warning found"

[1] http://www.w3.org/TR/REC-CSS2/syndata.html#value-def-number
Comment 1 Olivier Thereaux 2005-09-22 09:56:44 UTC
*** Bug 2285 has been marked as a duplicate of this bug. ***
Comment 2 Olivier Thereaux 2005-09-22 09:57:53 UTC
moving priority up (this should be fixed ASAP), severity down (probably easy to fix). Yves, if you have 
time for this... thanks.
Comment 3 Si^mon Pi^eters 2006-02-09 13:09:04 UTC
*** Bug 2307 has been marked as a duplicate of this bug. ***
Comment 4 Jesse Skinner 2006-02-11 00:32:37 UTC
Created attachment 406 [details]
Patch to allow 'line-height: 1;' 

CssNumber.get() returns either a Float or an Integer. CssLineHeight* were
assuming it was always a Float. I changed it so that getValue() is called
instead for instances of CssValueFloat (ie. CssNumber). getValue() always
returns Float.

Note: this only fixes line-height. It's not clear if this bug (or a similar
bug) exists elsewhere, though I couldn't find another occurance.
Comment 5 Jesse Skinner 2006-02-16 18:48:20 UTC
Created attachment 408 [details]
Fixes line-height: <number>

I simplified the code. Now it just changes a Float cast to a Number cast.
Comment 6 Olivier Thereaux 2006-02-17 00:33:27 UTC
(In reply to comment #5)

Jesse, thanks for your patch. We're reviewing it now.
Comment 7 Olivier Thereaux 2006-03-16 06:03:29 UTC
Jesse,
Your patch is now in the CVS codebase, and tested successfully. We'll update the production service soon with it and a bunch of other bugfixes.

Thanks!
Comment 8 Sander Aarts 2006-11-02 18:23:01 UTC
Is the online validator updated with this patch already? Cause {line-height:0;} still returns "Invalid number : line-height Parse Error - [empty string]".
Comment 9 Olivier Thereaux 2006-11-14 01:27:35 UTC
(In reply to comment #8)
> Is the online validator updated with this patch already? 

Not yet.