You are viewing a plain text version of this content. The canonical link for it is here.
Posted to adffaces-dev@incubator.apache.org by Jeanne Waldman <je...@oracle.com> on 2006/12/27 23:33:38 UTC

[Skinning Enhancement] -tr-icon-class or equivalent

Hi there,

I see the need to render
<img class="someClass" width="10" height="8"/>
when we render a skinning icon.

However, there is currently not a way to specify a styleclass in the 
skin css file, although we do have a Java API to do this.

We could do something like:

af|foo::some-icon {
    content: url(/path/cat.gif);
    -tr-icon-class: someClass;
}

Let me know if you think I should/shouldn't open an JIRA enhancement for 
this.

This isn't a critical bug, since the workaround is to use css properties 
inline, and we parse those up and render an inline style property like this:

af|foo::some-icon {
    content: url(/path/cat.gif);
    background-color: blue;
    display: block;
}
renders:
<img style="background-color:blue; display:block" .../>
(or should... there's a bug that I filed that I plan to fix where it 
only renders the last css property.)

Thanks,
Jeanne


Re: [Skinning Enhancement] -tr-icon-class or equivalent

Posted by Jeanne Waldman <je...@oracle.com>.
Thanks for the comment. I'll fix that bug so the workaround works. :)

- Jeanne

Adam Winer wrote:

> I think, for now, that I'm OK with just requiring inline specification
> of the styles - that feels a lot more natural in a CSS file.
> At least, as long as it works. :)
>
> -- Adam
>
>
>
> On 12/27/06, Jeanne Waldman <je...@oracle.com> wrote:
>
>> Hi there,
>>
>> I see the need to render
>> <img class="someClass" width="10" height="8"/>
>> when we render a skinning icon.
>>
>> However, there is currently not a way to specify a styleclass in the
>> skin css file, although we do have a Java API to do this.
>>
>> We could do something like:
>>
>> af|foo::some-icon {
>>     content: url(/path/cat.gif);
>>     -tr-icon-class: someClass;
>> }
>>
>> Let me know if you think I should/shouldn't open an JIRA enhancement for
>> this.
>>
>> This isn't a critical bug, since the workaround is to use css properties
>> inline, and we parse those up and render an inline style property 
>> like this:
>>
>> af|foo::some-icon {
>>     content: url(/path/cat.gif);
>>     background-color: blue;
>>     display: block;
>> }
>> renders:
>> <img style="background-color:blue; display:block" .../>
>> (or should... there's a bug that I filed that I plan to fix where it
>> only renders the last css property.)
>>
>> Thanks,
>> Jeanne
>>
>>
>


Re: [Skinning Enhancement] -tr-icon-class or equivalent

Posted by Adam Winer <aw...@gmail.com>.
I think, for now, that I'm OK with just requiring inline specification
of the styles - that feels a lot more natural in a CSS file.
At least, as long as it works. :)

-- Adam



On 12/27/06, Jeanne Waldman <je...@oracle.com> wrote:
> Hi there,
>
> I see the need to render
> <img class="someClass" width="10" height="8"/>
> when we render a skinning icon.
>
> However, there is currently not a way to specify a styleclass in the
> skin css file, although we do have a Java API to do this.
>
> We could do something like:
>
> af|foo::some-icon {
>     content: url(/path/cat.gif);
>     -tr-icon-class: someClass;
> }
>
> Let me know if you think I should/shouldn't open an JIRA enhancement for
> this.
>
> This isn't a critical bug, since the workaround is to use css properties
> inline, and we parse those up and render an inline style property like this:
>
> af|foo::some-icon {
>     content: url(/path/cat.gif);
>     background-color: blue;
>     display: block;
> }
> renders:
> <img style="background-color:blue; display:block" .../>
> (or should... there's a bug that I filed that I plan to fix where it
> only renders the last css property.)
>
> Thanks,
> Jeanne
>
>