Dynamic CSS with Razor (part 2)(www.h3mm3.com)

submitted by hemmehemme(189) 3 months, 17 days ago

In PART ONE we saw how to create a gradient programmatically in order automate a CSS stylesheet using the Razor engine. We started from a base color in the RGB space and converted it to the HSL space. Given its Lightness we could easily build shades and highlights of the starting color.

2 comments |category: |Views: 280

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 dpetersondpeterson(4397) 3 months, 17 days ago 0

It's an interesting approach, is the benefit just that you don't need an external compiler for less?

Reply

posted by hemmehemme(189) 3 months, 16 days ago 0

Yes, this is surely a benefit. Another one is to factorize and leverage your knowledge about one - powerful - programming language (Razor in this case) instead of studying new techniques/languages: too much effort for covering just a little portion of a web project.

Reply

information Login or create an account to comment on this story