Re: [css-d] Multiple class name support

2006-06-19 Thread Sam Brown
>> Actually, IE has issues with multiple selectors. Not that it 
>> doesn't work, just that there are caveats (that have bitten 
>> me several times).
>> 
>> Refer to the wiki for details:
>> http://css-discuss.incutio.com/?page=MultipleClasses

> The wiki doesn't say there is any issue with class="one two three" in IE. I
> use that extensively and haven't seen any problems with any browsers as far
> back as IE 5.0. The problem is when you try to use a CSS selector like
> .one.two {}, which doesn't work at all in IE. But you can certainly use .one
> {} or .two {} to match the class="one two three".

 From the wiki:
  "Internet Explorer (Win/6, Mac/5.x): broken. The multiple selector will 
select every element with the last class in the selector (order in the selector 
is important, order of the classes in the HTML is not), regardless of the 
presence of the other classes. In other words, IE treats .one.two.three exactly 
as it does .three."
 
 This has forced me, on several occasions to reorder the selector to get proper 
behavior in IE.
 
> To achieve an "and" effect like .one.two {} gives and have it work in any
> reasonably modern browser, I use nested elements with individual classnames.
> For example, if I want to do the equivalent of:

 The fact that you have to use a workaround to get multiple selectors to be 
applied in IE as they would in other browsers suggests to me that there is, in 
fact, an issue with IE's implementation of multiple selectors.
 
 The flaw is this:
 
 text
 
 .one.two.four { color: blue; }
 
 .one.three.four { color: red; }
 
 In IE the text in the span is be red. Obviously, it's important that people 
not familiar with the implementation of multiple selectors, like the person 
with the original question, be aware of this "issue" in IE.
 
 -Sam
 


__
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] Multiple class name support

2006-06-19 Thread cj
> The wiki doesn't say there is any issue with class="one two three" in IE. I
> use that extensively and haven't seen any problems with any browsers as far
> back as IE 5.0. The problem is when you try to use a CSS selector like
> .one.two {}, which doesn't work at all in IE. But you can certainly use .one
> {} or .two {} to match the class="one two three".

not quite true in my experience.  there are three bugs that i know
related to having multiple class/id names.  note that if you're only
working with classes, you only need to worry about the first one.

multiple classes bug:
http://www.quirksmode.org/bugreports/archives/2004/12/IE_CSS_rendering_bug_with_multiple_classnames.html

combining ID with class:
1. 
http://www.quirksmode.org/bugreports/archives/2005/09/IE6_Multi_Class_Bug.html
2a. 
http://www.quirksmode.org/bugreports/archives/2005/12/All_but_last_grouped_idclass_selectors_are_ignored.html
2b. http://css-discuss.incutio.com/?page=InternetExplorerWinBugs
[scroll to the bottom]

for those interested in voting or tracking on the ie feedback site
about multiple class/id, here's a couple of them:
https://connect.microsoft.com/IE/feedback/ViewFeedback.aspx?FeedbackID=78368
https://connect.microsoft.com/IE/feedback/ViewFeedback.aspx?FeedbackID=57394
__
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] Multiple class name support

2006-06-18 Thread Michael Geary
> > > I'm just wondering how well is the multi-class feature (i.e. 
> > > class="style1 style2 style3") supported in various browsers.
> > > Also, is there any significant difference between browsers in
> > > terms of how the order of class names affects the
> > > specificity/style precedence? 

> Actually, IE has issues with multiple selectors. Not that it 
> doesn't work, just that there are caveats (that have bitten 
> me several times).
> 
> Refer to the wiki for details:
> http://css-discuss.incutio.com/?page=MultipleClasses

The wiki doesn't say there is any issue with class="one two three" in IE. I
use that extensively and haven't seen any problems with any browsers as far
back as IE 5.0. The problem is when you try to use a CSS selector like
.one.two {}, which doesn't work at all in IE. But you can certainly use .one
{} or .two {} to match the class="one two three".

To achieve an "and" effect like .one.two {} gives and have it work in any
reasonably modern browser, I use nested elements with individual classnames.
For example, if I want to do the equivalent of:

 
test
 

 .one.two {}

I use instead:

 

   test

 

 .one .two {}

It's somewhat ugly but effective. Note that this still works fine if there
are multiple classnames, e.g.

 

   test

 

 .one .two {} /* identical results to previous example */

But this may or may not relate to the OP's question...

-Mike

__
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] Multiple class name support

2006-06-18 Thread Sam Brown
Sunday, June 18, 2006, 6:17:21 AM, Rizky wrote:

R> all modern browsers supports them quite well I guess. I've never had 
R> problems with multiple class names before. used it all the time ;) and
R> specificity is very much depends on the order of classes within the 
R> style sheet file, not the ones in the html. so I guess the answer is no.
R> cmiiw

Actually, IE has issues with multiple selectors. Not that it doesn't
work, just that there are caveats (that have bitten me several times).

Refer to the wiki for details:
http://css-discuss.incutio.com/?page=MultipleClasses

R> Jing Xue wrote:
>> I'm just wondering how well is the multi-class feature (i.e. class="style1
>> style2 style3") supported in various browsers. Also, is there any significant
>> difference between browsers in terms of how the order of class names affects
>> the specificity/style precedence?


-- 
Sam
mailto:[EMAIL PROTECTED]

__
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] Multiple class name support

2006-06-18 Thread Rizky
all modern browsers supports them quite well I guess. I've never had 
problems with multiple class names before. used it all the time ;) and 
specificity is very much depends on the order of classes within the 
style sheet file, not the ones in the html. so I guess the answer is no. 
cmiiw

- Rizky


Jing Xue wrote:
> I'm just wondering how well is the multi-class feature (i.e. class="style1
> style2 style3") supported in various browsers. Also, is there any significant
> difference between browsers in terms of how the order of class names affects
> the specificity/style precedence?
>   
__
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/