[css-d] asterisk in front of font property
Can someone explain the significance of the asterisk in the following code? Thanks. body {font:13px arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small;} Scott __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7 List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Re: [css-d] asterisk in front of font property
It is probably an IE 6 hack. The asterisk before the element makes it visible to IE. paul -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Demers, Scott Sent: Tuesday, May 16, 2006 12:33 PM To: css-d@lists.css-discuss.org Subject: [css-d] asterisk in front of font property Can someone explain the significance of the asterisk in the following code? Thanks. __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7 List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Re: [css-d] asterisk in front of font property
I can tell you that the code is taken from the fonts style-sheet of the YUI library. It's an attempt to normalize font-size across browsers. Now that I know what the asterisks are for, it makes sense. From the code comments: x-small is for IE 6 and IE6 quirks mode -Original Message- From: Tom Livingston [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 16, 2006 11:49 AM To: Demers, Scott Subject: Re: [css-d] asterisk in front of font property On 5/16/06 1:33 PM, Demers, Scott [EMAIL PROTECTED] wrote: body {font:13px arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small;} Not only the asterisks, but what is actually happening in that rule? Do non-IE browsers _not_ see the last to size declarations? If they are only for IE, why have both small and x-small? -- Tom Livingston Senior Multimedia Artist Media Logic www.mlinc.com __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7 List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Re: [css-d] asterisk in front of font property
Demers, Scott wrote: Can someone explain the significance of the asterisk in the following code? Thanks. body {font:13px arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small;} It is not valid. Probably the author( a control freak) meant to comment out stuff, as in: body {font: 13px arial,helvetica,clean,sans-serif;/*font-size:small; font:x-small;*/} A user friendly author might write this, instead: body {font: medium/normal sans-serif; } Or body {font: 100%/1.2 sans-serif; } Or body {font-family: sans-serif; } Or, and more...see the Wiki. Scott Regards, ~davidLaakso -- http://www.dlaakso.com/gustave/ __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7 List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Re: [css-d] asterisk in front of font property
On 5/16/06, Tom Livingston [EMAIL PROTECTED] wrote: body {font:13px arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small;} It is not valid. I didn't think it was. 'font:' with _only_ a size attribute is incorrect. No? -- Tom Livingston Senior Multimedia Artist Media Logic www.mlinc.com -- -- Tom Livingston Senior Multimedia Artist Media Logic www.mlinc.com __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7 List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Re: [css-d] asterisk in front of font property
This is interesting. As I mentioned, this is code released as part of the Yahoo User Interface Library ( http://developer.yahoo.com/yui/ ). If it is in fact invalid, I'll mention it on the bug list. Scott -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tom Livingston Sent: Tuesday, May 16, 2006 12:39 PM To: css-d@lists.css-discuss.org Subject: Re: [css-d] asterisk in front of font property On 5/16/06, Tom Livingston [EMAIL PROTECTED] wrote: body {font:13px arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small;} It is not valid. I didn't think it was. 'font:' with _only_ a size attribute is incorrect. No? -- Tom Livingston Senior Multimedia Artist Media Logic www.mlinc.com -- -- Tom Livingston Senior Multimedia Artist Media Logic www.mlinc.com __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7 List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/ __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7 List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Re: [css-d] asterisk in front of font property
Demers, Scott wrote: This is interesting. As I mentioned, this is code released as part of the Yahoo User Interface Library ( http://developer.yahoo.com/yui/ ). If it is in fact invalid, I'll mention it on the bug list. The question came up on the YDN-javascript list (may 12th) and the response from Nate Koechley was: Great question. Matt and I are finishing a blog post that should be published to http://yuiblog.com in the next day or two that looks at Fonts CSS in detail, including this issue. Instead of ruining the suspense, I'd ask you to wait for it there ;) I will say, though, that it is intentional. While we're strongly against CSS filters and hacks in general (that's what's causing the console notifications), sometimes it's justified. We hope that, once explained, you'll agree with our approach. Thanks Nate So I'm waiting, should be an interesting read... ;o) __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7 List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/