← Back to team overview

launchpad-dev team mailing list archive

Re: Third party JavaScript parts + skinning (No bikeshed, real question)

 

On Mon, Feb 14, 2011 at 11:16 AM, Francis J. Lacoste
<francis.lacoste@xxxxxxxxxxxxx> wrote:
> On February 11, 2011, Brad Crittenden wrote:
>> On a related topic, the new widget I've added needs to have a new skin
>> created to match Launchpad's style.  I understand the YUI2 calendar widget
>> we use was "re-skinned" by editing the default "sam" skin in place, which
>> was expedient but not really skinning and may present maintenance issues
>> if the widget were being actively developed.  I'd like to create a 'lp'
>> skin for the new widget as it looks straightforward unless there is a good
>> reason not to.
>
> In principle that sounds nice, but in practice there might be problems. There
> were at least in the past, which made us do it that way.
>
> Sam is the skin we are customizing for all YUI widgets. I'm not sure getting a
> specific widget to use a different skin is implemented at all (or if
> implemented, tested and working).
>
> I'd suggest you try it out, but if takes you more than 30 minutes to get it
> working, assume it's not and go with adding sam stylesheets CSS.

I just chatted with Francis about this and agree with his advice here.
 If it works, it should be obvious after a few minutes trying.  If
not, move on and don't look back. :-)

I also took a quick poke at the YUI site for the latest on how to
apply skins to individual widgets.  See the API docs for the skin
overrides config:

http://developer.yahoo.com/yui/3/api/Loader.html#property_skin

You can see this in action on YUI skinning docs for their slider widget:

http://developer.yahoo.com/yui/3/slider/#skinning

I don't know if the accordion widget has to know how to handle the
skin loader config, or if the widget magic just applies class names
based on these params.  I would guess the latter.  Anyway, as noted,
play and see, but don't dwell too long if it doesn't work.

Cheers,
deryck



As always, the YUI site has docs on skinning widgets to look at first.

Cheers,
deryck


-- 
Deryck Hodge
https://launchpad.net/~deryck
http://www.devurandom.org/



References