User:Magill/project-understanding-css
Jump to navigation
Jump to search
Overview
This page contains an assortment of notes about CSS usage at lotro-wiki.com
A css question
I don't know if I'm asking the right question here: Are there multiple CSS "defaults" -- MediaWiki:Common.css is the only one I know of.
However, I've seen a random assortment of class="<table>" parameters
- Wikitables
- TopTable
- Documented at: Help:Advanced Editing III are:
- wikitable
- darktable
- altRows
- stocktable
- mptable
- altRowsMP
- That page states that capitalization is important.
- I don't know how much of that page is still valid, I think most all of it comes from 2008.
Looking at https://www.mediawiki.org/wiki/Manual:Collapsible_tables I get the impression that much of this is javascript params, not css.
- I think what I'm trying to find out is -- what "class=" options exist for making tables and where are they listed or documented.
- This (these?) is an absolutely good question, and the short answer is that MediaWiki:Common.css is indeed our main CSS file. Anything beyond that is hidden somewhere in the software out of our reach. (
class=wikitable
must be part of the latter, as it's available by default from MediaWiki.)
- Unfortunately, it's not quite that straightforward because Common.css doesn't have everything. A lot of stuff is also used by the (many and widespread) Javascript files: you'll find for example that the second function in MediaWiki:Common.js asks (on the seventh line) "
if table hasClass collapsible
" even though a collapsible class for tables is never defined in Common.css.
- When in doubt, head to MediaWiki:Common.css and do a quick Find on the class you're looking for. If it's not there, it's probably in the Javascript somewhere. If that ever gets consolidated and cleaned up (Lotroadmin has asked for this a couple of times...), we'll have to make sure there are comments in the code to make finding classes easy there, as well.
- And, yes, the class names are case-sensitive, so capitalization is important. According to e.g. this StackOverflow question, it's not the CSS that's case-sensitive, but the HTML class names. So whenever we do
class="xyz"
, it needs to match the definition exactly.
- Finally, it's my hope that we can someday standardize, organize, and expand the classes that we have available to make formatting easier. For example, we have centerTable, which centers everything in the table, and I once added centerTableFirst, which only centers the first column. I'm not sure if having lots of little classes like these would be helpful or just confuse people more, though. (I envision, for example, making a table with
class="centerFirst centerThird"
and then just ignoring alignment for the rest of the day.)
- Hope this helps! Like everything else around here, CSS/JS need work and documentation. :) Sethladan 19:07, 20 December 2013 (UTC)
Options defined in MediaWiki:Common.js
case "altRows":
setAlternateRows( tbl, parseClass );
break;
case "altRowsMed":
setAlternateRows( tbl, parseClass );
break;
case "altRowsMed2":
setAlternateRows( tbl, parseClass );
break;
case "altRowsSmall":
setAlternateRows( tbl, parseClass );
break;
case "altRowsMP":
setAlternateRows( tbl, parseClass );
break;
default:
The following Javascripts are included on every page load
- [[Help:Tooltips]] -- does not exist... was it intended to be?
- User talk:Eleazaros/Tooltips Help
- User talk:Eleazaros/tooltip.js -- which was redirected to, from: User:Eleazaros\Tooltips
Hmmm...need to re-write this some more? and stick it someplace for people to read and remember --
- The LOTRO-Wiki Uncertainty Principle
- This is the usual situation with stats and prices (especially for equipment): The observer's "modifiers" -- vendor discounts, buffs, passive and active skills, and traits -- all modify the information displayed in the in-game tooltip!
- The player needs to remove those modifiers on their character in order to collect the "base stats" (-- and then add those modifiers back to their character when they resume play). However, that is not always possible, for instance with the Vendor Discounts acquired from Reputation.
- Simply "back calculating" is not always completely accurate as we do not know the "rounding" effects of however many decimal places Turbine uses in their original calculations.
- I.e. the individual collecting the information needs to be aware of THEIR own buffs in effect, and subtract them from the tool-tip accordingly.
- (Re: Heisenberg: While the act of measurement does lead to uncertainty, the loss of precision is less than that predicted)
- This is similar to the difficulties with the KoLM ratings. Those values are relative to the observer. Hence the parameter: "inspector-lvl" (i.e. the level of the Lore-master who inspected the mob) in the Creature Template.
- At Lotro-wiki, for travel prices, we show the pre-discount prices.
- For item stats, this becomes more complex, and perhaps even impossible, to compensate for the effects of those skills and traits.
- One partial solution is for "non-class" characters to collect/verify information on "class specific items."