views:

133

answers:

1

What are some pros/cons in using CSS as part of a theme instead of manually supplying <link> tag in the <head> section of a web page?

+1  A: 

In ASP.NET, using a theme makes it easier to integrate your CSS styles with the Localization, Accessibility, and Navigation features of that development platform.

Using your own manual CSS file (referenced from the HTML with a <style> or <link> tag) means that you have to maintain the file yourself, potentially including any browser-specific CSS code. However, going this route will probably afford you a higher degree of portability if, for instance, you decided to switch to another platform (eg. LAMP).

system PAUSE
“In ASP.NET, using a theme makes it easier to integrate your CSS styles with the Localization, Accessibility, and Navigation features of that development platform.” May I ask how CSS being a part of a theme makes it easier to integrate CSS styles with Localization…?
SourceC
Simply by indirection. If you use a theme per language (or target "culture") and the theme includes the CSS, then changing the theme (language) dynamically also changes the CSS. You don't have to generate the `<link>` tags dynamically or anything.
system PAUSE
thanx for your help cheers
SourceC