Friday, August 15, 2014

Cascading Style Sheet (CSS) in Web applications

Generally people associate CSS with the color and font of site. The perception is that the CSS will help in making jazzy looking site with cool colors and fonts. This is also true, but more than that it's important to understand that CSS is not just about colors and fonts. It can handle many other aspects of a web application in a more transparent and maintainable way. Have a look at http://www.csszengarden.com/ and see that just by changing the CSS themes, entirely different look and feel is achieved.
Whenever you are planning a web application, theming should be an important element to be taken care of. Do not relegate it to the end of the project when first styles are managed in a style attribute and than in a hotch potch way moved to an external css file. It will create more problem than you can thought of.
The better approach is to take the theming right in the beginning of the project. If not comfortable about the structure than use one of the scaffolding code generators like roo or seam and see how they handle the theming.
Beyond color and font, CSS should be used for the following:
  • Handling layout of the web application
  • CSS can control the styles based on the system on which the final output is going to be rendered. It can control the visibility and other styles based on whether the output is to be rendered on printer or on web browser or on a mobile or is meant for braille instrument.
A good theme which includes appropriate selection of look and feels provides a higher confidence level to all stakeholders. Also theme if mocked out properly gives a consistent mental model to all involved

No comments:

Post a Comment