Closed Bug 317572 Opened 19 years ago Closed 19 years ago

(Style) font-family is not rendered if using quotes

Categories

(Firefox :: General, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: fredck, Unassigned)

Details

Attachments

(1 file)

User-Agent:       Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Maxthon; .NET CLR 1.1.4322)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b4) Gecko/20050908 Firefox/1.4

When formatting using the "font-family" property, if you put the font family name inside quotes, it will not get rendered as expected. Actually the font formatting will be ignored.

Reproducible: Always

Steps to Reproduce:
Just set a style using "font-family:'fantasy'",for example.

Actual Results:  
The specified font formatting will be ignored.
This is the correct behavior.
Per the CSS 2.1 spec: (http://www.w3.org/TR/CSS21/fonts.html#font-family-prop)

Font family names that happen to be the same as a keyword value (e.g. 'initial', 'inherit', 'default', 'serif', 'sans-serif', 'monospace', 'fantasy', and 'cursive') must be quoted to prevent confusion with the keywords with the same names. UAs must not consider these keywords as matching the '<family-name>' type.

So when you quote 'fantasy' the system looks for a font actually called "fantasy". If you want to use it as keyword, it must not be quoted.

=> INVALID
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → INVALID
Ok, thanks for the precision. I took a look in the specification before reporting the bug, but read it quickly.

I confirm that the actual behavior reflects exactly the W3C specifications. I just thought that, as all other browsers transparently correct this bad style definition and render it as expected (it doesn't always means "correctly"), then why should not Firefox do that?
(In reply to comment #3)
> I confirm that the actual behavior reflects exactly the W3C specifications. I
> just thought that, as all other browsers transparently correct this bad style
> definition and render it as expected (it doesn't always means "correctly"),
> then why should not Firefox do that?

1. Not all browsers "transparently correct" this: specifically, I tested Safari, and it behaves just like Mozilla/Firefox (i.e., correctly).

2. If we do what you suggest, there will be no way for an author to specify using a font actually named "Fantasy" (or "Serif", etc.). Plus it would be a clear violation of the standard - something we are trying not to do.
It would be tricky if the specified font is not available in the computer (probably 99,99999999% of the cases for those generic families) that the generic is used. In this case, the web designer would be violating the specifications, not my powerful browser that corrects the mistake automatically...

In any case, Safari has the same behavior... Great! So we can just close our eyes to the problem.
Firefox does not support my web site.http://www.straforevi.com/urunler/maket-pasta/
Many apps need permission to utilize most of the features.To run all these features we need to pay some price. But not now you can pay for all such games for free. Download Xmod games app from http://www.xmod.me/
Restrict Comments: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: