https://bugzilla.wikimedia.org/show_bug.cgi?id=27488

--- Comment #24 from Nux <[email protected]> 2011-04-04 20:03:04 UTC ---
(In reply to comment #23)
> (In reply to comment #22)
> > [ ... ] For example if your script
> > is to change something conditionally then it cannot be handled with CSS 
> > alone.
> > This is only possible if you use doc.write in the header to create the CSS.
> 
> You may not have meant it this literal, but on itself I think this is nuts. 
> Can
> you show an example of something that should be done in CSS, but has a
> condition that can only be done through JavaScript and must be implemented via
> document.write ? (note that this is kinda offtopic, is more appriopiate for
> wikitech-l or mediawiki-l mailinglist)

This is anywhere where you dynamically change a state of user interface and
save it to (e.g.) a cookie. If a browser doesn't wait for the script (this
happens when they are at the bottom of the page) then the interface will
flicker while changing after it has appeared to be ready. Of course this could
also be done with server-side scripts but that's effectively the same as
doc.write in the header.

So interface changing scripts are one problem - the other one are scripts that
are in fact libraries which (as shown in 2nd attachment) can currently still be
unready even when doc.ready is fired.

If you meant that it would be crazy to need to create rules inside JS, then
it's not crucial for me - you could load various CSS files in various
conditions. Still I find it easier to have CSS rules all in one file along with
the script. I agree that debate on evilness of such preference would be a bit
too OT for this bug ;-).

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to