Module talk:Sidebar/Archive 2: Difference between revisions

Content deleted Content added
archiving
 
MiszaBot II (talk | contribs)
m Robot: Archiving 1 thread from Template talk:Sidebar.
Line 147:
:There are many templates with these; {{tl|navbox}} and {{tl|infobox}} to name a few complicated examples. They need some CSS restructuring, including Common.css. Currently looking into it. <span style="font-family:'Trebuchet MS'"> — [[User:Edokter|<span style="color:#008"><i>E</i>dokter</span>]] ([[User talk:Edokter|<span style="color:#080">talk</span>]]) — </span> 17:45, 24 September 2012 (UTC)
::This template sure uses some convulted parameter structure for these attributes, while overriding those same settings with CSS. So I recommend removing those parameters to start with. <span style="font-family:'Trebuchet MS'"> — [[User:Edokter|<span style="color:#008"><i>E</i>dokter</span>]] ([[User talk:Edokter|<span style="color:#080">talk</span>]]) — </span> 19:36, 8 October 2012 (UTC)
== Edit request on 4 December 2012 ==
 
{{edit protected|answered=yes}}
<!-- Begin request -->
Hi. I've noticed that if backgrounds are added to the headings in this template, the headings don't appear vertically aligned within them (see example below left). If, however, the padding in the heading styles is changed to <code><nowiki>padding:0.1em;</nowiki></code>, i.e. an all-round 0.1em padding, the headings now appear vertically aligned (below middle). A tweak to the content styles (bottom padding of 0.4em) ensures each heading-content pair remains grouped when no heading background is in use (below right). So, I've amended a copy of the current template code in the sandbox to include these tweaks (15:46, 4 December 2012‎ CsDix (talk | contribs)‎ . . (14,077 bytes) (-420)‎ . . ''(re-retweaked (to reduce gap between headings and contents when no heading background))'' [http://en.wikipedia.org/w/index.php?title=Template:Sidebar/sandbox&oldid=526346406]).
 
{|
|- style="vertical-align:top;"
|
{{Sidebar
|name = {{PAGENAME}}
|title = Sidebar<br/>{{resize|75%|present formatting}}
|headingstyle = background:#ccf;
|heading1 = heading1
|content1 = content1
|heading2 = heading2
|content2 = content2
|heading3 = heading3
|content3 = content3
}}
|
{{Sidebar
|name = {{PAGENAME}}
|title = Sidebar<br/>{{resize|75%|tweaked (with backgrounds)}}
|headingstyle = padding:0.1em;background:#ccf;
|contentstyle = padding:0 0.1em 0.4em;
|heading1 = heading1
|content1 = content1
|heading2 = heading2
|content2 = content2
|heading3 = heading3
|content3 = content3
}}
|
{{Sidebar
|name = {{PAGENAME}}
|title = Sidebar<br/>{{resize|75%|tweaked (without backgrounds)}}
|headingstyle = padding:0.1em;
|contentstyle = padding:0 0.1em 0.3em;
|heading1 = heading1
|content1 = content1
|heading2 = heading2
|content2 = content2
|heading3 = heading3
|content3 = content3
}}
|- style="vertical-align:top;"
|
{{Sidebar/sandbox
|name = {{PAGENAME}}
|title = Sidebar/sandbox <div style="font-size:75%;line-height:1.2em;">with 200px image<br/>and backgrounds</div>
|image = [[File:Example.jpg|200px]]
|headingstyle = background:#ccf;
|heading1 = heading1
|content1 = content1
|heading2 = heading2
|content2 = content2
|heading3 = heading3
|content3 = content3
}}
|
{{Sidebar/sandbox
|name = {{PAGENAME}}
|title = Sidebar/sandbox <div style="font-size:75%;line-height:1.2em;">with 200px image plus caption<br/>and with backgrounds</div>
|image = [[File:Example.jpg|200px]]
|caption = This is the caption.
|headingstyle = background:#ccf;
|heading1 = heading1
|content1 = content1
|heading2 = heading2
|content2 = content2
|heading3 = heading3
|content3 = content3
}}
|
{{Sidebar/sandbox
|name = {{PAGENAME}}
|title = Sidebar/sandbox <div style="font-size:75%;line-height:1.2em;">with 200px image plus caption<br/>but without backgrounds</div>
|image = [[File:Example.jpg|200px]]
|caption = This is the caption.
|heading1 = heading1
|content1 = content1
|heading2 = heading2
|content2 = content2
|heading3 = heading3
|content3 = content3
}}
|}
<!-- End request -->
[[User:CsDix|CsDix]] ([[User talk:CsDix|talk]]) 03:53, 4 December 2012 (UTC)
 
:The alignment is looking fine to me. Maybe the problem went away with the introduction of new MediaWiki software yesterday? Let me know if you're still seeing issues. (A screenshot might help clarify things as well.) — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius</span>]]''''' <sup>([[User talk:Mr. Stradivarius|have a chat]])</sup> 10:05, 5 December 2012 (UTC)
 
{|
|colspan="2"|
:*Here are a couple of screenshots of a couple of Sidebars as they appear on the Firefox-based browser ("Palemoon") I'm currently using:
|-
| [[File:Sidebar example 1.jpg]]
| [[File:Sidebar example 2.jpg]]
|}
:: Here, the space above each heading looks more than that below (especially e.g. in the Anthropology sidebar's first heading "Fields"). Small in the overall scheme of things, but noticeable. [[User:CsDix|CsDix]] ([[User talk:CsDix|talk]]) 16:50, 5 December 2012 (UTC)
:: PS I've just edited [[Template:Anthropology]], so the screenshot above left was of [http://en.wikipedia.org/w/index.php?title=Template:Anthropology&oldid=500224341 this version] of the template. [[User:CsDix|CsDix]] ([[User talk:CsDix|talk]]) 17:13, 5 December 2012 (UTC)
::: This looks better, but I am wondering about the condition padding in the first two fields. In particular, the part that changes the padding for the first heading if there is an image, and the part that changes the padding for the first contents if there is a first heading. The ordering on these statements appears to be important, and it's not clear exactly what is going on there. Otherwise, this looks very reasonable. [[User:Plastikspork|Plastikspork]] [[User talk:Plastikspork|<sub style="font-size: 60%">―Œ</sub><sup style="margin-left:-3ex">(talk)</sup>]] 06:02, 8 December 2012 (UTC)
:::: That's a good point; thanks. I've toyed with the sandbox code a little, left it with no special padding for the first heading/content ([http://en.wikipedia.org/w/index.php?title=Template:Sidebar/sandbox&oldid=527141363 this version]) and added another row of examples (that include images/captions) to those above. Maybe no special padding is required, as they seem okay here &ndash; how about there? (Perhaps I'm missing some circumstance/s where the special padding would still be required?) [[User:CsDix|CsDix]] ([[User talk:CsDix|talk]]) 06:25, 9 December 2012 (UTC)
:::::Not clear what should be done right now, if anything, so I've declined the request. I've asked both of you to come back here and clarify what should be done. [[User:Nyttend|Nyttend]] ([[User talk:Nyttend|talk]]) 13:40, 18 December 2012 (UTC)
:::::: Okay, I think I got it. Let me know if there is a problem. Thanks! [[User:Plastikspork|Plastikspork]] [[User talk:Plastikspork|<sub style="font-size: 60%">―Œ</sub><sup style="margin-left:-3ex">(talk)</sup>]] 05:43, 19 December 2012 (UTC)