Alex Milowski wrote:
> I have CSS rules that looks like:
> 
> g|choice > *:after
> {
>    content: "| ";
> }
> 
> g|choice > *:last-child:after
> {
>    content: "";
> }
> 
> When the last child of 'g:choice' changes, the styling of the children does
> not change unless I re-apply the stylesheet.  That is, I would expect
> the "| " to be added between the previous last-child and the new 
> last-child.
> Similarly, if I delete the last-child, the styling does not change without
> re-applying the stylesheet.
> 
> Basically, everything works properly when the document doesn't change but
> when the last-child is changed, the generated content doesn't change.

This is a documented limitation which cannot be removed for performance 
reasons.

Excerpts of 
http://www.xmlmind.com/xmleditor/_distrib/docs/csssupport/ch02.html

---
The style of an element may be specified using a selector containing the 
:first-child (or :last-child or :first-of-type or :last-of-type) 
pseudo-class but the style of such element is not recomputed when 
sibling elements are inserted or deleted.

The workaround is to manually ``refresh'' the view of the parent of such 
element using Select|Refresh.
---

That is, there is a workaround much quicker than re-applying the stylesheet.



Reply via email to