Difference between revisions of "MediaWiki talk:Common.css"

From Yugipedia
Jump to: navigation, search
(Wikitable classes)
Line 46: Line 46:
  
 
:::It's a ''Wikia ACG'' thing as I said. All the wiki that are part of the ''Wikia ACG'' project reference the global code which include the box class. I haven't created documentation on the box class itself yet, but at [[Anime:Project:Visual Classes]] I do have information on the other classes such as the <code>fill-horiz</code>. Unless someone posts some objection to [[Yu-Gi-Oh!:Community Portal#Wikia ACG]] then the Yu-Gi-Oh! Wiki may join the project as soon as tomorrow, at which point the css here would have the code added to reference the global CSS/JS and the Global templates will be synced here. ^_^ At that point all this stuff will begin to work. ~<span style="font-weight: bold;" title="Dantman does not work for Wikia">NOTASTAFF</span> [[Anime:User:Dantman|Daniel Friesen]]<small>-[[User:Dantman|local]]</small><small> (DanTMan, Nadir Seen Fire)</small> <sup>([[User_talk:Dantman|talk]])</sup> <small>Sep 25, 2007 <sub>@</sub> 02:18 <sup>(UTC)</sup></small>
 
:::It's a ''Wikia ACG'' thing as I said. All the wiki that are part of the ''Wikia ACG'' project reference the global code which include the box class. I haven't created documentation on the box class itself yet, but at [[Anime:Project:Visual Classes]] I do have information on the other classes such as the <code>fill-horiz</code>. Unless someone posts some objection to [[Yu-Gi-Oh!:Community Portal#Wikia ACG]] then the Yu-Gi-Oh! Wiki may join the project as soon as tomorrow, at which point the css here would have the code added to reference the global CSS/JS and the Global templates will be synced here. ^_^ At that point all this stuff will begin to work. ~<span style="font-weight: bold;" title="Dantman does not work for Wikia">NOTASTAFF</span> [[Anime:User:Dantman|Daniel Friesen]]<small>-[[User:Dantman|local]]</small><small> (DanTMan, Nadir Seen Fire)</small> <sup>([[User_talk:Dantman|talk]])</sup> <small>Sep 25, 2007 <sub>@</sub> 02:18 <sup>(UTC)</sup></small>
 +
 +
:::: Aah, sorry, my bad... At any rate, I really hope this happens, so I can eliminate a whole lot of CSS (and get to play around with several other interesting classes I noticed on the doc page ;) ). This stuff actually sounds like it would be very useful if implemented across the whole of Wikia, instead of just on this one group of wikis. It would certainly make it easier on those who are just starting up a wiki, in any case... --[[User:Dinoguy1000|Dinoguy1000]] <sup>[[User talk:Dinoguy1000|What?]]</sup><sub><span style="color:green">[[Special:Contributions/Dinoguy1000|I did it!]]</span></sub> 16:34, 28 September 2007 (UTC)

Revision as of 16:34, 28 September 2007

Wikitable classes

Could someone add the following CSS? It'll allow the use of the .wikitable (and .prettytable) class:

table.wikitable,
table.prettytable {
  margin: 1em 1em 1em 0;
  background: #f9f9f9;
  border: 1px #aaa solid;
  border-collapse: collapse;
}

table.wikitable th, table.wikitable td,
table.prettytable th, table.prettytable td {
  border: 1px #aaa solid;
  padding: 0.2em;
}

table.wikitable th,
table.prettytable th {
  background: #f2f2f2;
  text-align: center;
}

table.wikitable caption,
table.prettytable caption {
  margin-left: inherit;
  margin-right: inherit;
  font-weight: bold;
}

table.prettytable code,
table.wikitable code {
  background-color: transparent;
}
There is actually an alternative method. Wikia ACG has a Box CSS Class system which is a technique created in css which is meant to allow for styling of tables, messages, and many other types of elements. The key thing about it over use of wikitable being it's ability to be used in many different situations, and easily altered to do something different.
This is the class set which is commonly used which basically duplicates the styling of wikitable.
class="box table colored bordered innerbordered type-basic"
The box in there starts the use of the box class, the table defines the various margins, positioning, and other spacing for the element, the colored signals that the table should be colored, the bordered signals that an external border should be placed around the table, the innerbordered signals that the interior td's should have a border, and the type-basic give it the standard greyscale wikitable type coloring.
It can even be expanded to do more. If you want it to fill the width of the page you can add fill-horiz to it. And if you want to have a master td, with lighter td's then you can give the master td a code="mainheader". For something else pretty useful, if you want to have a table in wikitable style with left oriented headers at the left, then you can add cell-align-left or th-align-left and add class="mainheader" to the th headers up top which in turn will have a darker background than the left oriented th's along the left, and also be center aligned like they normally are.
There are a few dozen other uses for the Box class, including easily switching styles to different color schemes, and various other types of element styling. ~NOTASTAFF Daniel Friesen-local (DanTMan, Nadir Seen Fire) (talk) Sep 25, 2007 @ 00:45 (UTC)
Awesome, I didn't know that previously. I'll have to test it out (in case you're curious, I was wanting this added originally so I could remove most of the hardcoded CSS from the templates I was developing for user card lists (see my userpage for what I'm talking about)). --Dinoguy1000 What?I did it! 01:05, 25 September 2007 (UTC)
Hmm... Now that I try it out, it doesn't seem to be working for me. Looking through the CSS, most of the classes don't actually seem to be present, either. Am I still missing something? Is there a page I can go to that has detailed usage instructions for the Box CSS Class system? --Dinoguy1000 What?I did it! 01:12, 25 September 2007 (UTC)
It's a Wikia ACG thing as I said. All the wiki that are part of the Wikia ACG project reference the global code which include the box class. I haven't created documentation on the box class itself yet, but at Anime:Project:Visual Classes I do have information on the other classes such as the fill-horiz. Unless someone posts some objection to Yu-Gi-Oh!:Community Portal#Wikia ACG then the Yu-Gi-Oh! Wiki may join the project as soon as tomorrow, at which point the css here would have the code added to reference the global CSS/JS and the Global templates will be synced here. ^_^ At that point all this stuff will begin to work. ~NOTASTAFF Daniel Friesen-local (DanTMan, Nadir Seen Fire) (talk) Sep 25, 2007 @ 02:18 (UTC)
Aah, sorry, my bad... At any rate, I really hope this happens, so I can eliminate a whole lot of CSS (and get to play around with several other interesting classes I noticed on the doc page ;) ). This stuff actually sounds like it would be very useful if implemented across the whole of Wikia, instead of just on this one group of wikis. It would certainly make it easier on those who are just starting up a wiki, in any case... --Dinoguy1000 What?I did it! 16:34, 28 September 2007 (UTC)