Template talk:Southern California Intercollegiate Athletic Conference navbox

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Night mode compatibility?[edit]

@SGrabarczuk (WMF), is there documentation anywhere on how to make templates like this compatible with the new dark mode? Sdkbtalk 22:14, 9 May 2024 (UTC)[reply]

Hey @Sdkb, the only documentation I know of is the recommendations page. I think the problem of templates like this is not addressed anywhere directly, because the team doesn't go that far in telling how to format stuff. As a Wikipedian, I avoid conveying information just with color wherever possible. I guess it must be documented somewhere in MoS; perhaps it's not discouraged strongly enough? SGrabarczuk (WMF) (talk) 00:39, 14 May 2024 (UTC)[reply]
@SGrabarczuk (WMF), I should have been more specific about the issue. When I enable night mode for this template, the title bar goes completely black. This behavior takes something that was previously working (in the sense that navbox coloring is permissible, and is used decoratively rather than to convey information) and breaks it, so I don't think "just don't use colored navboxes" is an acceptable resolution. There should be some way to fix this. Sdkbtalk 04:39, 14 May 2024 (UTC)[reply]
Thanks for clarification. Isn't this case covered by "Avoid static values for inline background and text colors"? SGrabarczuk (WMF) (talk) 11:14, 14 May 2024 (UTC)[reply]
@SGrabarczuk (WMF), ah, yeah, that does speak to it. To the extent I understand it, the advice there seems to be a mix of "just don't use color" and a workaround involving TemplateStyles.
Regarding the former, I think it would be an extremely heavy lift consensus-wise to try to convince the community to take that approach. Views among community members differ as to what extent it is permissible to use color in applications like this (a tinderbox that you probably don't want to ignite with yourselves at the center), but the status quo is that a quite large portion of navboxes (especially in areas like sports) use colored theming, and I don't see that changing anytime soon.
Regarding the workaround, most editors (including me) don't have a strong understanding of TemplateStyles. Trying to follow the instructions there, I get stuck on the fact that it uses a class, whereas navboxes use |basestyle=, which presumably invokes a style. Also, if possible, it'd be nice not to have to create an entire separate {{Southern California Intercollegiate Athletic Conference navbox/styles.css}} page just for this one thing.
Ultimately, if you're hoping for templates like this to be adapted for night mode, the method will need to be easier than it is presently. The best option might be for us to create something like |nightbasestyle= for {{Navbox}}. Is that currently possible, or would it require technical changes on your end before we could do it? If nothing is done, I predict it will make the rollout of night mode messier, with editors disgruntled about navboxes like this breaking but unsure how to fix them.
Cheers, Sdkbtalk 19:43, 14 May 2024 (UTC)[reply]
|nightbasestyle= is not possible at all in any meaningful sense - you cannot do media queries in inline CSS. This is why TemplateStyles is a recommendation. Another option would be for us to do the work to make our template base styles support night mode and then turn off the usually !important styles that are being set in the night mode stylesheets that WMF has added to hack around our use of inline styles. This is a chunk of work that I have been trying to get to and which is completely unmotivational because it will be the usual "we don't want to change" from English Wikipedians. Including yourself in the above, apparently. (Also, it's a lot of work.)
Cases like these sports navboxes should be supported by those stylesheets and my impression is that they more or less were. Izno (talk) 19:52, 14 May 2024 (UTC)[reply]
I'm trying to parse your reply, Izno (less technical explanation is always appreciated).
If I understand correctly, you're saying that we have two options. The first (and your preferred) is to start creating /styles.css subpages for navboxes like this to define the colors for night mode (in this case probably flipping the background and text so that it's blue on black, rather than black on blue). The second is for us to make the default color scheme support night mode, which would then allow the WMF to turn off the setting that is forcing the black background and creating the issue here. In that case, would templates with no night mode colors specified revert to the default night colors when night mode is turned on, or would they keep their existing colors? I could see arguments either way.
Did I get all of that (or even most of it) correct? Sdkbtalk 20:18, 14 May 2024 (UTC)[reply]
I said only that TemplateStyles is a recommended solution, not that it is even my preferred solution necessarily. :)
default color scheme support night mode, which would then allow the WMF to turn off the setting that is forcing the black background and creating the issue here which would allow us to turn it off, but then we still need to go around cleaning stuff up for all the not-base colored things. Which would inevitably leads to some solution similar to TemplateStyles everywhere, usually.
My impression remains though that I think there is some CSS that is interacting unexpectedly in the relevant hacks here and think it would be meaningful for Jon (WMF) to take a look and make sure orderings and all are as expected. Izno (talk) 20:57, 14 May 2024 (UTC)[reply]
The issue here as I understand it is the use of Template:Colored link which outputs:

color: black; text-decoration: inherit;

That template is problematic in the dark theme as it sets a color but assumes a white background.
Here is one fix following the guideline Szymon pointed to that I think gives you the desired result:
https://en.wikipedia.org/w/index.php?title=Template%3ASouthern_California_Intercollegiate_Athletic_Conference_navbox&diff=1223912547&oldid=1223101445
I appreciate this may not be intuitive however for non-technical editors.... I think that's where us technical editors need to abstract this better. Another approach would be to create a new template Template:Color link as text or encode this behaviour inside Navboxes to avoid you needing to use it at all.
On a general note, and speaking to your point this kind of thing is going to be "extremely heavy lift consensus-wise" - I do think this will be challenging, and that's okay. I think this Template is problematic in the case way that Template:Color is (as discussed in phab:T360683)... if we want a functioning dark mode of the site, we need to be more limited in our use of color on wiki and reserve it only for semantic reasons, rather than cosmetic e.g. to match a brand colors and when used, this should really be codified in a template that knows how to handle it in dark mode.
Dark mode is going to be a little disruptive on the short term as it as it fundamentally changes some assumptions around always having white text on black background that we've been relying on for 10+ years - but I believe it's going to lead to more portable/adaptable/better content on the long run. Jon (WMF) (talk) 03:53, 15 May 2024 (UTC)[reply]