This project is read-only.


Aug 11, 2012 at 7:19 AM

Just wondering what people think of this...what if, instead of using strings for css Classes and IDs, you could use a class of constants generated by T4MVC?

It seems CSS is a whole other area where error-prone strings are used when a more solid mapping between views and CSS files could be had.

Combine with something like SASS, and this could make working with CSS a lot more maintainable and pleasant.

Agree? Disagree? Is there something out there that already does this? (I saw something about minified CSS and JQuery, but I *believe* that was not what I'm referring to here...correct me if I'm wrong.)

Aug 14, 2012 at 3:42 PM

From my point of view it's a good idea.

It's important to find a short and convenient syntax to specify multiple classes for html tag.

Also there may be an issues for some developers. For example I'm usually creating HTML skeleton based on common CSS template and then after everything is working I'm starting to add CSS for the classes that I already specified in HTML markup.

As for IDs of the elements, not all of them are used to set CSS properties, part of them definitely will be used for Javascript. So with this implementation we can force developers to avoid usage of ID in CSS files and it's not so bad :)