views:

162

answers:

2

Hi


I found few posts where people were basically complaining about themes and at the same time thought skins were useful:

a) But aren’t skins only used in combination with themes, thus isn’t a skin inseparable part of a theme?

b) So why are skins considered useful, while themes not so much?


Thanx

+5  A: 

Don't use either: use CSS. It's the de facto standard.

Parvenu74
Themes include CSS and more. See "Themes vs. Cascading Style Sheets" at http://msdn.microsoft.com/en-us/library/ykzx33wh.aspx
system PAUSE
“Don't use either: use CSS. It's the de facto standard.” But some control properties can’t be set using Css alone
SourceC
@SourceC: Please list the control properties to which you are referring when you say they can't be set with css alone.
Parvenu74
Off the top of my head - Calendar's SelectionMode property
SourceC
Then you need to be more specific with you question and add the relevant details. If you post a question about not being able to get ASP.NET pages to compile and run properly on the server but neglect to say you're trying to run them on nginx, then you're not going to get useful answers.
Parvenu74
+3  A: 

A theme includes one or more skins and CSS.

Allowing custom themes means allowing custom CSS, which is a vector for certain security exploits.

You can have just one theme, with multiple skins for that theme. The skins allow some freedom of choice in how things look, while avoiding potential security pitfalls.

Note that if you control your themes (you provide the themes, including CSS, rather than allowing users to upload their own CSS) then the security consideration isn't a big deal.

system PAUSE
What kind of security considerations are we looking at?
Stefan Kendall
@iftrue, there have been XSS (cross-site scripting) vulnerabilities and other exploits related to CSS parser bugs. I believe that all the known exploits have long since been patched in all browsers. Still, the general rule nowadays is that CSS is safe to use if you write it yourself, but don't let your users provide random, unfiltered CSS for display on your site.
system PAUSE
@PAUSE a) So skins can only be used together with themes? b) Are security exploits the main reason why people are complaining about themes?
SourceC
As far as I know, using a skin requires using at least one theme to register that skin.
system PAUSE
And while I'm not in the middle of the debate, I suspect that the anti-theme crowd actually prefers a CSS-only solution, which historically has been difficult to achieve in ASP.NET [http://www.codinghorror.com/blog/archives/000474.html].
system PAUSE
difficult to achieve because unlike Themes, CSS doesn't support all of control's properties?
SourceC
Difficult because Microsoft went and reinvented the wheel with skins and themes. Hopefully they are coming out of this mindset and will abandon such non-standard attitudes. The adoption -- and open sourcing! -- of MVC and jQuery are steps in the right direction. With any luck, MSFT will deprecate all non-CSSable controls in ASP.NET 4.
Parvenu74