SitePen/dgrid — pull request #758 by dylans (2013-10-25 18:34:51+00:00)
Title: Stylus refactor of dgrid CSS

This is the work to refactor dgrid's CSS into Stylus. I have compared the generated CSS with the original CSS, as well as run through the test suite. A few notes:

To compile, make sure Stylus and nib are installed, and then run a command like this:
stylus skins/ --use nib

In an attempt to show the differences between each theme, the first 62 lines of each skins/*.styl file are in the same order, with unused rules commented out. Unfortunately, this is resulting in the commented out rules being preserved in the output CSS, unless we use the compressed version of Stylus' output (which may be a better option once this is reviewed). Otherwise, we would probably want to create a separate variables file for each theme, to prevent the comments from appearing in each CSS file for the unused rules. Or we could just remove the unused rules after the themes are evaluated.

default.styl is the full list of rules. A file like this may be useful for people creating a new theme, if it received a neutral set of rules

Some of the themes do not provide IE6-8 fallback gradients. Let me know if these should be added or not.

There are a couple of other TODOs for rules that don't make sense and should probably be removed.

Finally, my choice of names for variables isn't necessarily the best, but I tried to be consistent. That said, the underlying names are fairly inconsistent because we sometimes use the theme roller names, and sometimes our own. This exercise may make it easier to clean that up later. Hopefully by making each skin have a consistent variable structure, it will be easier to clean this up with perhaps more logical variable names.

Any other feedback or suggestions are greatly appreciated. This was my first significant work with Stylus, so I'm sure there are things I could be doing differently.