[richfaces-issues] [JBoss JIRA] (RF-11741) ECSS parser is too aggressive when encountering non-standard CSS properties: selector omitted entirely

Jiří Štefek (JIRA) issues at jboss.org
Wed Jun 25 09:35:25 EDT 2014


     [ https://issues.jboss.org/browse/RF-11741?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jiří Štefek reopened RF-11741:
------------------------------

      Assignee: Brian Leathem


[~bleathem], I have added a reproducer to Metamer. I used the same ecss as in decription:
{code}
.shadow
{
    -webkit-box-shadow: 4px 4px 5px '#{richSkin.additionalBackgroundColor}';
    -moz-box-shadow: 4px 4px 5px '#{richSkin.additionalBackgroundColor}';
    box-shadow: 4px 4px 5px '#{richSkin.additionalBackgroundColor}';
}
{code}
At the end (accessible from browser) the css looked like this:
{code}
*.shadow {
	-webkit-box-shadow: 4px 4px 5px "#ECF4FE";
	-moz-box-shadow: 4px 4px 5px "#ECF4FE";
	box-shadow: 4px 4px 5px "#ECF4FE";
}
{code}
In the result, this ecss file will not work because of the inserted {{""}} to the css file. Is there any way how to prevent inserting of these quotation marks?

Verified in 4.5 Metamer on FF 30, Chrome 35 and on EAP 6.3.0.ER8.
-----
Just to verify, I have also tried to hardcode the same values without the quotation marks in the ecss, like this:
{code}
.shadow{
    -webkit-box-shadow: 40px 40px 50px #ECF4FE;
    -moz-box-shadow: 40px 40px 50px #ECF4FE;
    box-shadow: 40px 40px 50px #ECF4FE;
}
{code}
The panel had the shadow and the final css was:
{code}
*.shadow {
	-webkit-box-shadow: 40px 40px 50px rgb(236, 244, 254);
	-moz-box-shadow: 40px 40px 50px rgb(236, 244, 254);
	box-shadow: 40px 40px 50px rgb(236, 244, 254);
}
{code}

The Metamer sample is accessible from http://localhost:8080/metamer/faces/components/skinning/rf-11741.xhtml.
If this cannot be fixed, please resolve and close this issue.

> ECSS parser is too aggressive when encountering non-standard CSS properties: selector omitted entirely
> ------------------------------------------------------------------------------------------------------
>
>                 Key: RF-11741
>                 URL: https://issues.jboss.org/browse/RF-11741
>             Project: RichFaces
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: skinning
>    Affects Versions: 4.1.0.CR1
>            Reporter: Karsten Wutzke
>            Assignee: Brian Leathem
>              Labels: ecss, parsing, skinning
>             Fix For: 4.5.0.Alpha3
>
>
> When defining rules like
> {code}
> .shadow
> {
>     -webkit-box-shadow: 4px 4px 5px '#{richSkin.additionalBackgroundColor}';
>     -moz-box-shadow: 4px 4px 5px '#{richSkin.additionalBackgroundColor}';
>     box-shadow: 4px 4px 5px '#{richSkin.additionalBackgroundColor}';
> }
> {code}
> in an ECSS file to create skin-dependent drop shadows, RF 4 will omit the above rule entirely and no shadows will be rendered. BTW it would be better to just omit the invalid properties instead of the entire selector (box-shadow: ... alone works).
> Most browsers don't support the box-shadow yet, so defining proprietary properties *must* be possible. Note, this applies to a lot more properties than the above.



--
This message was sent by Atlassian JIRA
(v6.2.6#6264)



More information about the richfaces-issues mailing list