Template talk:Center

Internal span?
. I am in good faith assuming that the internal SPAN was the design intent here, However in places this template is being called with what is effectively a DIV or P argument..

In a miminial example, what happens is:-

Will generate:

This is clearly going to lead to rendering issues because mediawiki then tries to tidy up when it sees the SPAN, and a P can't go inside a SPAN, per HTML5 structuring rules. (Aspects as to where P gets (mis-inserted are a known issue, and noted in Phabricator.).

The above was a miniminal example, in other calls, center may be being called where the nominal argument is a full blown DIV or TABLE, and the writers of code calling the templates (possibly a replacement for the deprecated CENTER html) may not have noted it's expecting a SPAN argument not a DIV.

If you feel it's appropriate I am happy to look at some of the templates where it's been (mis)called.

ShakespeareFan00 (discuss • contribs) 08:34, 22 April 2020 (UTC)