On Wed, Aug 6, 2008 at 10:59 AM, Simetrical
<Simetrical+wikilist(a)gmail.com> wrote:
On Tue, Aug 5, 2008 at 10:18 PM,
<dantman(a)svn.wikimedia.org> wrote:
Revert r38675:
This commit was clearly not thought out and poorly implemented.
* The Sanitizer has not been used
* Proper implementation of this would follow the same convention as the other classNames
and have a 'skin-' prefix
Consistency in the code organization wasn't even kept, a bit of code was just lazily
tacked onto the end of another line.
The Sanitizer doesn't need to be used, since any valid PHP identifier
is a valid CSS class. The point about the prefix is valid. Also, we
need to carefully think about how many new classes we want to spam
onto the body element. What's the use-case here? CSS is loaded
conditionally based on skin already, and for JavaScript I'm pretty
sure it's already provided in a variable.
_______________________________________________
Wikitech-l mailing list
Wikitech-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
It is, and I made a comment to that effect on the bug (15052,
for those not following). A "skin" variable was added to the list
of available Javascript variables for just this reason: for times
in which a user script (in this case, widget) wants to do
something conditionally based on skins. If the widget maker is
upset because they have to do their skinning based on a
Javascript variable as opposed to using a class, well then
I'm sorry.
To further Simetrical's point, I would like to see a situation in
which this would prove useful and the skin variable not suffice
before lazily tacking on more classes to the body element
(there's enough as-is, IMO). There's a few other bugs on this
same type of question (classes for subpages, etc.), but I can't
seem to dig up the numbers (someone mentioned them in
#mediawiki last night, but my logs for that are oddly missing...)
-Chad