Jump to content

Hilfe:Lint-Fehler/misc-tidy-replacement-issues

From mediawiki.org
This page is a translated version of the page Help:Lint errors/misc-tidy-replacement-issues and the translation is 53% complete.

Diese Kategorie wird für kleinere Probleme verwendet, die wir finden können, bis wir entscheiden, dass es eine eigene Kategorie benötigt. Stand August 2018 hat diese Kategorie ein Fehler namens "div-span-flip".

div-span-flip

Problem

Some pages have changed appearance because Tidy used to exchange div and span HTML (phab:T11737). That said, it appears a number of pages listed on there have no real visible rendering impact despite the presence of style and class attributes on the span tag.

Lösung

Gleiche wie Help:Extension:Linter/html5-misnesting

Warum passiert das?

Tidy exchanged div and span HTML elements so the div wasn't placed inside span. <span><div>Text hier</div></span> wurde zu <div><span>Text hier</span></div> geändert.

This matters only when the span tag had style or class attributes. With Tidy, the style and class attributes had an effect. But, since Remex no longer flips these tags around, the style and class attributes on the span no longer take effect. So, in some cases, this causes visible rendering differences. Linter flags instances only where the span tag had such attributes, but even so, in many cases, there may not be any visible rendering differences.