Jump to content

MediaWiki talk:Common.css

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

Mobile skin and block quotations

[edit]

Page watchers may be interested in Wikipedia talk:Manual of Style § Mobile skin and block quotations. Please feel free to participate there. Izno (talk) 04:07, 7 September 2024 (UTC)[reply]

Edit summaries and "three classes to match specificity"

[edit]

I'm not quite sure what Izno's edit summary "and here" means in Special:Diff/1257001458. It doesn't seem to be related to his previous edit on the same page over a month ago, but it might be related to the edit summary "no reason for that" in Special:Diff/1257000611 over at Module:Infobox/styles.css. I don't know how readers of the edit summary "and here" are supposed to understand it, because it takes investigating Izno's edits today before and after to get just a guess at what's meant.

However, what I am sure about is that removing .content from this CSS rule made its comment outdated: Use three classes to match specificity of MobileFrontend/Minerva selectors. It's no longer three classes, but two in each selector. —⁠andrybak (talk) 21:42, 12 November 2024 (UTC)[reply]

I'm sure the note was necessary to note before. Some upstream changes (that we shouldn't be subject to anyway, but that's an aside) have adjusted the expectations for what we need to do locally I think. So now I'm pretty sure the note isn't necessary. Izno (talk) 22:03, 12 November 2024 (UTC)[reply]

Edit request to make new template work {{lightdark}}

[edit]

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


I recently created a template that changes what content is displayed depending on whether dark or light mode is used. However, it requires a bit of CSS to make working. Please add the following tested CSS into the common.css to make the behavior work as intended.

.lightdark-islightmode {
	display: inline;
}

.lightdark-isdarkmode {
	display: none;
}

@media screen {
	html.skin-theme-clientpref-night .lightdark-islightmode {
		display: none;
	}

	html.skin-theme-clientpref-night .lightdark-isdarkmode {
		display: inline;
	}
}


@media screen and (prefers-color-scheme: dark) {
	html.skin-theme-clientpref-os .lightdark-islightmode {
		display: none;
	}

	html.skin-theme-clientpref-os .lightdark-isdarkmode {
		display: inline;
	}
}

The added lines will make the template work. Since as far as I am aware there isn't CSS that will change this theme, the only way to do this is to have some CSS to make this template work like a switch, similar to all the CSS hiding and showing elements for different user groups.

If it is technically feasible, you can condense the .lightdark-islightmode and .lightdark-isdarkmode down to .lightmode/.islightmode and .darkmode/.isdarkmode to make this CSS work outside of the template I created. Awesome Aasim 01:51, 17 November 2024 (UTC)[reply]

 Not done not going to add this to the site wide script for all readers just for this one template that doesn't have any current usability, and is unlikely to be used in places all readers would need it, such as in articles. — xaosflux Talk 02:24, 17 November 2024 (UTC)[reply]
I see the primary use case being templates where icons may need to shift colors depending on background. For example changing a black icon to white where readability is concerned. But I am not going to further debate the merits of such a change yet as I do agree it may need more time to determine its prospective use on pages across Wikipedia. Awesome Aasim 04:21, 17 November 2024 (UTC)[reply]
This doesn't need Common.css anyway. It can be done solely in TemplateStyles. Izno (talk) 07:06, 17 November 2024 (UTC)[reply]
You're right. I thought it would, apparently not! Awesome Aasim 16:42, 17 November 2024 (UTC)[reply]

Sorry to pile on here after the close, but please see the template's talk page, where I asked if this template was redundant to {{if dark}}. – Jonesey95 (talk) 04:35, 18 November 2024 (UTC)[reply]

The discussion above is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.

Interface-protected edit request on 15 December 2024

[edit]

mdot is displaying both the anonymous and logged in parameters for {{if IP}} for logged out users. autoconfirmed-show was added to common CSS around the same time as mobile CSS. looks like user-show also needs to be added to the same section. cc: MusikAnimal Jeremyb (talk) 21:25, 15 December 2024 (UTC)[reply]

oops forgot to include the test case: Wikipedia:Meetup/Seattle/Wikipedia Day 2025 Jeremyb (talk) 22:26, 15 December 2024 (UTC)[reply]