You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Jeanne Waldman (JIRA)" <de...@myfaces.apache.org> on 2008/10/14 20:37:44 UTC

[jira] Commented: (TRINIDAD-636) Skinning an icon does not pick up base skin's non-overridden properties

    [ https://issues.apache.org/jira/browse/TRINIDAD-636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12639528#action_12639528 ] 

Jeanne Waldman commented on TRINIDAD-636:
-----------------------------------------

>From my initial investigation, his is a really hard one to fix because the Icon APIs were not written to do
this. Originally the style selectors were in an .xss file (Oracle's own
css-type file) and the icons were registered separately. The style selectors
are all in the StyleSheetDocument object, whereas only the icons that are
defined in a skin css file are in the StyleSheetDocument (confusing!) and the
other icons are registered on the Skin object directly. The IconNode nor the Icon APIs
currently have property information. Icons hold 'inlineStyle' information.


The entire Icon framework in the skinning framework would have to be
rewritten, but we probably have to keep the 'registerIcon' API on the Skin
since that is a public API.


One idea:
1. beef up IconNode to hold the properties, and maybe other things like
includes so that -tr-rule-ref will work like it does with styles.
2. figure out when a good time to 'merge' icons together is. For styles, we
do this in FileSystemStyleCache->StyleSheetDocument's resolveStyles. For
icons, we only have the icons that were in the skin css file at this point.
We would have to also get all the icons from the skin and all the base skins
and merge them together and put them into the StyleSheetDocument. Then when
we getIcon, we'll get it from the StyleSheetDocument, and not the Skin, like
we do now.

> Skinning an icon does not pick up base skin's non-overridden properties
> -----------------------------------------------------------------------
>
>                 Key: TRINIDAD-636
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-636
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>          Components: Skinning
>            Reporter: Jeanne Waldman
>            Priority: Minor
>
> Skinning an icon does not pick up base skin's non-overridden properties.
> Skinning a style does pick up the base skin's non-overridden properties.
> This is inconsistent.
> Let's say the purple skin has this in it:
> af|selectOrderShuttle::reorder-up-icon {
> 	content: url(/skins/purple/images/shuttleOrderUp.png);
> 	width: 16px;
> 	height: 16px;
>   border: 2px black solid;
> }
> And the skin writer wants to override the icon. He'd probably do this:
> af|selectOrderShuttle::reorder-up-icon {
> 	content: url(/skins/purple/images/prev.png);
> }
> and the skin writer would expect the width/height/border to be picked up as they do when you skin "styles".
> What actually happens, however, that the icon is overridden completely. None of the base skin's icon's non-overridden attributes are picked up.
> The styles and the icons should work consistently. Everyone is familiar with how you extend styles, so icons should work the same way.
> I know this is not a simple task to implement, and it isn't critical to fix, but it should be tracked.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.