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

Jeanne Waldman commented on TRINIDAD-17:
----------------------------------------

I started working on this and I've hit a snag.

The snag is that if someone defined a selector that ended in -icon or
Icon:alias, but there was no 'content', we created a StyleNode instead of an
IconNode.

This was to be 'nice' to those who didn't know the rule that if it ended in 
-icon it is an Icon object. Really we should have not done this. The reason is 
that now the selector may not have the 'content' css property because it has  
included another selector which does with -tr-rule=ref. We won't know whether 
it is really an icon or a style in SkinStyleSheetParserUtils where we create 
IconNodes or StyleNodes.

How do I decide now if something is NOT an icon?

1. if no content and no include that ends in 'icon', it is a STYLE. We should
still warn them that they should not be calling their style selector an
'icon'.


2. if no content and an include that ends in 'icon'.
   2a. This could still be a style since we don't know at this pt if this
include has a content without resolving all the nodes. If everyone followed
the rules, this will be an ICON.

   We can create both icon and style nodes. But we will have bogus styles in
our css unless we somehow fix this.

ideas:
During resolving of the style, if we see that it has an included style, and
that style ends in -icon, and it cannot be found (because it was a legitimate
icon, and thus no style was created), then we can delete this StyleNode, and
log an info that it is not a style.

During IconNode creation, we resolve the included Icons to see if it contains
a 'content'. This might happen in a base skin, though, so we wouldn't know.


> Need to support mapping icons via -tr-rule-ref like we do with styles.
> ----------------------------------------------------------------------
>
>                 Key: TRINIDAD-17
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-17
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>          Components: Skinning
>    Affects Versions: 1.2.1-core
>         Environment: Windows.
>            Reporter: Bill Baggett
>
> Trinidad skinning supports mapping styles in a css file via the -tr-rule-ref. 
>  But, it doesn't support mapping icons this way.  We need to support this.

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

Reply via email to