Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

// request.cf · coarse context

A page that knows where it met you.

Only coarse request metadata is shown. This demo does not display or persist visitor IP addresses.

Country
US
Cloudflare location
CMH
Connection
HTTP/2
Language
Not provided

Ray ID: a45c5243db745cd4

Jump to content

Template talk:Legend0

Page contents not supported in other languages.
Add topic
From Wikipedia, the free encyclopedia
Latest comment: 5 months ago by Opencooper in topic HTML class needed

Text inside the legend box

[edit]

Can someone please add a |text= parameter to this template, as seen here? Thanks.--Nevé–selbert 19:56, 4 January 2018 (UTC)Reply

To editor Neveselbert: There is code in the sandbox that may or may not be what you would like to see. I've created comparisons on the testcases page for your convenience. If this is what you want, then perhaps another template editor can make it better. I kind of hacked around with the code to get those results, and there might very well be a better way to do it. I'll keep an eye on this talk page. Happy New Year to you and yours!  Paine Ellsworth  put'r there  03:08, 12 January 2018 (UTC)Reply
Thanks Paine Ellsworth. If I may compare {{Legend0}} with {{Legend0/sandbox}}:
  • 1  Testing
  •       Testing
It seems that the {{Legend0/sandbox}} legend box is slightly smaller than {{Legend0}}. Can this be fixed? Thanks again.--Nevé–selbert 19:28, 12 January 2018 (UTC)Reply
It's a pleasure, Nevé–selbert! Is that better? What is weird and what must be accounted for (in addition to accessibility issues in regard to contrast/readability of the text against the chosen bg color) is that in my browser, IE, the live box on this page was indeed just a bit smaller larger and the sandbox version is now okay; however, the boxes on the testcases page show a marked difference in size from those above (sandbox versions are now larger), and there is an even bigger difference in size when I test these pages in my Chrome browser. Of course, there is also a difference for the {{Legend}} template between IE and Chrome, so my main concern is why the boxes above on this page look nearly identical in size in IE, and yet with that same browser, the boxes on the testcases page look much different in size??? How does your browser perceive all this?  Paine Ellsworth  put'r there  02:25, 13 January 2018 (UTC)Reply
@Paine Ellsworth: I use Internet Explorer too, and this is how the two boxes appear side-by-side (see zoom) on my screen. The width is the same, although the height of the {{Legend0/sandbox}} box is short by a pixel.--Nevé–selbert 20:20, 13 January 2018 (UTC)Reply
To editor Nevé–selbert: compensated. In the very first line of sandbox code are width and height settings that you can alter if for example I went too far with the height, which is now set at 1.0em (just altered from 0.95em). What I suggest now is for you to test the sandbox in preview on whatever page prompted you to ask for this change. See if it matches up with this page, or does it have more in common with the testcases-page comparisons?  Paine Ellsworth  put'r there  00:15, 14 January 2018 (UTC)Reply
@Paine Ellsworth: Thanks. One question, is there a reason why the text appears to be superscripted? "1" appears smaller than it should.--Nevé–selbert 00:22, 14 January 2018 (UTC)Reply
To editor Nevé–selbert: yes, I had to <sup> the text or else it would extend beneath the bottom border of the box. I just removed the sup tags and it looks okay at present.  Paine Ellsworth  put'r there  00:31, 14 January 2018 (UTC)Reply
Ah, ok. Everything seems fine now, and I have implemented your sandbox, if that's OK. Thanks .--Nevé–selbert 19:11, 14 January 2018 (UTC)Reply
I've reverted my edit, as this change to the template may require a wider consensus.--Nevé–selbert 19:35, 14 January 2018 (UTC)Reply
Concur.  Paine  21:50, 14 January 2018 (UTC)Reply
Paine Ellsworth has replied and is watching the page. Sam Sailor 13:47, 12 January 2018 (UTC)Reply

HTML class needed

[edit]

Similar to the other legend templates, this template should add a class name to the outermost element so that its uses can be targeted by CSS/JS. Something like "legend0". Opencooper (talk) 00:12, 9 April 2026 (UTC)Reply