Thread:LWChris/@comment-497139-20160701222558/@comment-1588401-20160703052009

Oh my, these templates. :D I think you should consider using CSS classes, so you can assign the class to the whole tool tip and then handle the styling via CSS selectors in at a common place such as MediaWiki:Common.css.

So, my analysis is this: Compare the first block after the title:

Item:

Well,  is always "true", because   will render   if   is not set. Hence that line is always included. Furthermore the content does already put a null-check, so the null-check in  is superfluous. So the actual line is | style="..." | &rarr; always a line, either   or

No compare this to the Mastery block:

The outer ifs' conditions are actual conditions that can return null when the parameter is not set, so the line is omitted. However, in your template, that means the whole  line is collapsing to no text, leaving just a line break from the template. Two linebreaks are translated into a paragraph, so this is where the large spacing comes from, I guess.

The second question you likely meant to ask is "why doesn't it display the ?" I actually don't know, maybe the comment (which also leaves the two line breaks) messes it up.

Btw: who created those templates? A lot of this code could be much cleaner if you coded what you meant to display, and not coded anything that displays what you meant. I. e. the separation lines could've been one  td-element, or even better: assign the border-top-style to the content cells instead of adding a new row for the separator.^^