Page MenuHomePhabricator

Mainpage on nowiki inherits background image in dark-mode which obscures the text
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):
View Mainpage for nowiki in Vector-2022 and check "Søsterprosjekter"

What happens?:
There is an additional background image behind the text which obscures the text.

What should have happened instead?:
There should only be one background image, not an additional background image behind the text.

I believe this is because background:inherit !important is being used, instead of background-color:inherit. I believe it should be updated in mixins.less and if there are any other places that background: inherit is beeing used, that should probably also be updated if you only want the background-color to be inherited.

Screenshot:

Screenshot 2024-10-02 at 23.04.48.png (2,370×1,322 px, 244 KB)

Event Timeline

Jdlrobson subscribed.

These rules are intended to be a short term solution as wikis transition into dark mode. While these rules apply generally to most wikis, they won't always work so I do not consider this a bug.

For that reason, in this situation I'd recommend that no.wikipedia.org disables these styles per the instructions in https://www.mediawiki.org/wiki/Extension:WikimediaMessages#Disabling_styles and adapts them inside https://no.wikipedia.org/wiki/Portal:Forside/stil.css to meet their own needs.

In this case, it sounds like "theme-night-mainpage" should be adapted and then disabled.
Happy to provide any support you need to make that transition. Feel free to ask any questions here!

Thanks for the documentation for how to disable this styling. I have added "theme-night-mainpage" to MediaWiki:Wikimedia-styles-exclude. The problem is still there though, but that is probably because of caching? I have made sure the front page should look ok if the caching caches up: User:Tholme/MainPage

I still question the use of background: inherit though. I believe it is probably never what you want, as background is a shorthand for a whole lot of background related properties. If you want to remove background images as well I would expect the following to be a lot more correct, create less problems and fix at least as much problems as just background:inherit:

background-color: inherit !important;
background-image: none !important;

@Tholme interesting - it seems like no.wikipedia.org uses the portal namespace for its main page (I am not aware of other projects doing that!) so it is also subject to theme-night-portal styles so you'll also need to do the same for those rules!

Thanks. I have moved the Mainpage back to mainspace, so now it looks ok. Atleast svwiki and sewiki are also using portal namespace for its main page, so I don't think its very uncommon.

Thanks for the heads up! Definitely a case of today I learned! Is there anything else I can help with? Seems to be working great now.

Jdlrobson claimed this task.

Maybe a better idea long-term would be to have something like nooverride class for those kinds of scenarios where the badly construed overrides are clearly bugging out. Moving the main page out of the correct namespace is clearly not the right solution to this problem. It was there since 2010 at least according to https://no.wikipedia.org/wiki/MediaWiki:Mainpage?action=history