[Javascript] dynamically reading/changing values in a css class from javascript
Mike Dougherty
mdougherty at pbp.com
Sat Jun 16 09:16:32 CDT 2007
On 6/15/07, Billy Reisinger <billy.reisinger at gmail.com> wrote:
> I'm not sure if you're being hyperbolic on purpose, but I wanted to
> point out that there are instances when it would be practical to mess
> around with stylesheets; for example, the case in which you are
> writing a debugger and wish to allow the user to declare a new
Of course. Writing a debugger is hardly a typical use. My
'hyperbole' is mainly against programmatically altering styles in the
stylesheet simply because it is possible and the developer doesn't
know of another way. ex: If I wrote every one of my functions to be
scoped to the window and used 2 letter function names, I would hope
someone would explain 'readability' and mention the possibility of
collision problems if I my code were ever reused in another project.
I don't have a specific example of how manipulating stylesheet
definitions with javascript is bad, but intuitively it doesn't seem
(to me) like a good idea. Just my 2 cents.
More information about the Javascript
mailing list