Before I can comment on your examples, I'd like to be able run them. :)

When I run the menuList demo, my html is

<li><span class="OraNav3">
<a onclick="submitForm('_idJsp3',1,{source:'_idJsp11:_idJsp12'});return false;" href="#" class="OraLink">Page 1</a></span></li>
<li><span class="OraNav3Selected">
<a onclick="submitForm('_idJsp3',1,{source:'_idJsp11:_idJsp13'});return false;" href="#" class="OraLink">Page 2</a></span></li>
<li><span class="OraNav3">
<a onclick="submitForm('_idJsp3',1,{source:'_idJsp11:_idJsp14'});return false;" href="#" class="OraLink">Page 3</a></span></li>

... you'll see there is no af_menuList_selected, etc. Do you see something 
different?
Which demo are you running?



[EMAIL PROTECTED] wrote:

Hmmm... strange... I just reproduced it using the current snapshot release on Trinidad site and the selector works "fine". Here's my skin.

.AFDefaultFont:alias {
color: inherit; font-size: 10pt;
 font-weight: inherit;
}

.AFLightBackground:alias { background-color : red;
}

af|menuList { }

af|menuList::selected { font-weight: bold;
 background-color: blue;
}

and the page:

<af:menuList listStyle="none">
 <af:commandNavigationItem text="Selected" selected="true"/>
 <af:commandNavigationItem text="Unselected"/>
</af:menuList>

You'll see that the ::selected works because of the bold font weight that will be given to the selected item. Note that if you remove the inherit from AFDefaultFont:alias, the font will no longer be bold, which is another skin/rendering bug as the af|menuList:selected class is applied on the <td> element while the default font is applied directly on the <a> and if you don't specify any weight in that font alias, you'll inherit the font-weight: normal from base skin. That very strange behavior almost drove crazy the one in charge of the skin on the project we finished 1 week ago.

With inhibit, you would have to override DefaultFont to inhibit font-weight This is much better than without the option, but I believe it will still be annoying for the end user, hence why I proposed to not inherit from parent by default. Without inherit by default, the selector would still have to be overridden, ut the user would not have to inhibit anything.

The above example is, I believe, a good example why automatically inheriting the parent's properties is not really respecting the cascading style rule. An user creating the following skin would expect to see a menuList with both items using a font-size of 10pt with the selected item being in bold with a blue background:

.AFDefaultFont:alias {
 font-size: 10pt;
}

af|menuList::selected { font-weight: bold;
 background-color: blue;
}

I'll try to post more irritating example we found out while creating our skin.

Simon Lessard
Fujitsu Consulting

Reply via email to