CssHandler: CSS + Variables (www.squaredroot.com)

submitted by TroyMGTroyMG(2670) 2 years, 2 months ago

A new release of the CssHandler Rory Blyth created over three years ago. This HttpHandler adds variables, server-side includes, compression, and more to your CSS files.

10 comments | category: | Views: 21

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:

Comments:

posted by gt1329agt1329a(7460) 2 years, 2 months ago

This seems like something you shouldn't do.

posted by TroyMGTroyMG(2670) 2 years, 2 months ago

Why do you say that gt? It all gets output as standards-compliant to the browser.

posted by yesthatmcgurkyesthatmcgurk(3805) 2 years, 2 months ago

Wow, lots of people joining the site just to kick this story... ಠ_ಠ

posted by gt1329agt1329a(7460) 2 years, 2 months ago

Separation of concerns. It doesn't make sense to overload it with this to me. Finding this while maintaining a project would be like finding cobol in an HTML file.

Don't get me wrong. It's neat what you've done, but I would just hate to run into it in the wild. I expect CSS to be... CSS.

posted by TroyMGTroyMG(2670) 2 years, 2 months ago

Three people so far. The person who created the CodePlex project originally (gmoothart) and two coworkers (ddouglass and ssansom). Is that frowned upon?

posted by yesthatmcgurkyesthatmcgurk(3805) 2 years, 2 months ago

Only frowned upon if you're using sock puppets. We all look forward to further participation in this great site by you and your co-workers!

posted by TroyMGTroyMG(2670) 2 years, 2 months ago

gt, I can see where you are coming from with separation of concerns, but really defining constants isn't what I think of as adding business logic or the like to css. I personally find it to be an extension of the Don't Repeat Yourself philosophy. Besides the variable support there is also the comment and whitespace stripping, which is commonly done manually for both css and javascript. I find it preferable to do it on the fly rather than keep a separate file (the source version and the compressed version).

posted by TroyMGTroyMG(2670) 2 years, 2 months ago

On a sidenote, I want to make sure Rory Blyth is credited with creating this and doing the work on the variable/constant replacements. I just added some additional features. I mention it on both the blog entry and the codeplex site, but I don't want to appear to be taking credit for his work.

posted by DannyDouglassDannyDouglass(1200) 2 years, 2 months ago

I did join the site to kick this tool, but it is mainly because I have worked with this tool on a project with Troy and LOVED it. Something so simple made managing our CSS much easier. I am certainly not new to downloading from CodePlex and hope that I can participate on other levels in the future!

gt, I understand your concern. In fact, the first time I saw this in action I had to take a second look to realize what was happening as I was not aware of it being implemented. It has been a very helpful tool in my projects since that point.

posted by DancoeDancoe(100) 2 years, 2 months ago

it sounds cool, there may be some crazy stuff you could do with an csshandler. user preferences, role base styling, etc.

information Login or create an account to comment on this story