[css3-fonts] @font-face and !important

Hi,

I was trying to figure out what to do about !important and properties of  
the @viewport rule. I checked how it's handled for @font-face descriptors.

The grammar of the CSS2 spec says the descriptors are parsed as  
declarations, and hence allow !important. The prose says "If a font  
descriptor is duplicated, the last occurring descriptor wins and the rest  
must be ignored.", but nothing about !important.

 From the latest editors draft of the CSS3 Fonts Module:

   "When a given descriptor occurs multiple times in a given @font-face  
rule, only the last specified value is used, all prior values for that  
descriptor are ignored."

I can't find anything about !important there.

I tried to search the www-style archive for "font-face !important", but  
didn't find any conclusions on the subject.


Tried this in Chrome, Firefox and Opera:


<style>
@font-face {
   font-family: "a" !important;
   src:  
url('http://themes.googleusercontent.com/font?kit=IiexqYAeh8uII223thYx3w')  
format('truetype') !important;
   font-family: "b";
}

div {
   font-family: "a";
   font-size: 100px;
}
</style>
<div>blah-blah</div>


All three browers find the descriptors valid, but Opera actually applies  
it naming the font-face "a" instead of "b".

-- 
Rune Lillesveen
Senior Core Developer / Architect
Opera Software ASA

Received on Tuesday, 14 September 2010 12:55:22 UTC