Steps to replicate the issue (include links if applicable):
What happens?:
There is a transclusion of the Sitzverteilung template that got all the colors stripped and appears unreadable.
What should have happened instead?:
Template output and colors are readable
I see two major problems with the current color stripping introduced in https://gerrit.wikimedia.org/r/c/mediawiki/extensions/WikimediaMessages/+/1070207 / T366380 / https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/WikimediaMessages/+/refs/heads/master/modules/ext.wikimediamessages.styles/theme-night-portal.less:
- the .notheme exclusion is almost useless for nested elements with the current .ns-100 .mw-parser-output :not( .notheme ):not( a ) selector; this strips all colors from elements that have no .notheme class even if they are inside a .notheme parent.
- something like .ns-100 .mw-parser-output :not( .notheme *, a ) would allow to exclude from color stripping with respect to nesting.
- .notheme is treated ambiguously.
- sometimes it means don't apply dark mode styles, like in the thumb frame that is generated by the Sitzverteilung template.
- for the portal namespace color stripping, it means don't apply the special overrides.
- these are two different cases which, when done with one class, result in a broken look e.g. if the transclusion of the Sitzverteilung template would be wrapped in .notheme and my proposed nesting adjustment is applied.
- in the linked example, I want the dark mode styles, but I don't want the color stripping. This is not possible with the current implementation of .notheme.
- IMO it is necessary to use a different class for the don't apply the special overrides case.