This is a discussion on "Firefox bug in CSS (font) shorthand" within the Web Page Design section. This forum, and the thread "Firefox bug in CSS (font) shorthand are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
Firefox bug in CSS (font) shorthand
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
Firefox bug in CSS (font) shorthand
I've been fighting this bug all day and finally got to the bottom of it. Thought I'd post it here in case it helps anyone...
When using font shorthand...
I've tested this pretty thoroughly in FF 2.0.0.3 (and searched extensively for it on the web.) My searches didn't turned up anything. I'm surprised that no one else has encountered this. Maybe it used to work (prior to 2.0.0.3)? Anyway, hope this helps! |
|
|
|
#2
|
||||
|
||||
|
Re: Firefox bug in CSS (font) shorthand
Does this work?
|
|
#3
|
|||
|
|||
|
Re: Firefox bug in CSS (font) shorthand
With a lot of shorthand though the order can be switched around. You've just got to switch it around in the right way I guess.
Pete. |
|
#4
|
||||
|
||||
|
Re: Firefox bug in CSS (font) shorthand
Things can be switched to an extent, but it's not CSS that allows this, it's the browsers. Sticking to the standards is the only way to ensure x-browser compatibility.
|
|
#5
|
|||
|
|||
|
Re: Firefox bug in CSS (font) shorthand
I've actually had the order right in some of my trials and it still didn't work. In fact, even this doesn't seem to work:
|
|
#6
|
|||
|
|||
|
Re: Firefox bug in CSS (font) shorthand
I routinely test in FF2 and IE5.5 during development, then check everything with browsercam before publishing publicly. So far, I've not had any problems using weight values in either FF or IE. I haven't done a browsercam check yet, though, so I suppose it could all fall apart in Opera or Safari or Camino or something.
|
|
#7
|
|||
|
|||
|
Re: Firefox bug in CSS (font) shorthand
Some shorthand properties have values that are required at all times when using them and font is one of them
Efficient CSS with shorthand properties Quote:
|
|
#8
|
|||
|
|||
|
Re: Firefox bug in CSS (font) shorthand
What a terrible rule! Kind of defeats the whole purpose! In the majority of my pages, I use the exact same font family throughout and declare it in the body selector! No wonder I'm having so many problems! If I have to declare the family every time I use font shorthand, I'm not saving much in the way of code or keystrokes! I think I won't be bothering with font shorthand in the future!
Sorry, Karinne - please don't take that as shooting the messenger - I appreciate the help and the clarification, but I have to wonder what genius made that rule?! I find it amusing that IE supports font shorthand even without the font family declaration. As much as IE gets bashed (and I do so as often as anyone), how ironic that their non-compliance turns out to be a superior method! |
|
#9
|
|||
|
|||
|
Re: Firefox bug in CSS (font) shorthand
Well ... the thing is ... you should rarely use the font property. You should set it once in your body then when you change the site just use the font-size or to change the weight (boldness) use font-weight
|
|
#10
|
|||
|
|||
|
Re: Firefox bug in CSS (font) shorthand
Yup. That's what I'll do. It would just be nice, when I need to change more than one font property for a given element (which is fairly common), to be able to do it simply/quickly/easily with shorthand - without having to declare the font family.
|
|
#11
|
||||
|
||||
|
Re: Firefox bug in CSS (font) shorthand
What I mean by the font-weight thing is that font-weight: 500, 600, 700, 800 and 900 will produce the same thing as font-weight: bold; and font-weight: 100, 200, 300 and 400 will produce the same thing as font-weight: normal;
|
![]() |
| Tags |
| bug, css, firefox, shorthand |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| What is this font? | Graisbeck | Graphics and 3D | 2 | Feb 19th, 2008 15:07 |
| Font Help | lisafelst12 | Graphics and 3D | 25 | Nov 19th, 2007 22:43 |
| my font changes | monstermunch | Starting Out | 1 | Apr 17th, 2007 09:12 |
| font in css | zubby | Web Page Design | 6 | Apr 14th, 2007 00:37 |
| font help | makemesick | Web Page Design | 3 | May 6th, 2005 22:47 |