Topic on Help talk:Extension:Linter

Jump to navigation Jump to search

Discussion page backgrounds using missing /div

8
MarcoSwart (talkcontribs)

Several users on nl.wiktionary create a background for the comments on their Discussion page by opening a div and not closing it. This results in each new comment being part of this div. For an example see . The parser migration tool suggests that this effect will be preserved in the near future, so a change does not seem urgent. But is there presently a HTML5 compliant way to get the same result?

Whatamidoing (WMF) (talkcontribs)

I think that someone like @Jonesey95 or @ Facenapalm could probably tell you if there is a good way to do this.

Jonesey95 (talkcontribs)

I think the only solution is to add a closing /div tag. I thought there was a CheckWiki error for this, but I do not see one. I do not know how they are detected on en.WP.

Facenapalm (talkcontribs)

CheckWiki can't find this case, because it can't analyse page code after tempate substitution (and because that page is not in main namespace as well).

I see 2 possible good ways and both of them are not applicable to this case. First is CSS, applicable only to personal design. Second is using a subpage with topics, which will be included to this one using something like "<div style=[design]>{{/topics}}</div>", and custom buttons "add topic", leading to subpage.

MarcoSwart (talkcontribs)

Thanks for the information. So it seems there is no alternative for this trick. In that case my approach would be:

a. not doing anything to change these pages (at least in this respect: some other errors already have been resolved)

b. wait and see if and when a future change will break these pages, and then explain the users concerned that a solution is not available

c. if anyone asks at an earlier date, point to this discussion.

My reasoning: at Dutch Wiktionary only a handful of users used this trick on their Talk-page and none of them are very active at present. At the moment no one is having a problem. Even if this would change in the future, chances are there will be many things more important for our project to spend resources on.

SSastry (WMF) (talkcontribs)

I somehow missed this topic earlier since I didn't have this page on my watchlist till recently. But, yes, we are aware of this usage pattern on user talk pages on many wikis (not just nl.wiktionary). We might eventually break this pattern, but we will try to figure out reasonable alternatives that addresses the common use cases. For example, this could be a page property that specifies a wrapper / CSS that is automatically applied by the parser. This would address the common use cases like the one you refer to, but won't address use cases where editors add the unclosed <div> tag in the middle of the page. But, yes, we are aware of this use case and have discussed this in the past. We will do what we can to support this cleanly without relying on hacks like unclosed-div tags.

197.218.90.226 (talkcontribs)

Supporting this use case makes very little sense. Extension:TemplateStyles looks like the best solution primarily because the lack of a personal stylesheet won't be a problem if / when templatestyles is deployed.

Such open html tags also cause loads of other issues, for example someone could easily break it by closing the div earlier than expected (e.g. using an unbalanced template). Beyond that, it can be quite confusing to newbies and even experienced users if someone adds something like the html below.

<div style="display:none">
SSastry (WMF) (talkcontribs)

Right, we won't support unclosed <div> tags. I indicated that we would support the use-case for styling using whatever clean / sane mechanism that might be.

Reply to "Discussion page backgrounds using missing /div"