They have the same weight. They are just groupings of individual selectors.
More on this here:
http://www.w3.org/TR/CSS21/selector.html#grouping
Theoretically, a browser must sort each element separately, so it will
gather any rule that includes an h1 and then sort out the weightings.
As the browser has to look at each mention of an individual element, it
would treat "h1, h2" as two separate rule sets to be sorted separately when
their relevant elements are being sorted.
My 2 cents
Russ
> Perhaps someone has seen, or has a definitive answer to this question
>
> which has the higher specificity
>
> h1 {}
>
> or
>
> h1, h2 {}
>
> (don't worry about the order in the style sheet, just in an absolute
> sense)
>
> Relevant part of the CSS specification is here
>
> http://www.w3.org/TR/CSS21/cascade.html#specificity
>
> FWIW, I think it is ambiguous. But strictly thinking,
>
> "count the number of element names and pseudo-elements in the selector"
>
> I interpret to mean that the group is of specificity 2, and so higher
> than the type selector, of specificity 1
> Or do they both have a specificity of 1?
>
> Thanks, interested in people's thoughts,
--------------------------------------------
******************************************************
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************