Brion,
Thanks for your thorough and informative response. I'm afraid I haven't yet
got my answer here. What I'm asking is:
* Why do we import the dummy-titled CSS when no usecss parameter is passed?
Or even if there is really a reason to do that, which I'm missing
carelessly, I can extend my question to:
* Why should the dummy-titled CSS code return anything when no usecss
parameter is passed?
Hojjat
On Fri, Feb 29, 2008 at 11:02 PM, Brion Vibber <brion(a)wikimedia.org> wrote:
Huji wrote:
This may be the dumbest question I've every
asked, so go easy with me
please! In SkinTemplate.php we have this:
$sitecss .= '@import "' . self::makeUrl( '-',
"action=raw&gen=css$siteargs$skinquery" ) . '";' .
"\n";
I understand that it helps when a useskin parameter is passed; what I
don't
understand is, why does it have to return a value
when no such a
parameter
is passed? It can simply return
"nothing", can't it?
I don't understand what you're asking.
Are you asking:
* Why do we import generated CSS?
CSS specific to the skin and the user's preferences is generated. Rather
than embedding this into every page's HTML, it's offloaded to a separate
URL which can be cached.
This may include user- and skin- specific CSS pages pulled from the wiki
(at the moment these are pulled separately for CSS, but they are merged
together for JS) as well as style definitions based on the user's
preferences -- for example overriding the float location of a toolbar,
or the style of links.
The exact code that's pulled will depend on the user's skin selection
and preferences.
* Why does the URL include a '-' character for the title?
This is a dummy title. The 'gen=css' parameter overrides any title
parameter.
* Why does it include a useskin parameter?
When the containing page has a useskin override, this has to be passed
on to the CSS generation. Otherwise, CSS for the user's default skin
would be generated by the backend.
* Why doesn't it include a useskin parameter?
A parameter is not necessary when a useskin override is not present. The
appropriate skin for the user's preferences will be used.
-- brion vibber (brion @
wikimedia.org)
_______________________________________________
Wikitech-l mailing list
Wikitech-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
_______________________________________________
Wikitech-l mailing list
Wikitech-l(a)lists.wikimedia.org