You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Marius Petoi (JIRA)" <de...@myfaces.apache.org> on 2010/01/08 10:25:55 UTC

[jira] Created: (TRINIDAD-1680) Introduce include-property in CSS

Introduce include-property in CSS
---------------------------------

                 Key: TRINIDAD-1680
                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1680
             Project: MyFaces Trinidad
          Issue Type: New Feature
          Components: Skinning
            Reporter: Marius Petoi
            Priority: Minor


The include-property feature is present in the XSS, but it is not supported in the CSS. With this, we are one step closer to eliminating the old XSS files and replacing them with CSS. In the XSS files, the syntax of includeProperty is:

 <!-- AFVeryDarkForeground is the darkest foreground color in the core (green)
     color ramp -->
 <style name="AFVeryDarkForeground">
  <includeProperty name="AFVeryDarkBackground"
                   propertyName="background-color"
                   localPropertyName="color"/>
 </style>

This should be ported to CSS also.

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


[jira] Commented: (TRINIDAD-1680) Introduce include-property in CSS

Posted by "Jeanne Waldman (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TRINIDAD-1680?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12851033#action_12851033 ] 

Jeanne Waldman commented on TRINIDAD-1680:
------------------------------------------

More comments:
1. In the skinning.xml file, can you explain why this would be useful to someone?
2. In purpleSkin.css, can you add more properties to the selectors to make sure they still get included?

/* test the new include property functionality */
.AFTestForegroundColor:alias {color: Red; font-style:bold;}
.AFTestBackgroundColor:alias {-tr-include-property: property(selector=".AFTestForegroundColor:alias",propertyName="color", localPropertyName="background-color"); padding: 2px; margin:5px;}

af|commandButton
{
  background-color: purple;
  -tr-include-property: property(selector=".AFTestBackgroundColor:alias",propertyName="background-color",localPropertyName="background-color");
  min-width: 100px;
  
}

> Introduce include-property in CSS
> ---------------------------------
>
>                 Key: TRINIDAD-1680
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1680
>             Project: MyFaces Trinidad
>          Issue Type: New Feature
>          Components: Skinning
>            Reporter: Marius Petoi
>            Priority: Minor
>         Attachments: includeProperty.patch, includeProperty.patch, includeProperty.patch, patchIncludeProperty.patch
>
>
> The include-property feature is present in the XSS, but it is not supported in the CSS. With this, we are one step closer to eliminating the old XSS files and replacing them with CSS. In the XSS files, the syntax of includeProperty is:
>  <!-- AFVeryDarkForeground is the darkest foreground color in the core (green)
>      color ramp -->
>  <style name="AFVeryDarkForeground">
>   <includeProperty name="AFVeryDarkBackground"
>                    propertyName="background-color"
>                    localPropertyName="color"/>
>  </style>
> This should be ported to CSS also.

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


[jira] Commented: (TRINIDAD-1680) Introduce include-property in CSS

Posted by "Jeanne Waldman (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TRINIDAD-1680?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12852157#action_12852157 ] 

Jeanne Waldman commented on TRINIDAD-1680:
------------------------------------------

I tested this with my existing skins before and after the change, and it looks good except the hashcode has changed.
I think this is because we create an includePropertyNodes List regardless of if there are properties.
For backward compatibilty sake (to keep hashcodes the same), I think we should pass in null to if IncludePropertyNode isEmpty(). 

    // create the included properties nodes.
    List<IncludePropertyNode> includePropertyNodes =
      new ArrayList<IncludePropertyNode>();
    for (String includedProperty: includedProperties)
    {
      _addIncludedProperty(includedProperty, includePropertyNodes);
    }

    // create a StyleNode
    StyleNode styleNode =
      new StyleNode(name,
                    selector,
                    propertyArray,
                    includeStyleNodes.toArray(new IncludeStyleNode[0]),
                    includePropertyNodes.toArray(new IncludePropertyNode[0]),
                    inhibitedProperties);

> Introduce include-property in CSS
> ---------------------------------
>
>                 Key: TRINIDAD-1680
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1680
>             Project: MyFaces Trinidad
>          Issue Type: New Feature
>          Components: Skinning
>            Reporter: Marius Petoi
>            Priority: Minor
>         Attachments: includeProperty.patch, includeProperty.patch, includeProperty.patch, patchIncludeProperty.patch, patchIncludeProperty.patch
>
>
> The include-property feature is present in the XSS, but it is not supported in the CSS. With this, we are one step closer to eliminating the old XSS files and replacing them with CSS. In the XSS files, the syntax of includeProperty is:
>  <!-- AFVeryDarkForeground is the darkest foreground color in the core (green)
>      color ramp -->
>  <style name="AFVeryDarkForeground">
>   <includeProperty name="AFVeryDarkBackground"
>                    propertyName="background-color"
>                    localPropertyName="color"/>
>  </style>
> This should be ported to CSS also.

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


[jira] Commented: (TRINIDAD-1680) Introduce include-property in CSS

Posted by "Marius Petoi (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TRINIDAD-1680?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12852746#action_12852746 ] 

Marius Petoi commented on TRINIDAD-1680:
----------------------------------------

Hi Jeanne,

I have sent an email with the two suggestions. Now we shall wait for people to vote.

Marius

> Introduce include-property in CSS
> ---------------------------------
>
>                 Key: TRINIDAD-1680
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1680
>             Project: MyFaces Trinidad
>          Issue Type: New Feature
>          Components: Skinning
>            Reporter: Marius Petoi
>            Priority: Minor
>         Attachments: includeProperty.patch, includeProperty.patch, includeProperty.patch, patchIncludeProperty.patch, patchIncludeProperty.patch
>
>
> The include-property feature is present in the XSS, but it is not supported in the CSS. With this, we are one step closer to eliminating the old XSS files and replacing them with CSS. In the XSS files, the syntax of includeProperty is:
>  <!-- AFVeryDarkForeground is the darkest foreground color in the core (green)
>      color ramp -->
>  <style name="AFVeryDarkForeground">
>   <includeProperty name="AFVeryDarkBackground"
>                    propertyName="background-color"
>                    localPropertyName="color"/>
>  </style>
> This should be ported to CSS also.

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


[jira] Commented: (TRINIDAD-1680) Introduce include-property in CSS

Posted by "Jeanne Waldman (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TRINIDAD-1680?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12852666#action_12852666 ] 

Jeanne Waldman commented on TRINIDAD-1680:
------------------------------------------

Marius, A coworker had different suggestions for the API. Since this will be a public API, I think we should make sure enough people are on board. One of us should send an email with NEW SKINNING API in the subject. And then we can all give our suggestions and vote.

> Introduce include-property in CSS
> ---------------------------------
>
>                 Key: TRINIDAD-1680
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1680
>             Project: MyFaces Trinidad
>          Issue Type: New Feature
>          Components: Skinning
>            Reporter: Marius Petoi
>            Priority: Minor
>         Attachments: includeProperty.patch, includeProperty.patch, includeProperty.patch, patchIncludeProperty.patch, patchIncludeProperty.patch
>
>
> The include-property feature is present in the XSS, but it is not supported in the CSS. With this, we are one step closer to eliminating the old XSS files and replacing them with CSS. In the XSS files, the syntax of includeProperty is:
>  <!-- AFVeryDarkForeground is the darkest foreground color in the core (green)
>      color ramp -->
>  <style name="AFVeryDarkForeground">
>   <includeProperty name="AFVeryDarkBackground"
>                    propertyName="background-color"
>                    localPropertyName="color"/>
>  </style>
> This should be ported to CSS also.

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


[jira] Commented: (TRINIDAD-1680) Introduce include-property in CSS

Posted by "Jeanne Waldman (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TRINIDAD-1680?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12851027#action_12851027 ] 

Jeanne Waldman commented on TRINIDAD-1680:
------------------------------------------

Hi,
The coding style is Code Style: JDeveloper Classic, Indentation Size/Tab Size 2, no tabs.
Put the arguments of a method on their own line, indented from the start of the file.

When I applied your patch, I saw a lot of differences in styling. I was expecting only differences in the lines of code you changed.
For example, in the original file, the parameters are like this
  static public StyleSheetEntry parseCSSSource(
    ParseContext  context,
    NameResolver  resolver,
    String        sourceName,
    Class<?>      expectedType) throws IOException

and in yours it is like:
  static public StyleSheetEntry parseCSSSource(ParseContext context,
                                               NameResolver resolver,
                                               String sourceName,
                                               Class<?> expectedType)
    throws IOException

I also saw some of the imports reordered. We like to have them in alphabetical order.
I see import org.apache.myfaces.trinidadinternal.style.util.CSSUtils;
import org.apache.myfaces.trinidadinternal.style.util.StyleUtils;
have been moved before style.xml to after.

- Jeanne

I wonder if you selected 'Reformat' to reformat the file?

> Introduce include-property in CSS
> ---------------------------------
>
>                 Key: TRINIDAD-1680
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1680
>             Project: MyFaces Trinidad
>          Issue Type: New Feature
>          Components: Skinning
>            Reporter: Marius Petoi
>            Priority: Minor
>         Attachments: includeProperty.patch, includeProperty.patch, includeProperty.patch, patchIncludeProperty.patch
>
>
> The include-property feature is present in the XSS, but it is not supported in the CSS. With this, we are one step closer to eliminating the old XSS files and replacing them with CSS. In the XSS files, the syntax of includeProperty is:
>  <!-- AFVeryDarkForeground is the darkest foreground color in the core (green)
>      color ramp -->
>  <style name="AFVeryDarkForeground">
>   <includeProperty name="AFVeryDarkBackground"
>                    propertyName="background-color"
>                    localPropertyName="color"/>
>  </style>
> This should be ported to CSS also.

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


[jira] Commented: (TRINIDAD-1680) Introduce include-property in CSS

Posted by "Jeanne Waldman (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TRINIDAD-1680?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12852039#action_12852039 ] 

Jeanne Waldman commented on TRINIDAD-1680:
------------------------------------------

I took a quick look at the diffs, and it doesn't look like you are doing the merging. So maybe this is an existing bug?

> Introduce include-property in CSS
> ---------------------------------
>
>                 Key: TRINIDAD-1680
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1680
>             Project: MyFaces Trinidad
>          Issue Type: New Feature
>          Components: Skinning
>            Reporter: Marius Petoi
>            Priority: Minor
>         Attachments: includeProperty.patch, includeProperty.patch, includeProperty.patch, patchIncludeProperty.patch, patchIncludeProperty.patch
>
>
> The include-property feature is present in the XSS, but it is not supported in the CSS. With this, we are one step closer to eliminating the old XSS files and replacing them with CSS. In the XSS files, the syntax of includeProperty is:
>  <!-- AFVeryDarkForeground is the darkest foreground color in the core (green)
>      color ramp -->
>  <style name="AFVeryDarkForeground">
>   <includeProperty name="AFVeryDarkBackground"
>                    propertyName="background-color"
>                    localPropertyName="color"/>
>  </style>
> This should be ported to CSS also.

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


[jira] Commented: (TRINIDAD-1680) Introduce include-property in CSS

Posted by "Matthias Weßendorf (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TRINIDAD-1680?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12840075#action_12840075 ] 

Matthias Weßendorf commented on TRINIDAD-1680:
----------------------------------------------

the code should be formarted as the other Trinidad code does; requiring some JDEV specific formating seems wrong for an Apache project.

In there we use two spaces, not four. no TAB etc.

In your patch:
https://issues.apache.org/jira/secure/attachment/12437587/includeProperty.patch

I see this:
+af|commandButton {
+    -tr-include-property: property(selector=".AFTestBackgroundColor:alias",propertyName="background-color",localPropertyName="background-color");
+}

which uses 4 spaces.

the file in question (in SVN) is doing this:
af|panelTabbed::orientation-bottom
{
  border-top: 3px solid black;
}

which is "just" two spaces.


Ideally we have check-style for all kind of formats. Otherwise we can't control the format of patches... and denying patches just b/c of formarting issues is IMO wrong, especially when there is no check-style at all :-)

> Introduce include-property in CSS
> ---------------------------------
>
>                 Key: TRINIDAD-1680
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1680
>             Project: MyFaces Trinidad
>          Issue Type: New Feature
>          Components: Skinning
>            Reporter: Marius Petoi
>            Priority: Minor
>         Attachments: includeProperty.patch, includeProperty.patch, patchIncludeProperty.patch
>
>
> The include-property feature is present in the XSS, but it is not supported in the CSS. With this, we are one step closer to eliminating the old XSS files and replacing them with CSS. In the XSS files, the syntax of includeProperty is:
>  <!-- AFVeryDarkForeground is the darkest foreground color in the core (green)
>      color ramp -->
>  <style name="AFVeryDarkForeground">
>   <includeProperty name="AFVeryDarkBackground"
>                    propertyName="background-color"
>                    localPropertyName="color"/>
>  </style>
> This should be ported to CSS also.

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


[jira] Updated: (TRINIDAD-1680) Introduce include-property in CSS

Posted by "Jeanne Waldman (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/TRINIDAD-1680?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jeanne Waldman updated TRINIDAD-1680:
-------------------------------------

           Status: Resolved  (was: Patch Available)
    Fix Version/s: 2.0.0.3-core
       Resolution: Fixed

> Introduce include-property in CSS
> ---------------------------------
>
>                 Key: TRINIDAD-1680
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1680
>             Project: MyFaces Trinidad
>          Issue Type: New Feature
>          Components: Skinning
>            Reporter: Marius Petoi
>            Assignee: Jeanne Waldman
>            Priority: Minor
>             Fix For: 2.0.0.3-core
>
>         Attachments: includeProperty.patch, includeProperty.patch, includeProperty.patch, patchIncludeProperty.patch, patchIncludeProperty.patch, patchIncludeProperty.patch, patchIncludePropertyMinorChanges.patch
>
>
> The include-property feature is present in the XSS, but it is not supported in the CSS. With this, we are one step closer to eliminating the old XSS files and replacing them with CSS. In the XSS files, the syntax of includeProperty is:
>  <!-- AFVeryDarkForeground is the darkest foreground color in the core (green)
>      color ramp -->
>  <style name="AFVeryDarkForeground">
>   <includeProperty name="AFVeryDarkBackground"
>                    propertyName="background-color"
>                    localPropertyName="color"/>
>  </style>
> This should be ported to CSS also.

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


[jira] Commented: (TRINIDAD-1680) Introduce include-property in CSS

Posted by "Jeanne Waldman (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TRINIDAD-1680?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12851694#action_12851694 ] 

Jeanne Waldman commented on TRINIDAD-1680:
------------------------------------------

Hi,
In the interest of time, I'll make these small updates.
I took the java file and reverted all the code that you have not changed back to the original format. The format of your new code looks fine.
Thanks,
Jeanne

> Introduce include-property in CSS
> ---------------------------------
>
>                 Key: TRINIDAD-1680
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1680
>             Project: MyFaces Trinidad
>          Issue Type: New Feature
>          Components: Skinning
>            Reporter: Marius Petoi
>            Priority: Minor
>         Attachments: includeProperty.patch, includeProperty.patch, includeProperty.patch, patchIncludeProperty.patch
>
>
> The include-property feature is present in the XSS, but it is not supported in the CSS. With this, we are one step closer to eliminating the old XSS files and replacing them with CSS. In the XSS files, the syntax of includeProperty is:
>  <!-- AFVeryDarkForeground is the darkest foreground color in the core (green)
>      color ramp -->
>  <style name="AFVeryDarkForeground">
>   <includeProperty name="AFVeryDarkBackground"
>                    propertyName="background-color"
>                    localPropertyName="color"/>
>  </style>
> This should be ported to CSS also.

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


[jira] Updated: (TRINIDAD-1680) Introduce include-property in CSS

Posted by "Marius Petoi (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/TRINIDAD-1680?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marius Petoi updated TRINIDAD-1680:
-----------------------------------

    Status: Patch Available  (was: Open)

> Introduce include-property in CSS
> ---------------------------------
>
>                 Key: TRINIDAD-1680
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1680
>             Project: MyFaces Trinidad
>          Issue Type: New Feature
>          Components: Skinning
>            Reporter: Marius Petoi
>            Priority: Minor
>
> The include-property feature is present in the XSS, but it is not supported in the CSS. With this, we are one step closer to eliminating the old XSS files and replacing them with CSS. In the XSS files, the syntax of includeProperty is:
>  <!-- AFVeryDarkForeground is the darkest foreground color in the core (green)
>      color ramp -->
>  <style name="AFVeryDarkForeground">
>   <includeProperty name="AFVeryDarkBackground"
>                    propertyName="background-color"
>                    localPropertyName="color"/>
>  </style>
> This should be ported to CSS also.

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


[jira] Commented: (TRINIDAD-1680) Introduce include-property in CSS

Posted by "Jeanne Waldman (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TRINIDAD-1680?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12852031#action_12852031 ] 

Jeanne Waldman commented on TRINIDAD-1680:
------------------------------------------

Thanks. This is formatted well, but unfortunately when I ran the test case it didn't work.
I ran the panelPageSkinDemo.jspx in purple mode. I looked at the generated css file and I see:
.af_commandButton,.af_goButton,.af_resetButton {font-family:Arial,Helvetica,Geneva,sans-serif;font-size:10pt;font-weight:normal;white-space:nowrap;background-color:Red;max-width:100px;color:white}

So you see that the background-color:Red is being applied to af|goButton and af|resetButton as well, which is not right. It looks like the merging is not working correctly.

For skinning changes, it's a good idea to save off the generated css file before your changes and then after your changes and compare the result.



> Introduce include-property in CSS
> ---------------------------------
>
>                 Key: TRINIDAD-1680
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1680
>             Project: MyFaces Trinidad
>          Issue Type: New Feature
>          Components: Skinning
>            Reporter: Marius Petoi
>            Priority: Minor
>         Attachments: includeProperty.patch, includeProperty.patch, includeProperty.patch, patchIncludeProperty.patch, patchIncludeProperty.patch
>
>
> The include-property feature is present in the XSS, but it is not supported in the CSS. With this, we are one step closer to eliminating the old XSS files and replacing them with CSS. In the XSS files, the syntax of includeProperty is:
>  <!-- AFVeryDarkForeground is the darkest foreground color in the core (green)
>      color ramp -->
>  <style name="AFVeryDarkForeground">
>   <includeProperty name="AFVeryDarkBackground"
>                    propertyName="background-color"
>                    localPropertyName="color"/>
>  </style>
> This should be ported to CSS also.

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


[jira] Commented: (TRINIDAD-1680) Introduce include-property in CSS

Posted by "Marius Petoi (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TRINIDAD-1680?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12840081#action_12840081 ] 

Marius Petoi commented on TRINIDAD-1680:
----------------------------------------

Hi Jeanne,

I reformatted the code with the JDeveloper Classic code style. Hopefully, this is the one you are using in Trinidad. If not...tell what to modify in it (I see that is very similar to the way the code in Trinidad is formatted). Also I added an example in purpleSkin.css, as you suggested. The reason it didn't work for you was that you left an empty space between "background-color", and localPropertyName. I modified the code so that empty spaces are skipped.

Marius

> Introduce include-property in CSS
> ---------------------------------
>
>                 Key: TRINIDAD-1680
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1680
>             Project: MyFaces Trinidad
>          Issue Type: New Feature
>          Components: Skinning
>            Reporter: Marius Petoi
>            Priority: Minor
>         Attachments: includeProperty.patch, includeProperty.patch, patchIncludeProperty.patch
>
>
> The include-property feature is present in the XSS, but it is not supported in the CSS. With this, we are one step closer to eliminating the old XSS files and replacing them with CSS. In the XSS files, the syntax of includeProperty is:
>  <!-- AFVeryDarkForeground is the darkest foreground color in the core (green)
>      color ramp -->
>  <style name="AFVeryDarkForeground">
>   <includeProperty name="AFVeryDarkBackground"
>                    propertyName="background-color"
>                    localPropertyName="color"/>
>  </style>
> This should be ported to CSS also.

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


[jira] Commented: (TRINIDAD-1680) Introduce include-property in CSS

Posted by "Marius Petoi (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TRINIDAD-1680?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12840070#action_12840070 ] 

Marius Petoi commented on TRINIDAD-1680:
----------------------------------------

Hi Jeanne,

I reformatted the code with the JDeveloper Classic code style. Hopefully, this is the one you are using in Trinidad. If not...tell what to modify in it (I see that is very similar to the way the code in Trinidad is formatted). Also I added an example in purpleSkin.css, as you suggested. The reason it didn't work for you was that you left an empty space between "background-color", and localPropertyName. I modified the code so that empty spaces are skipped.

Marius

> Introduce include-property in CSS
> ---------------------------------
>
>                 Key: TRINIDAD-1680
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1680
>             Project: MyFaces Trinidad
>          Issue Type: New Feature
>          Components: Skinning
>            Reporter: Marius Petoi
>            Priority: Minor
>         Attachments: includeProperty.patch, includeProperty.patch, patchIncludeProperty.patch
>
>
> The include-property feature is present in the XSS, but it is not supported in the CSS. With this, we are one step closer to eliminating the old XSS files and replacing them with CSS. In the XSS files, the syntax of includeProperty is:
>  <!-- AFVeryDarkForeground is the darkest foreground color in the core (green)
>      color ramp -->
>  <style name="AFVeryDarkForeground">
>   <includeProperty name="AFVeryDarkBackground"
>                    propertyName="background-color"
>                    localPropertyName="color"/>
>  </style>
> This should be ported to CSS also.

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


[jira] Commented: (TRINIDAD-1680) Introduce include-property in CSS

Posted by "Jeanne Waldman (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TRINIDAD-1680?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12852061#action_12852061 ] 

Jeanne Waldman commented on TRINIDAD-1680:
------------------------------------------

I see this in base-desktop.xss, so we are probably ok since this explains why the goButton and resetButton get the same styling as commandButton. I'll do some more testing.
  <style selector="af|commandButton">
    <includeStyle name="AFDefaultFont"/>
    <property name="white-space">nowrap</property>
  </style>

  <style selector="af|goButton">
    <!-- make commandButton primary -->
    <includeStyle selector="af|commandButton"/>
  </style>

  <style selector="af|resetButton">
    <!-- make commandButton primary -->
    <includeStyle selector="af|commandButton"/>
  </style>

> Introduce include-property in CSS
> ---------------------------------
>
>                 Key: TRINIDAD-1680
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1680
>             Project: MyFaces Trinidad
>          Issue Type: New Feature
>          Components: Skinning
>            Reporter: Marius Petoi
>            Priority: Minor
>         Attachments: includeProperty.patch, includeProperty.patch, includeProperty.patch, patchIncludeProperty.patch, patchIncludeProperty.patch
>
>
> The include-property feature is present in the XSS, but it is not supported in the CSS. With this, we are one step closer to eliminating the old XSS files and replacing them with CSS. In the XSS files, the syntax of includeProperty is:
>  <!-- AFVeryDarkForeground is the darkest foreground color in the core (green)
>      color ramp -->
>  <style name="AFVeryDarkForeground">
>   <includeProperty name="AFVeryDarkBackground"
>                    propertyName="background-color"
>                    localPropertyName="color"/>
>  </style>
> This should be ported to CSS also.

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


[jira] Commented: (TRINIDAD-1680) Introduce include-property in CSS

Posted by "Marius Petoi (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TRINIDAD-1680?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12840079#action_12840079 ] 

Marius Petoi commented on TRINIDAD-1680:
----------------------------------------

Hi Jeanne,

I reformatted the code with the JDeveloper Classic code style. Hopefully, this is the one you are using in Trinidad. If not...tell what to modify in it (I see that is very similar to the way the code in Trinidad is formatted). Also I added an example in purpleSkin.css, as you suggested. The reason it didn't work for you was that you left an empty space between "background-color", and localPropertyName. I modified the code so that empty spaces are skipped.

Marius

> Introduce include-property in CSS
> ---------------------------------
>
>                 Key: TRINIDAD-1680
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1680
>             Project: MyFaces Trinidad
>          Issue Type: New Feature
>          Components: Skinning
>            Reporter: Marius Petoi
>            Priority: Minor
>         Attachments: includeProperty.patch, includeProperty.patch, patchIncludeProperty.patch
>
>
> The include-property feature is present in the XSS, but it is not supported in the CSS. With this, we are one step closer to eliminating the old XSS files and replacing them with CSS. In the XSS files, the syntax of includeProperty is:
>  <!-- AFVeryDarkForeground is the darkest foreground color in the core (green)
>      color ramp -->
>  <style name="AFVeryDarkForeground">
>   <includeProperty name="AFVeryDarkBackground"
>                    propertyName="background-color"
>                    localPropertyName="color"/>
>  </style>
> This should be ported to CSS also.

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


[jira] Commented: (TRINIDAD-1680) Introduce include-property in CSS

Posted by "Jeanne Waldman (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TRINIDAD-1680?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12836942#action_12836942 ] 

Jeanne Waldman commented on TRINIDAD-1680:
------------------------------------------

A couple things are needed before I review.
1. This code needs to be formatted. } are on their own line. No tabs, 2 spaces per 'tab' instead. Looking at this in JDeveloper the indents seem to be all over the place. You can download JDeveloper for free here: http://www.oracle.com/technology/software/products/jdev/index.html. You can set up the code format. I can help you if you decide to use JDev.
2. Please provide a test case. For example, you can add selectors to purpleSkin.css, like this, to prove that this works.
/* test the new include property functionality */
.AFTestForegroundColor:alias {color: Lime;}
.AFTestBackgroundColor:alias {-tr-include-property: property(selector=".AFTestForegroundColor:alias",propertyName="color", localPropertyName="background-color")}
af|testBackgroundColor {-tr-include-property: property(selector=".AFTestForegroundColor:alias",propertyName="color", localPropertyName="background-color")}
/* this should be color: lime */
af|testColor {-tr-include-property: property(selector=".AFTestBackgroundColor:alias",propertyName="background-color", localPropertyName="color")}

(my initial tests made me believe this is not working, but I'll look closer once you have reformatted, etc)



> Introduce include-property in CSS
> ---------------------------------
>
>                 Key: TRINIDAD-1680
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1680
>             Project: MyFaces Trinidad
>          Issue Type: New Feature
>          Components: Skinning
>            Reporter: Marius Petoi
>            Priority: Minor
>         Attachments: includeProperty.patch, patchIncludeProperty.patch
>
>
> The include-property feature is present in the XSS, but it is not supported in the CSS. With this, we are one step closer to eliminating the old XSS files and replacing them with CSS. In the XSS files, the syntax of includeProperty is:
>  <!-- AFVeryDarkForeground is the darkest foreground color in the core (green)
>      color ramp -->
>  <style name="AFVeryDarkForeground">
>   <includeProperty name="AFVeryDarkBackground"
>                    propertyName="background-color"
>                    localPropertyName="color"/>
>  </style>
> This should be ported to CSS also.

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