One of the often-touted new features of VS 2008 is the improved CSS support.
I like having intellisense for CSS, sure, but I dont’ want to have a warning for classes that don’t exist…. like this:
That green squiggly indicates a compiler warning. It can’t find the CSS class, (which is referenced in the Master Page).
But there are other reasons why you might want to define a class without defining an associated style. You might be using it to distinctly select elements from the DOM using javascript.
The ever-so-awesome prototype framework introduced this syntax:
$$(‘.info’)
which would select all of the elements with a class name of “info” for you to work with.
Just about every other javascript library out there now supports this syntax (or a similar one).
If this bugs you, you can turn it off by checking this box (in Tools -> Options) :
You may not want to do this, though… it could potentially save you time if you’re looking for a rendering bug.
Another part of VS 2008 that I don’t really care about is this CSS designer. I can’t imagine anyone who would actually use this.
I mean, come on… look at it!
I guess if you don’t know CSS very well, you might want some options. But that form is more confusing to me than border-top: solid 1px #999;.
(and one could argue, if you don’t know CSS, should you be defining styles at all?)
I really applaud Microsoft’s attempt to bring a better CSS development experience to the masses, but I think they missed the mark on this one.
I'm Ben Scheirman. I am a .NET software developer with a strong interest in agility. I work as a Principal Consultant with Sogeti.
Read more here.
email me
Ads by The Lounge
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.