W3C home > Mailing lists > Public > www-style@w3.org > July 2014

CSS3 specificity

From: Max Design <info@maxdesign.com.au>
Date: Tue, 17 Jun 2014 20:28:04 +0000
Message-Id: <50A384E0-CEAF-482D-8A97-D8F0434445A3@maxdesign.com.au> (sfid-20140617_202810_558660_341CA3FA)
To: www-style@w3.org
Hi there

I have a question regarding more recent definitions of the cascade process.

In CSS2, specificity was measured with three concatenated numbers: 0,0,0

Apparently, David Barron was the first to suggest a change for CSS2.1

In CSS2.1, specificity was measured using four concatenated numbers: 0,0,0,0

"count 1 if the declaration is from is a 'style' attribute rather than a rule with a selector, 0 otherwise (= a) (In HTML, values of an element's "style" attribute are style sheet rules. These rules have no selectors, so a=1, b=0, c=0, and d=0.)

In the newer CSS3 specificity model, specificity is again measured using three concatenated numbers: 0,0,0

Referenced here:

And defined here

If I read both documents, there is no reference to inline styles at all. Inline styles are not described under Origin or importance:

	 Transition declarations [CSS3-TRANSITIONS]
	 Important user agent declarations
	 Important user declarations
	 Important override declarations [DOM-LEVEL-2-STYLE]
	 Important author declarations
	 Animation declarations [CSS3-ANIMATIONS]
	 Normal override declarations [DOM-LEVEL-2-STYLE]
	 Normal author declarations
	 Normal user declarations
	 Normal user agent declarations

So, my question... CSS2.1 helped to define how inline styles play out in the cascade order. Am I missing something in CSS3 which defined where inline styles are weighted?

Any help appreciated!

Received on Wednesday, 23 July 2014 14:22:46 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:44 UTC