FANDOM


This Forum has been archived

Visit the new Forums
Forums: Index Community Central Forum Common.css
FANDOM's forums are a place for the community to help other members.
To contact staff directly or to report bugs, please use Special:Contact.

50px-Replacement filing cabinet.svg

Note: This topic has been unedited for 3441 days. It is considered archived - the discussion is over. Do not add to unless it really needs a response.


After checking the source for a random page, I noticed that in the Oasis skin, it doesn't load Common.css, only Wikia.css. Common.css is supposed to affect all skins, is it not? After using &useskin=monobook to check the source in Monobook, I noticed that Monobook does in fact load Common.css. It also loads Monobook.css and Print.css, as well as many default css files. Why is Oasis neglecting Common.css? For reference, this is the page I picked.  Monchoman45  Talk  Contribs  Skystone  16:28,12/24/2010 

Because:
  • Wikia wants to break compatibility for other skins (even for MediaWiki itself). People start using Wikia.css instead of Common.css and then forget about it, so things look bad in other skins, another way to force users stay at the oasis skin instead of Monobook.
  • Also, to prevent old code to be included, code that is no longer compatible with Oasis (blame Wikia) and code that would be against the new Terms of Use.
A good practice is to place at the very top (note that it should be before any other CSS rule or else it won't work) of the mediaWiki:Wikia.css an @import to the MediaWiki:Common.css:
/*LEAVE THIS IMPORT ABOVE EVERYTHING ELSE*/
@import url("http://YOURWIKI.wikia.com/index.php?title=MediaWiki:Common.css&usemsgcache=yes&ctype=text/css&smaxage=86400&action=raw&maxage=86400");
CSS placed here will be applied to all skins on the entire site.
Remember to replace YOURWIKI with the correct location. --Ciencia Al Poder (talk) -WikiDex 18:39, December 24, 2010 (UTC)
Thanks, that should solve the problem. I still wish we had been informed of this, because the default text for Common.css remains "CSS placed here will be applied to all skins on the entire site." Wikia seems to be leading us blindly into more and more failures as time goes by.  Monchoman45  Talk  Contribs  Skystone  19:19,12/24/2010 
What does that code do? - I guess that it puts Wikia.css on top of Common.css... In that case, should we remove the contents of Common.css and replace it with an explanatory note or something? - cheers and thanks for this. --boy.pockets talk 00:00, January 5, 2011 (UTC)
That code does what it looks like it does: it imports Common.css to Wikia.css so that Common.css does what it's supposed to do.  Monchoman45  Talk  Contribs  Skystone  03:02,1/5/2011 
This is great! It works. I was able to remove all the duplicate CSS from Wikia.css. See:
http://cannabis.wikia.com/wiki/MediaWiki:Wikia.css
Just remember to replace YOURWIKI with the subdomain name of your wiki. I forgot at first and wondered why it wasn't working. I also added a link to this forum. Just be sure to comment it out with /*. --Timeshifter 19:51, January 27, 2011 (UTC)
Community content is available under CC-BY-SA unless otherwise noted.