HighDots Forums  

* and _ prepended to properties

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss * and _ prepended to properties in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Denis McMahon
 
Posts: n/a

Default * and _ prepended to properties - 07-19-2009 , 12:08 PM






Hi

I've come across a style sheet with eg:

#idname {
width:73.074em;
*width:71.313em;
min-width:950px;
}

and

..classname {
_position:static;
} /* for IE < 7 */

but I've not got any idea what the effect of prepending the properties
with * or _ is. Can anyone explain or point me to an explanation? I
had a look at the css 2.1 spec and tried googling, but couldn't find
anything useful.

Denis McMahon

Reply With Quote
  #2  
Old   
Ed Mullen
 
Posts: n/a

Default Re: * and _ prepended to properties - 07-19-2009 , 12:16 PM






Denis McMahon wrote:
Quote:
Hi

I've come across a style sheet with eg:

#idname {
width:73.074em;
*width:71.313em;
min-width:950px;
}

and

.classname {
_position:static;
} /* for IE < 7 */

but I've not got any idea what the effect of prepending the properties
with * or _ is. Can anyone explain or point me to an explanation? I
had a look at the css 2.1 spec and tried googling, but couldn't find
anything useful.

Denis McMahon
Goggle is your friend ...

http://www.google.com/search?hl=en&safe=off&num=50&q=css+asterisk&aq=f&o q=&aqi=g6

--
Ed Mullen
http://edmullen.net
"I have not failed, I've just found 10,000 ways that won't work." -
Thomas Edison

Reply With Quote
  #3  
Old   
Denis McMahon
 
Posts: n/a

Default Re: * and _ prepended to properties - 07-19-2009 , 01:49 PM



On Jul 19, 5:16*pm, Ed Mullen <e... (AT) edmullen (DOT) net> wrote:
Quote:
Denis McMahon wrote:
Hi

I've come across a style sheet with eg:

#idname {
* *width:73.074em;
* **width:71.313em;
* *min-width:950px;
}

and

.classname {
* _position:static;
} /* for IE < 7 */

but I've not got any idea what the effect of prepending the properties
with * or _ is. Can anyone explain or point me to an explanation? I
had a look at the css 2.1 spec and tried googling, but couldn't find
anything useful.

Denis McMahon

Goggle is your friend ...

http://www.google.com/search?hl=en&safe=off&num=50&q=css+asterisk&aq=...

--
Ed Mullenhttp://edmullen.net
"I have not failed, I've just found 10,000 ways that won't work." -
Thomas Edison
Ok, so it explained what the underscore hack is for, but all I can
find out about the asterisk prefixed to a property name is that it's
something from a yahoo library.

Note, I'm not referring to asterisk as a selector, but asterisk
prefixed to a property name eg:

p, h1, h2 {
width: 70em;
*width 69em;
}

The google search suggested doesn't lead me to any explanation, it did
suggests a may 2006 yahoo developer blog post, but although I looked
at the posts concerned and css stuff linked in the posts I couldn't
find an explanation of what this particular hack is for.

Denis McMahon

Reply With Quote
  #4  
Old   
Denis McMahon
 
Posts: n/a

Default Re: * and _ prepended to properties - 07-19-2009 , 02:03 PM



On Jul 19, 6:49*pm, Denis McMahon <denis.m.f.mcma... (AT) googlemail (DOT) com>
wrote:
Quote:
On Jul 19, 5:16*pm, Ed Mullen <e... (AT) edmullen (DOT) net> wrote:



Denis McMahon wrote:
Hi

I've come across a style sheet with eg:

#idname {
* *width:73.074em;
* **width:71.313em;
* *min-width:950px;
}

and

.classname {
* _position:static;
} /* for IE < 7 */

but I've not got any idea what the effect of prepending the properties
with * or _ is. Can anyone explain or point me to an explanation? I
had a look at the css 2.1 spec and tried googling, but couldn't find
anything useful.

Denis McMahon

Goggle is your friend ...

http://www.google.com/search?hl=en&safe=off&num=50&q=css+asterisk&aq=...

--
Ed Mullenhttp://edmullen.net
"I have not failed, I've just found 10,000 ways that won't work." -
Thomas Edison

Ok, so it explained what the underscore hack is for, but all I can
find out about the asterisk prefixed to a property name is that it's
something from a yahoo library.

Note, I'm not referring to asterisk as a selector, but asterisk
prefixed to a property name eg:

p, h1, h2 {
* width: 70em;
* *width 69em;

}

The google search suggested doesn't lead me to any explanation, it did
suggests a may 2006 yahoo developer blog post, but although I looked
at the posts concerned and css stuff linked in the posts I couldn't
find an explanation of what this particular hack is for.
Ah

http://developer.yahoo.com/yui/grids/

It's an IE hack of some sort (ie sees the property, other browsers
don't), but different to the _ hack (which is used for IE < 7
according to comments in the file).

Not sure if it's "all IE" (including 7+) as opposed to <7 or not. So
not that much clearer really.

Denis McMahon

Reply With Quote
  #5  
Old   
Jonathan N. Little
 
Posts: n/a

Default Re: * and _ prepended to properties - 07-19-2009 , 04:12 PM



Denis McMahon wrote:

Quote:
It's an IE hack of some sort (ie sees the property, other browsers
don't), but different to the _ hack (which is used for IE < 7
according to comments in the file).
It's the Holly hack. Yes, by the rules if a property is misspelled it is
*supposed* to be ignored by the browser. IE does the wrong thing...

Quote:
Not sure if it's "all IE" (including 7+) as opposed to <7 or not. So
not that much clearer really.
As will most hacks, it is a bad idea to rely on hacks IMO, they tend to
bite you in the backside later on...

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com

Reply With Quote
  #6  
Old   
Denis McMahon
 
Posts: n/a

Default Re: * and _ prepended to properties - 07-19-2009 , 05:05 PM



On Jul 19, 9:12*pm, "Jonathan N. Little" <lws4... (AT) centralva (DOT) net>
wrote:
Quote:
Denis McMahon wrote:
It's an IE hack of some sort (ie sees the property, other browsers
don't), but different to the _ hack (which is used for IE < 7
according to comments in the file).

It's the Holly hack. Yes, by the rules if a property is misspelled it is
*supposed* to be ignored by the browser. IE does the wrong thing...
I don't think it is. The "holly hack", as far as I can tell from
googling, is a combination of the mac-hack and the tan-hack eg:

/* Hides from IE5-mac \*/
* html .buggybox {height: 1%;}
/* End hide from IE5-mac */

where the "\*/" in the first line starts the "mac-hack" which hides
the whole declaration from ie5 for the mac, and "* html" is the "tan
hack" which is only visible to ie, and the second comment terminates
the unterminated (to mac ie5) comment.

The hack I'm trying to discover the reason and scope for is:

..buggybox {
width: 31em;
*width: 30em; /* <= "*" on this line here */
}

So I'm still none the wiser.

Denis McMahon

Reply With Quote
  #7  
Old   
dorayme
 
Posts: n/a

Default Re: * and _ prepended to properties - 07-19-2009 , 09:57 PM



In article
<1e5aac38-5cc0-4ed5-8805-6e5d768de9d2 (AT) 26g2000yqk (DOT) googlegroups.com>,
Denis McMahon <denis.m.f.mcmahon (AT) googlemail (DOT) com> wrote:

Quote:
I've come across a style sheet with eg:

#idname {
width:73.074em;
*width:71.313em;
min-width:950px;
}

....

but I've not got any idea what the effect of prepending the properties
with * or _ is.
Then do some experiments and come back and tell us all.

Try

div {
color: #000;
background: #ffc;
width: 600px;
*width:300px;
}

and

<div>Test</div>


using versions 6, 7 and 8 IE browsers.

--
dorayme

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.