Jump to content

Template talk:Welcome

Add topic
From Meta, a Wikimedia project coordination wiki
Latest comment: 2 days ago by Pppery in topic Edit request

Protected edit request on 22 October 2023

[edit]

Please change:

{{<includeonly>safesubst:</includeonly>#ifeq:{{<includeonly>safesubst:</includeonly>NAMESPACE}}|{{NAMESPACE}}|<h2>Welcome to Meta!</h2>|== Welcome to Meta! ==}}

to

{{<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! ==}}}}

This allows the header to be optional and lets it be changed as needed. –MJLTalk 17:39, 22 October 2023 (UTC)Reply

Done --Ferien (talk) 13:27, 27 October 2023 (UTC)Reply

Edit request

[edit]

change color:black to color:inherit per Template:Welcome/sandbox for dark mode compatibility —Matrix (user page (@ commons) - talk?) 13:44, 27 December 2024 (UTC)Reply

@Matrix: color:inherit 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,
  • if the template has a night mode-aware background color defined, usually color:var(--color-base,#202122) (or another appropriate color) is the correct solution;
  • if the template has a background color defined, but that’s not defined, keeping color:black (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 inherit (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 fixed it in the sandbox. —Tacsipacsi (talk) 12:49, 1 January 2025 (UTC)Reply
That works as well —Matrix (user page (@ commons) - talk?) 13:03, 2 January 2025 (UTC)Reply
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. —Tacsipacsi (talk) 23:59, 2 January 2025 (UTC)Reply
Done. * Pppery * it has begun 22:26, 9 January 2025 (UTC)Reply