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?
Hojjat
Huji schreef:
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 may be completely off here, just thinking out loud:
Not passing a useskin parameter doesn't mean the user doesn't want a skin, it means they want their default skin.
Roan Kattouw (Catrope)
On Fri, Feb 29, 2008 at 8:33 PM, Roan Kattouw roan.kattouw@home.nl wrote:
I may be completely off here, just thinking out loud:
Not passing a useskin parameter doesn't mean the user doesn't want a skin, it means they want their default skin.
Roan Kattouw (Catrope)
Correct. But the default skin is already served before this line is run. If no useskin parameter is provided, the CSS returned by that call is only a one-liner, with style pertaining A tag, which can be handled through a shared library.
Oh, and if we need a new CSS imported if a useskin parameter exists, why do we import it (with one line of information) when there is no useskin parameter?! A simple "if" can decide when to add a new @import, can't it?
I think (and hope) I'm missing something obvious here.
Hojjat
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)
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@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@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Probably missed them in Brion's comments but:
We import the dummy-titles CSS when no usecss parameter is passed, because it then imports the default for the user.
So, the usecss is merely a extra parameter passed when needed to prevent the defaults from being loaded instead of the skin being temporarily viewed. We still import it when usecss is not passed because then it returns the default stuff, for the default skin which is being viewed, so it still does return stuff we want.
And it should return stuff because that dummy titled css is returning css relevant to the user's preference no matter what skin you're in. It doesn't matter if you are in a temp skin, or the user's default, you're still loading their preferences and those are needed.
~Daniel Friesen(Dantman) of: -The Gaiapedia (http://gaia.wikia.com) -Wikia ACG on Wikia.com (http://wikia.com/wiki/Wikia_ACG) -and Wiki-Tools.com (http://wiki-tools.com)
Huji wrote:
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@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@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
For me, when no usecss parameter is passed, it only returns this:
/* generated user stylesheet */ a.new, #quickbar a.new { color: #CC2200; }
My question is, why don't we have these lines in Shared.css, for example?
On Sat, Mar 1, 2008 at 12:03 PM, DanTMan dan_the_man@telus.net wrote:
Probably missed them in Brion's comments but:
We import the dummy-titles CSS when no usecss parameter is passed, because it then imports the default for the user.
So, the usecss is merely a extra parameter passed when needed to prevent the defaults from being loaded instead of the skin being temporarily viewed. We still import it when usecss is not passed because then it returns the default stuff, for the default skin which is being viewed, so it still does return stuff we want.
And it should return stuff because that dummy titled css is returning css relevant to the user's preference no matter what skin you're in. It doesn't matter if you are in a temp skin, or the user's default, you're still loading their preferences and those are needed.
~Daniel Friesen(Dantman) of: -The Gaiapedia (http://gaia.wikia.com) -Wikia ACG on Wikia.com (http://wikia.com/wiki/Wikia_ACG) -and Wiki-Tools.com (http://wiki-tools.com)
Huji wrote:
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@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@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Huji wrote:
For me, when no usecss parameter is passed, it only returns this:
/* generated user stylesheet */ a.new, #quickbar a.new { color: #CC2200; }
My question is, why don't we have these lines in Shared.css, for example?
Those are specific to the selected skin and other user preferences. Thus they are not shared. Thus they are not in shared.css.
-- brion vibber (brion @ wikimedia.org)
Oh, got it! Thanks
~~~~~
On Mon, Mar 3, 2008 at 12:19 AM, Brion Vibber brion@wikimedia.org wrote:
Huji wrote:
For me, when no usecss parameter is passed, it only returns this:
/* generated user stylesheet */ a.new, #quickbar a.new { color: #CC2200; }
My question is, why don't we have these lines in Shared.css, for
example?
Those are specific to the selected skin and other user preferences. Thus they are not shared. Thus they are not in shared.css.
-- brion vibber (brion @ wikimedia.org)
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Huji wrote:
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?
There is a dummy title because that's just the way the CSS and JS generators are called.
We import generated CSS because that's how we get the CSS relevant to the user's preferences (skin selection and other preferences).
There is no "usecss" parameter, making the last part of the question meaningless.
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?
CSS is returned because that's how we get the user-preference-specific CSS.
There is no usecss parameter, so the second part of the question is meaningless.
-- brion vibber (brion @ wikimedia.org)
wikitech-l@lists.wikimedia.org