a couple comments inline...

Joseph Rozier wrote:

Hi, Jeanne,

I've got some comments inline...

On 8/23/06, Jeanne Waldman <[EMAIL PROTECTED]> wrote:

Hi Joey,
We have simple-desktop and simple-pda skins.
You can create a pda or desktop skin by specifying the render-kit-id in
your skin.
The pda skin extends simple-pda skin. The desktop skin extends
simple-desktop.

You created a plus-desktop skin that extends simple-desktop skin.
You like that skin a lot and it has a lot of definitions. Now you need a
pda version.
You want to use the plus-desktop skin, but you want it to extend
simple-pda instead.


Well, if I create a skin in trinidad-skins.xml for the pda renderkit
but use the same plus-desktop.css file I use for the desktop
renderkit, then it extends simple-pda.  The problem is that the
plus-desktop.css file might have overwritten some of the PDA specific
properties from simple-pda.  For example, simple-pda.xss specifies
AFDefaultFont as "font-size: 9px", but plus-desktop specifies
AFDefaultFont as "font-size: 11px".

If you make your plus-pda skin extend plus-desktop skin, it will go through
simple-desktop. (you've verified this, right?)


I didn't think it was possible for one skin to extend another in that
way--I thought they could only extend from simple-pda/simple-desktop
currently.  Is that not the case?

This was the way it used to be a long time ago. Go ahead and try it.


What I have tried is what I described above (creating the skin
declaratively in trinidad-skins.xml for the PDA RenderKit), and in
that case the skin extended simple-pda, not simple-desktop.

You don't want that. You want your plus-pda skin to extend
plus-desktop skin, but then you want that to go through simple-pda
instead of simple-desktop.


It's not just that I want it to use simple-pda.  Say I have my
plus-desktop.css extending from simple-pda.  Now, my plus-desktop.css
defines an AFDefaultFont size (geared towards replacing the
AFDefaultFont size specified in simple-desktop), so that overwrites
the AFDefaultFont size that I specified in simple-pda.

To fix this, I'd like to have either:

1) a way to overwrite this AFDefaultFontSize in a plus-pda.css that
extends plus-desktop.css OR
2) a plus-generic.css that doesn't specify an AFDefaultFontSize (but
specifies all style info that is common to pda&desktop) and then
plus-desktop.css and plus-pda.css that specifies only those features
that each needs to def

I've thought about this some and I think we need a concept of a
render-kit-neutral skin.
This skin, if picked, will default to extend simple-desktop.

But if this skin is used as a base skin for plus-pda, it will eventually
extend from simple-pda (the
simple skin with the same render-kit-it).

Another option is to allow imports in the skinning .css file. So you can
import the stylesheet definitions.
We have this feature in XSS, which is why you see  simple-pda.xss
imports simple-desktop.xss.

I like the 'abstract' skin idea better. Resource bundles aren't a part
of the css file, and you might
want to inherit those, too.


These are interesting ideas.  Would it be possible to have both? :)

I'm thinking now that since .xss has imports, the code is probably there to allow the skinning .css file to have imports pretty easily as well. I'd go this route first,
before I'd do the abstract skin idea.


I don't know how hard/easy it is to implement these ideas.

One question, how much will need to change if you forget extending
simple-pda, and have your
plus-pda skin extend plus-desktop which extends simple-desktop? If it is
just a few fonts, then it might easy enough
to go that route until we have something in place.


I haven't looked into this in detail, but my gut tells me that
plus-pda will likely contain much of what simple-pda contains (as an
attempt to overwrite the properties set in plus-desktop).  If there is
a way for a plus-pda to extend plus-desktop which extends
simple-desktop (or simple-pda), then that would likely give me what I
need for now.



Joseph Rozier wrote:

> Hello,
>
> The current method of skin inheritance leads to some issues when a
> developer wishes to create a skin family targetting desktop and PDA.
>
> There's no way to make a large number of changes that affect both
> desktop and pda in one place, and then tweak what needs to be tweaked
> for desktop or PDA.  For example, I may want to change the color in
> both desktop and PDA, but I might want to change the font size to 20
> for the desktop and 6 for the PDA.
>
> The reason for the problem is that each skin can only extend
> Trinidad's simple skin.  There is no way to have an abstract "plus
> skin" that makes the common changes, and then have a "plus-desktop
> skin" and "plus-pda skin" that makes desktop/pda specific changes.

>
> (Also note that today things are a bit odder, because there's a
> simple-pda.xss that extends simple-desktop.xss.  If I specify a skin
> in trinidad-skins.xml that is for use with the desktop RenderKit, its
> css inherits from simple-desktop.xss.  If I instead specify its use
> for the pda RenderKit, its css inherits from simple-pda.xss.  However,
> this doesn't lead to a solution because my plus.css may override a
> font that is specified in simple-desktop.xss or simple-pda.xss, so
> that font would now be used on both desktop and pda.)
>
> I'm hoping that the skinning experts can provide insights/solutions to
> this problem.
>
> Thanks,
>
> Joey
>




Reply via email to