Jump to content

User talk:Xover

Page contents not supported in other languages.
Add topic
From Wikisource
Latest comment: 7 days ago by Xover in topic On Template:Center/styles.css


On Template:Center/styles.css

[edit]

Why exactly did you remove the margin: 0 auto;? That had a noticeable impact on at least some uses of the templates.

If I write {{center|a random sentence|width=20em}}, which has its use eg when I want to make the centered text match in width with something above it, I currently get:

a random sentence

which as you can see is not centered, kinda defeating the point. The old behaviour (what you currently get with {{center|a random sentence|width=20em|style=margin:0 auto}} is:

a random sentence

which is much better. (Noticed at Page:The Jade Mountain.djvu/9).

(I'm specifically asking about the margins, I have absolutely no idea why there was a display:table there.)

Thanks, — Alien  3
3 3
22:08, 14 November 2025 (UTC)Reply

I've readded those margins. — Alien  3
3 3
20:55, 3 January 2026 (UTC)Reply
@Alien333: Primarily because SF00 added those margins in 2022, to a template that has existed since 2008, presumably to fix whatever local problem they were struggling with at the time, without taking into account the myriad ways this extra code will interact with other contexts (and will then need to be worked around there, in a never-ending cascade of special-casing). {{c}} is an inline text centering template, which means setting the text alignment should be sufficient. Adding horizontal margins is nonsensical in that context (auto margins is a block-centering mechanism, for {{center block}}).
It's not that I am dead set against adding margins there, but it should be on the basis of something far more substantial than a moment's whim or a single use case where it would be convenient. Including an assessment of what effect it will have on the millions of existing uses of the template.
For the problem you describe above my immediate thought is that the correct approach is to wrap both templates you want to align in a common ancestor, such as {{block center}}, and do the block alignment (and probably also constrain the width) there. Trying to align two independent elements is a bit like doing block indents in Word using hard line breaks, a monospaced font, and a random number of space characters. It may seem to work, but will break every time you sneeze. Xover (talk) 10:44, 8 March 2026 (UTC)Reply
Re {{c}} is an inline text centering template: I think that's where I don't follow you. It creates a block element. And also centering makes little sense inline since it like gets out of the layout. Are you saying that {{c}} should be a text-align template and no more? I'll give you that in most cases these margins don't serve much purpose (and that in this case it was a well suboptimal option (though would it really break? I can't think of a case where it would (I should stop with parentheticals))). But, does it do any hurt? What is the advantage in not having the margins? Also, on a more practical note, it's been 4 years so there are likely a certain number of pages around that rely on it now. — Alien  3
3 3
16:28, 8 March 2026 (UTC)Reply
@Alien333: Right, but there were 15 years or so before that where people relied on it not adding those margins. When the stated rationale was to emulate <center>...</center>—which is both literally impossible and undesireable (it's deprecated for a reason)—the burden of proof is definitely with those wanting the change. Xover (talk) 09:11, 4 April 2026 (UTC)Reply
The margins were added so that {{center}} and <CENTER>...</CENTER> behaved in the same way rendering wise. ShakespeareFan00 (talk) 00:23, 9 March 2026 (UTC)Reply
Yeah, and there's a reason <center>...</center> has been deprecated in HTML for two decades (or however long it is): its behavior is inherently quirky and impossible to get consistent across browsers. Trying to replicate the behaviour in {{c}} will only make the latter as much of a mess as the former. There are much better ways to do whatever it is one is trying to achieve. For example: <center>...</center> was used around tables to center them; and the correct replacement is to add horizontal auto margins to the table itself, not to tweak {{c}} so that it will center an embedded table. Xover (talk) 05:09, 9 March 2026 (UTC)Reply

Child's Ballads

[edit]

When you moved this to The English and Scottish Popular Ballads, you deleted a lot of the old redirection pages (in 2024). Many of these (e.g., Child's Ballads/219) had incoming links. Could you fix these, please, since you made the original move? TE(æ)A,ea. (talk) 15:02, 4 January 2026 (UTC)Reply

Edit request at MediaWiki talk:Gadget-RunningHeader.js

[edit]

Hullo, I've left one over there regarding use of .value which is incompatible with CodeMirror. (Sorry to keep bothering you, but eh, still the only intadmin :).) — Alien  3
3 3
17:02, 1 March 2026 (UTC)Reply

@Alien333: Done. Don't worry about bothering me. I filter ruthlessly when I'm too busy, and someone "bothering" me with stuff like this just means one less thing I have to remember myself. Never hesitate to contact me for stuff like this. I also have email enabled so if I don't notice a talk page message and it is some kind of urgent please do reach out in email too. I don't guarantee response time, but I'll certainly try to get to this stuff as soon as I reasonably can (I know it's annoying having to wait for someone).
I see we have lots of stuff broken due to upstream changes, including CodeMirror, so I'll try to have a look at the rest at some point. For now the textSelection should be fixed, modulo the green highlight that CodeMirror hides down in the shadow DOM somewhere. There may be a workaround but I couldn't be bothered faffing with it just now. Xover (talk) 10:26, 8 March 2026 (UTC)Reply

MediaWiki:TemplateScript/proofreading.js and Template:Ppoem

[edit]

Hello! When you have a chance, would you be able to update MediaWiki:TemplateScript/proofreading.js to preserve line breaks within {{ppoem}}, the way it currently does for <poem>? (see line 241) —Beleg Tâl (talk) 13:46, 9 March 2026 (UTC)Reply

@Beleg Tâl: Done. (diff) Please check that it works as intended. I don't use TemplateScript so I have limited opportunity to test. Xover (talk) 09:04, 4 April 2026 (UTC)Reply