{css1} Unitless numbers are not ignored

VERIFIED FIXED

Status

()

Core
CSS Parsing and Computation
P3
minor
VERIFIED FIXED
19 years ago
18 years ago

People

(Reporter: Hixie (not reading bugmail), Assigned: Peter Linss)

Tracking

({css1})

Trunk
x86
Windows 95
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: Nav Quirk 8/19: Pending verification in Standard mode, URL)

(Reporter)

Description

19 years ago
In CSS, numbers without units should not be parsed as lengths, and should
cause the entire declaration to be ignored, if a length is what is expected.

For example:

   DIV { font-size: 12; }

...should be ignored, because font-size does not accept pure numbers, only
lengths, which requires units.

Here are some tests for this requirement:
   http://www.fas.harvard.edu/~dbaron/css/test/unitless
   http://www.bath.ac.uk/%7Epy8ieh/internet/projects/mozilla/unitless.html

Currently, we are assuming that numbers without units are actually lengths
in pixels. This is counter to the specs.
(Assignee)

Updated

19 years ago
Status: NEW → RESOLVED
Last Resolved: 19 years ago
Resolution: --- → WONTFIX
Whiteboard: Nav Quirk
(Assignee)

Comment 1

19 years ago
This is a Nav Quirk (IE quirk too), unfortunately there are too many pages
already in existence that rely on this (like, all pages generated by MS word).

Try it in standard mode, we reject it properly then.
Status: RESOLVED → REOPENED
I am reopening this because you aren't ignoring them in Standard mode, on the
assumption that you do consider ignoring them in standard mode to be a bug.  I
confirmed I was in standard mode using
http://www.fas.harvard.edu/~dbaron/css/test/sec170501  and found no changes in
the test http://www.fas.harvard.edu/~dbaron/css/test/unitless , where you still
fail to reject the unitless numbers.

Updated

19 years ago
Resolution: WONTFIX → ---

Comment 3

19 years ago
Clearing Won't Fix resolution since this is Reopened.
(Assignee)

Comment 4

19 years ago
Ian, could you please change the doctype of your test page to HTML4.0 strict?

We're finally connecting the quirk mode switches to the doctype. Note that the
user pref in viewer only currently controls the presentation-time quirk mode,
the CSS parsing is controlled by a seperate, parse time switch (which will be
controlled by the doctype).
(Reporter)

Comment 5

19 years ago
The DOCTYPEs on both my page and David's page are already HTML4 Strict:

   <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">

I would have been very surprised if they weren't.
(Reporter)

Updated

19 years ago
Summary: Unitless numbers are not ignored → {css1} Unitless numbers are not ignored
(Assignee)

Updated

19 years ago
Status: REOPENED → RESOLVED
Last Resolved: 19 years ago19 years ago
Resolution: --- → FIXED
(Assignee)

Comment 6

19 years ago
CSS quirk mode now connected to document DTD state. (but the DTD state isn't
being set by the parser yet).
The 07-07 build is not showing any improvement here.  The switch in the viewer
menu doesn't help things, even if I:
* reload (as I always must)
* set it before loading for the first time.

This switch does change all the other things that should be affected by quirks
mode, such as table column backgrounds (
http://www.fas.harvard.edu/~dbaron/css/test/sec170501 ) or inheritance into
tables ( http://www.webstandards.org/css/winie/tablegackdemo1.html ).

Shouldn't this be the same switch?  [Not reopening, yet...]
(Assignee)

Comment 8

19 years ago
The switch in viewer only effects the presentation mode, not the DTD mode. So it
will not change parse-time behaviors (as this is). I considered adding a new
switch (or hooking that switch to both mechanisms), but I thought it would be a
better use of time to just make auto quirk mode work (then the switch becomes
fairly useless anyway). (Still waiting for parser support for the final
connection of auto mode.)

Updated

19 years ago
Whiteboard: Nav Quirk → Nav Quirk 8/19 - verification pending response from peterl

Comment 9

19 years ago
Peter: I am using 8/16 Viewer and have opened the following in both Nav Quirk
and Standard modes (using Transitional and Strict DTD):

<html>
<head>
<title>8591</title>
<style="text/css">
.one { font-size: 26px }
.two { font-size: 26 }
</style>
</head>
<body>
<div class="one">This div should display the font size of 26 as there is a px
unit specification
</div>
<div class="two">This div should ignore the font size of 26 as there is no unit
specification
</div>
</body>
</html>

The DIV that has no unit assignment is not being ignored.
Is this still a bug or is it just that I will not be able to verify this in
Viewer as it stands today?
(Assignee)

Comment 10

19 years ago
You cannot switch between quirk and standard mode via the DTD yet.

Updated

19 years ago
Whiteboard: Nav Quirk 8/19 - verification pending response from peterl → Nav Quirk 8/19 Unable to verify at present-can't switch to Nav Quirk via DTD yet

Updated

19 years ago
Whiteboard: Nav Quirk 8/19 Unable to verify at present-can't switch to Nav Quirk via DTD yet → Nav Quirk 8/19: Pending verification in Standard mode

Comment 11

19 years ago
Peter: Which milestone was this fixed in? Could you please add that to the
category? Thanks
(Reporter)

Updated

19 years ago
Status: RESOLVED → VERIFIED
(Reporter)

Comment 12

19 years ago
This seems to work with Win32 1999-10-04.
(Reporter)

Updated

18 years ago
Keywords: css1
(Reporter)

Comment 13

18 years ago
Migrating from {css1} to css1 keyword. The {css1}, {css2}, {css3} and {css-moz}
radars should now be considered deprecated in favour of keywords.
I am *really* sorry about the spam...
You need to log in before you can comment on or make changes to this bug.