Hello,
I would like the CSS to be slightly different depending on which namespace the article is in; such as, a different background or logo. Is this possible?
MediaWiki 1.28.2 PHP 5.6.31 (apache2handler) MariaDB 5.5.52-MariaDB ICU 50.1.2
Thank you, -Rich
Hello, I think so. I think you can customize your MediaWiki:Common.css page to include different stylings for different namespaces. Don't quote me on that though - but I think it's possible. --Amanda
On Wednesday, August 2, 2017, 12:56 PM, Evans, Richard K. (GRC-H000) richard.k.evans@nasa.gov wrote:
Hello,
I would like the CSS to be slightly different depending on which namespace the article is in; such as, a different background or logo. Is this possible?
MediaWiki 1.28.2 PHP 5.6.31 (apache2handler) MariaDB 5.5.52-MariaDB ICU 50.1.2
Thank you, -Rich
_______________________________________________ MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Hi Amanda, yes, thank you!
I just discovered that the default skin (monobook) is indeed able to do this with common.css, but then I quickly discovered that common.css seems to be completely ignored by the Semantic Mediawiki "Chameleon"
https://www.mediawiki.org/wiki/Skin:Chameleon
It's a great skin and I have other reasons for needing to use it. Can anyone give me a few pointers on how to change the css of a skin like that.. it seems to not use CSS at all.
-Rich
Hi Rich. First of all, Chameleon should support MediaWiki:Common.css. I just tried setting it to body.mediawiki {background-image: url(https://lh3.googleusercontent.com/mvHbePT-FyB8YpsjecAdCSvK7XoqOcsa4rqpCksWUD...) !important;background-repeat: repeat;} on a test wiki and it worked (Careful, this accesses an external resource!). If this really doesn't work, you could try adding your own less file. See https://github.com/cmln/chameleon/blob/master/docs/customization.md#changing...
Less is a superset of css, so anything you can put in a css file, you can also put in a less file. However, I suspect if it does not work in MediaWiki:Common.css, it won't work in its own file either. One issue with Twitter Bootstrap used by Chameleon is, that it sometimes sets css rules so specific, that they take precedence over what you try to set. So, make sure to be more specific. Cheers Stephan
-------- Original Message -------- Subject: Re: [MediaWiki-l] Is namespace specific CSS possible? Local Time: August 2, 2017 7:21 PM UTC Time: August 2, 2017 5:21 PM From: richard.k.evans@nasa.gov To: MediaWiki announcements and site admin list mediawiki-l@lists.wikimedia.org Hi Amanda, yes, thank you! I just discovered that the default skin (monobook) is indeed able to do this with common.css, but then I quickly discovered that common.css seems to be completely ignored by the Semantic Mediawiki "Chameleon" https://www.mediawiki.org/wiki/Skin:Chameleon It"s a great skin and I have other reasons for needing to use it. Can anyone give me a few pointers on how to change the css of a skin like that.. it seems to not use CSS at all. -Rich _______________________________________________ MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Trying again with the correct content (s/url/url/): body.mediawiki {background-image: url(https://lh3.googleusercontent.com/mvHbePT-FyB8YpsjecAdCSvK7XoqOcsa4rqpCksWUD...) !important;background-repeat: repeat;} If this does not work, I blame it on my mail provider.
-------- Original Message -------- Subject: Re: [MediaWiki-l] Is namespace specific CSS possible? Local Time: August 2, 2017 9:25 PM UTC Time: August 2, 2017 7:25 PM From: s7eph4n@protonmail.com To: MediaWiki announcements and site admin list mediawiki-l@lists.wikimedia.org MediaWiki announcements and site admin list mediawiki-l@lists.wikimedia.org Hi Rich. First of all, Chameleon should support MediaWiki:Common.css. I just tried setting it to body.mediawiki {background-image: url(https://lh3.googleusercontent.com/mvHbePT-FyB8YpsjecAdCSvK7XoqOcsa4rqpCksWUD...) !important;background-repeat: repeat;} on a test wiki and it worked (Careful, this accesses an external resource!). If this really doesn't work, you could try adding your own less file. See https://github.com/cmln/chameleon/blob/master/docs/customization.md#changing...
Less is a superset of css, so anything you can put in a css file, you can also put in a less file. However, I suspect if it does not work in MediaWiki:Common.css, it won't work in its own file either. One issue with Twitter Bootstrap used by Chameleon is, that it sometimes sets css rules so specific, that they take precedence over what you try to set. So, make sure to be more specific. Cheers Stephan
-------- Original Message -------- Subject: Re: [MediaWiki-l] Is namespace specific CSS possible? Local Time: August 2, 2017 7:21 PM UTC Time: August 2, 2017 5:21 PM From: richard.k.evans@nasa.gov To: MediaWiki announcements and site admin list mediawiki-l@lists.wikimedia.org Hi Amanda, yes, thank you! I just discovered that the default skin (monobook) is indeed able to do this with common.css, but then I quickly discovered that common.css seems to be completely ignored by the Semantic Mediawiki "Chameleon" https://www.mediawiki.org/wiki/Skin:Chameleon It"s a great skin and I have other reasons for needing to use it. Can anyone give me a few pointers on how to change the css of a skin like that.. it seems to not use CSS at all. -Rich _______________________________________________ MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Hi Stephan, ... Ah! .. that worked very well. Fabulous. Thank you! I'm not sure what my earlier issue was.
So.. if I wanted that background image to only appear on, say, Namespace ID=4012, what would I edit it as?
The code:
.ns-4012 body.mediawiki {background-image: url(https://lh3.googleusercontent.com/mvHbePT-FyB8YpsjecAdCSvK7XoqOcsa4rqpCksWUD...) !important;background-repeat: repeat;}
Does not do what I hoped it would. Any thoughts?
Thank you so much! -Rich
On 2017-08-03 00:28, Evans, Richard K. (GRC-H000) wrote:
Hi Stephan, ... Ah! .. that worked very well. Fabulous. Thank you! I'm not sure what my earlier issue was.
So.. if I wanted that background image to only appear on, say, Namespace ID=4012, what would I edit it as?
The code:
.ns-4012 body.mediawiki {background-image: url(https://lh3.googleusercontent.com/mvHbePT-FyB8YpsjecAdCSvK7XoqOcsa4rqpCksWUD...) !important;background-repeat: repeat;}
Does not do what I hoped it would. Any thoughts?
Both "mediawiki" and "ns-4012" are classes on the <body> tag, so the selector should be: body.mediawiki.ns-4012
Ha! Got it..
body.mediawiki.ns-4012 {background-image: url(..myImageURL..)!important;background-repeat: repeat;}
does it.
Thank you so much! -Rich
Looks like I posted my question just a moment too soon ... I just found this: https://www.mediawiki.org/wiki/Manual:Using_custom_namespaces#Styling_namesp...
Thanks though, Cheers!
mediawiki-l@lists.wikimedia.org