Difference between revisions of "Template talk:ShipBoxTooltip"

From EVE University Wiki
Jump to: navigation, search
m (Update for template problem.)
 
(One intermediate revision by the same user not shown)
Line 11: Line 11:
  
  
{{Code| <div> Does this, {{Ship|Vexor|mode= tooltip}} stays inline? </div>}}
+
{{Code|<nowiki> &lt;div> Does this, {{Ship|Vexor|mode= tooltip}} stays inline? &lt;/div> </nowiki>}}
  
 
<div> Does this, {{Ship|Vexor|mode= tooltip}} stays inline? </div><br>
 
<div> Does this, {{Ship|Vexor|mode= tooltip}} stays inline? </div><br>
Line 32: Line 32:
  
 
Somehow the interaction between {{T|Ship}}, {{T|ShipBoxTooltip}} and the wiki parser creates this problem. I have been looking into this, but I have not been able to find a fix --[[User:Evon R&#39;al|Evon R&#39;al]] ([[User talk:Evon R&#39;al|talk]]) 12:23, 11 May 2022 (UTC)
 
Somehow the interaction between {{T|Ship}}, {{T|ShipBoxTooltip}} and the wiki parser creates this problem. I have been looking into this, but I have not been able to find a fix --[[User:Evon R&#39;al|Evon R&#39;al]] ([[User talk:Evon R&#39;al|talk]]) 12:23, 11 May 2022 (UTC)
 +
 +
=== Update ===
 +
After some more investigation I found the cause of the problem. It is the presence of a block level element, like div or table, in the content part of the {{Tl|Tooltip}} template.
 +
 +
Demo:
 +
{{Code|<nowiki>Does this, {{Tooltip|test|<div>Content</div>}} stays inline?</nowiki>}}
 +
 +
Does this, {{Tooltip|test|<div>Content</div>}} stays inline?<br>
 +
{{Co|red|No}}, it does not.
 +
 +
made a notice of the problem on [[Template talk:Tooltip]].
 +
-- [[User:Evon R&#39;al|Evon R&#39;al]] ([[User talk:Evon R&#39;al|talk]]) 14:05, 9 February 2023 (UTC)

Latest revision as of 14:05, 9 February 2023

Problem with the template

Does this, {{Ship|Vexor|mode= tooltip}} stays inline?

Does this,

Vexor
Vexor.jpg
Vexor
Standard Cruisers Vexor Class
Icon hi slot.png4 (0/4) Icon mid slot.png4 Icon low slot.png5
Icon powergrid.png700 MW Icon cpu.png300 tf
Icon velocity.png195 m/sec
Icon capacity.png480 m³

stays inline?

No, it does not.


Does this, {{:Vexor|mode= tooltip}} stays inline?

Does this,

Vexor
Vexor.jpg
Vexor
Standard Cruisers Vexor Class
Icon hi slot.png4 (0/4) Icon mid slot.png4 Icon low slot.png5
Icon powergrid.png700 MW Icon cpu.png300 tf
Icon velocity.png195 m/sec
Icon capacity.png480 m³

stays inline?

No surprise here as the second example is exactly what {{Ship}} produces.


<div> Does this, {{Ship|Vexor|mode= tooltip}} stays inline? </div>
Does this, Vexor
Vexor.jpg
Vexor
Standard Cruisers Vexor Class
Icon hi slot.png4 (0/4) Icon mid slot.png4 Icon low slot.png5
Icon powergrid.png700 MW Icon cpu.png300 tf
Icon velocity.png195 m/sec
Icon capacity.png480 m³
stays inline?


Now this works, as does putting it inside a <span>,


Does this, Vexor
Vexor.jpg
Vexor
Standard Cruisers Vexor Class
Icon hi slot.png4 (0/4) Icon mid slot.png4 Icon low slot.png5
Icon powergrid.png700 MW Icon cpu.png300 tf
Icon velocity.png195 m/sec
Icon capacity.png480 m³
stays inline?


or a table.
Does this, Vexor
Vexor.jpg
Vexor
Standard Cruisers Vexor Class
Icon hi slot.png4 (0/4) Icon mid slot.png4 Icon low slot.png5
Icon powergrid.png700 MW Icon cpu.png300 tf
Icon velocity.png195 m/sec
Icon capacity.png480 m³
stays inline? (caption)
Does this, Vexor
Vexor.jpg
Vexor
Standard Cruisers Vexor Class
Icon hi slot.png4 (0/4) Icon mid slot.png4 Icon low slot.png5
Icon powergrid.png700 MW Icon cpu.png300 tf
Icon velocity.png195 m/sec
Icon capacity.png480 m³
stays inline? (data cell)


Using <p> however produces this

Does this, Vexor

Vexor.jpg
Vexor
Standard Cruisers Vexor Class
Icon hi slot.png4 (0/4) Icon mid slot.png4 Icon low slot.png5
Icon powergrid.png700 MW Icon cpu.png300 tf
Icon velocity.png195 m/sec
Icon capacity.png480 m³

stays inline?


Somehow the interaction between {{Ship}}, {{ShipBoxTooltip}} and the wiki parser creates this problem. I have been looking into this, but I have not been able to find a fix --Evon R'al (talk) 12:23, 11 May 2022 (UTC)

Update

After some more investigation I found the cause of the problem. It is the presence of a block level element, like div or table, in the content part of the {{Tooltip}} template.

Demo:

Does this, {{Tooltip|test|<div>Content</div>}} stays inline?

Does this,

test
Content

stays inline?

No, it does not.

made a notice of the problem on Template talk:Tooltip. -- Evon R'al (talk) 14:05, 9 February 2023 (UTC)