[Prev][Next][Index][Thread]

Re: what happens if first-line contains markup?



 From: "Chris Wilson (PSD)" <cwilso@microsoft.com>
| >
| >>Note, by the way, that the spec does indicate how to handle "order of
| >>appearance" for STYLE attributes - they are appended at the end of the
| >>STYLE element (but since they are specified as if by ID, they would
| >>presumably be most-specific in any case).
| 
| Where does the spec say that?  I looked through the current working
| draft on CSS [1] and the embedding style working draft [2], and didn't
| see where it said they were treated as if they were appended at the end
| of the STYLE element (as if they were linked via ID).  Perhaps this
| issue should be strictly defined - that is not how MSIE applies the
| style properties applied via a STYLE attribute (anything inside a STYLE
| attribute on an element is immediately applied to the element, before
| anything else.  Otherwise, it could be overridden by a rule with a
| higher specificity (e.g., "#ID1 #ID2 {}" ), which doesn't seem intuitive
| at all).
---

The next-to-last paragraph of section 3.2 of [1] says:


  A 'STYLE' attribute on an element (see section 1.1 for an example)
  should be considered as if an ID attribute had been specified at the end
  of the style sheet.

which I read as I indicated. Since it goes on to say:

  The UA may choose to honor other stylistic attributes (e.g. 'ALIGN') as
  if a 'STYLE' attribute had been used. When in conflict with other
  stylistic attributes, the 'STYLE' attribute should win.

I would say your interpretation was what they intended, anyway.

---

| [1]: http://www.w3.org/pub/WWW/TR/WD-css1.html


scott

--
scott preece
motorola/mcg urbana design center	1101 e. university, urbana, il   61801
phone:	217-384-8589			  fax:	217-384-8550
internet mail:	preece@urbana.mcd.mot.com