Template talk:Ribbon devices

From Wikipedia, the free encyclopedia

[edit] Alignment

Without devices, ribbons will align properly:

{{ribbon devices|ribbon=Southwest Asia Service ribbon.svg|}} {{ribbon devices|ribbon=NCO Professional Development Ribbon.svg}} {{ribbon devices|ribbon=Army Service Ribbon.svg}}

With devices, the ribbon alignment resets to the left:

{{ribbon devices|ribbon=Southwest Asia Service ribbon.svg|number=3|type=award-star}} {{ribbon devices|ribbon=NCO Professional Development Ribbon.svg|number=2}} {{ribbon devices|ribbon=Army Service Ribbon.svg}}
Gold award star
Gold award star
Gold award star
Bronze oak leaf cluster
Bronze oak leaf cluster

--— Gadget850 (Ed) talk - 18:44, 25 April 2008 (UTC)

I tried to fix this... couldn't come up with a solution that works correctly in all situations. This seems to be exactly what display:inline-block is for, but unfortunately it's not well supported yet. – flamurai (t) 07:20, 13 May 2008 (UTC)
My suspicions are confirmed: Safari, which supports display:inline-block displays the ribbons correctly. If you have a compatible browser (see [1]), the ribbons on this page should display correctly. – flamurai (t) 21:23, 13 May 2008 (UTC)
Upgraded to FireFox 3b- that page does display correctly. --— Gadget850 (Ed)talk 22:46, 13 May 2008 (UTC)
That's good to know. When I get some free time I will recode these templates to display correctly (and make them easier to edit), at least in those compatible browsers. Maybe next week. – flamurai (t) 23:12, 13 May 2008 (UTC)

[edit] Recode

I am working on a recode of the template in {{ribbon devices/sandbox}}. It takes the total number of subtemplates down from 24 (one for each size-number pair) to 2 (one to render an individual device, and one to layout the devices given the number). Plus, it incorporates the bug fix discussed above. (Check out the test cases to see what I mean if you have a compatible browser.) I just have a bit more grunt work to do and I'll make the new version live. – flamurai (t) 19:16, 14 May 2008 (UTC)

Finished the coding. I could use an extra set of eyes to look over the test cases before I make it live. – flamurai (t) 06:26, 15 May 2008 (UTC)
The sandbox version is working nicely with FireFox 2. --—— Gadget850 (Ed) talk - 01:14, 29 May 2008 (UTC)