Template talk:Welcome: Difference between revisions
Content deleted Content added
→Edit request: Done |
|||
(57 intermediate revisions by 17 users not shown) | |||
Line 1:
{{User:MiszaBot/config
|archive = Template talk:Welcome/Archive %(counter)d▼
|archiveheader = {{talkarchive}}▼
|algo = old(60d)▼
|counter = 1
|minthreadsleft = 2▼
|minthreadstoarchive = 1
▲|minthreadsleft = 2
▲|algo = old(60d)
▲|archiveheader = {{talkarchive}}
▲|archive = Template talk:Welcome/Archive %(counter)d
}}
{{archive box auto}}
== Protected edit request on 22 October 2023 ==
{{edit fully-protected|Template:Welcome|
<!-- Begin request -->
Please change:
<pre>{{<includeonly>safesubst:</includeonly>#ifeq:{{<includeonly>safesubst:</includeonly>NAMESPACE}}|{{NAMESPACE}}|<h2>Welcome to Meta!</h2>|== Welcome to Meta! ==}}</pre>
to
<pre>{{<includeonly>safesubst:</includeonly>#ifeq:{{<includeonly>safesubst:</includeonly>lc:{{{header|}}}}}|no||{{<includeonly>safesubst:</includeonly>#ifeq:{{<includeonly>safesubst:</includeonly>NAMESPACE}}|{{NAMESPACE}}|<h2>Welcome to Meta!</h2>|== Welcome to Meta! ==}}}}</pre>
This allows the header to be optional and lets it be changed as needed.
<!-- End request -->
–<span style="font-family:CG Times, times">[[User:MJL|<span style="color:black">MJL</span>]] [[User talk:MJL|‐'''Talk'''‐]]<sup>[[Special:CentralAuth/MJL|☖]]</sup></span> 17:39, 22 October 2023 (UTC)
:
{{Edit request|answered=yes}} change color:black to color:inherit per [[Template:Welcome/sandbox]] for dark mode compatibility —'''Matrix''' (''[[User:Matrix|<sub>user page</sub>]] [[:commons:User:Matrix|<sup>(@ commons)</sup>]] - [[User talk:Matrix|<sub>talk?</sub>]])'' 13:44, 27 December 2024 (UTC)
:{{reply to|Matrix}} <code>color:inherit</code> is very, very rarely appropriate: it says “use the color of the parent element, whatever it is”. If this is set on the root element of a template (or an element whose ancestors within the template have no color defined), this makes assumptions on how the template will be used, which may or may not hold. (I’ve fixed numerous edits by you across wikis, look for the summary “don’t assume that the template will be used in a reasonable-color context” in my contributions.)
:Instead,
▲<!-- End request -->
:* if the template has a night mode-aware background color defined, usually <code>color:var(--color-base,#202122)</code> (or another appropriate color) is the correct solution;
:* if the template has a background color defined, but that’s not defined, keeping <code>color:black</code> (or making the background color night mode-aware and then following the previous point) is the correct solution;
:* if the template has no background color defined, it usually doesn’t need a text color either. Simply removing the text color is the same as specifying <code>inherit</code> (unless some CSS stylesheet targets the element, but that’s pretty rare), and cleaner.
:In this particular case, neither of the above is correct, because the problem lies higher up in the DOM tree. I’ve [https://meta.wikimedia.org/w/index.php?title=Template:Welcome/sandbox&diff=28054881 fixed it in the sandbox]. —[[User:Tacsipacsi|Tacsipacsi]] ([[User talk:Tacsipacsi|talk]]) 12:49, 1 January 2025 (UTC)
::That works as well —'''Matrix''' (''[[User:Matrix|<sub>user page</sub>]] [[:commons:User:Matrix|<sup>(@ commons)</sup>]] - [[User talk:Matrix|<sub>talk?</sub>]])'' 13:03, 2 January 2025 (UTC)
:::Sorry, but it’s not “as well”: what you proposed results in an unreadable 1.5:1 contrast ratio in light mode – which is still the default. And this happens on the sandbox page, not only if the template is used in a context with surprising colors. I appreciate your work on ensuring dark mode compatibility, but please pay attention to not breaking light mode compatibility at the same time. —[[User:Tacsipacsi|Tacsipacsi]] ([[User talk:Tacsipacsi|talk]]) 23:59, 2 January 2025 (UTC)
:::: Done. [[User:Pppery|* Pppery *]] [[User talk:Pppery|<sub style="color:#800000">it has begun</sub>]] 22:26, 9 January 2025 (UTC)
|