Themes and Skins Vs Css

N

New Bee

Hi,

I have been looking at Themes and Skins today and now resonably understand
how they work at a ground level. But I have a couple of questions.

1. ) StyleSheetTheme

I dont understand where this would be used. As I understand it the
precidence is like this.

StyleSheetTheme
ControlProperties
Theme

So I am at a bit of a loss as how and where one would use a StyleSheetTheme
over a Theme.


2.) Design Support for Skins

No Intellisense exists for this, so its a bit like stepping back in time to
a life before intellisense existed for CSS Development, you have to either
Know the properties or do it first on the page and just copy it accross.
This to me is a little archaic. Perhaps someone has a different view ?


3.) Using CSS with or Vs Themes

What strikes me here is that the properties of a control do not address all
the layout properties of Css. So you cant really get away without doing both
if you are to have full seperation between application and layout. This
makes things rather complex in designing a web site where all these design
abstractions are being used.

I was wondering if there is someone here who has sufficient experience with
using all three to come up with some usefull and hopefully simplistic advice
which can direct a developer on at least how to approach the task without
getting tied up in all sorts of knots.


Many Thanks.
 
K

Kevin Spencer

I would (and do) use CSS alone. I see no need for any additional complexity
than an external CSS style sheet. If the pages are designed correctly, you
can do an immense amount of layout manipulation using CSS alone (see
http://www.csszengarden.com for some startling examples). As for the
properties of a Control not addressing all of the CSS layout properties,
you're wrong about this. Every WebControl has a CssClass property, which
sets the "class" attribute of the client-side container element. By using
this, you can do all of your styling using a CSS style sheet. The only
reason you would need the other layout properties (which are rendered as
inline CSS styles) is to override the style sheet (inline styles trump style
sheet styles) temporarily, that is, programmatically for a specific
purpose).

CSS is immensely powerful, once you understand the Selector rules. Even if
you have a Component Control, your style sheet can specify the styles of any
child elements inside an element of a given class. Using CSS, you get the
best separation of UI elements from UI layout and styling rules.

I recently created a "Template" site which uses a very similar XHTML layout
to the www.csszengarden.com web site, and replaces divs with panels and
nested PlaceHolder controls in a MasterPage. I can use this to create a site
with virtually any layout and structure. For an example of the site in
actual practice, see http://www.miradyne.net.

--
HTH,

Kevin Spencer
Microsoft MVP

Printing Components, Email Components,
FTP Client Classes, Enhanced Data Controls, much more.
DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net
 
N

New Bee

Thanks for your reply Kevin.

//
As for the
properties of a Control not addressing all of the CSS layout properties,
you're wrong about this. Every WebControl has a CssClass property, which
//

You misunderstood me. I am fully aware that there is a CssClass property.
What I meant was that the controls do not have an attribute for each css
property, which would mean that you could not get away without using CSS if
you wanted seperation of styling. In other words, if one wanted to use
Theme's alone, one could not satisfy all the styling required and would have
to additionally resort to css for styling.

So, the question was if there was someone who 'Had' found a cogent and
resonable reason to use Themes over or With CSS, and what their experience
was.

Hopefully, I now have cleared up my question a little.


Cheers - NewBee
 
B

Brandon Driesen

There is a compelling reason to use themes over skins.

For one, you can use User Properties and save user-selected Themes which can
be applied on a per-user basis once they are logged in. This is so because a
Theme is a collection of images, css files as well as skin files that allow
for in-built grouping of UI elements.

For another, by using skins, you can apply consistent UI settings on web
controls.

I find the use of themes a maintenance helper for large websites.
 
N

New Bee

Hi Brandon,

The question wasnt really about Themes Vs Skins, moreover it was (
Themes/Skins ) Vs Css.

Skins allow only some formatting, while css allows the full style
seperation. Having done a lot of CSS I know how powerful it is. But getting
a good Css design is not allways as easy as it sounds. Esp when you are
designing scalable web sites.

I understand the concept of skins, but Im trying to evaluate how much value
there is in using them over css. Granted, there are elements you cant set in
css, but I wonder actually how much value there is in this.

I can change css just as easily for a user as I can a theme. Im looking for
expert direction.
 
B

bruce barker

i use themes and skins to apply css only. the theme picks the
stylesheet, the skin picks css classes when necessary.

-- bruce (sqlwork.com)
 
J

Just Me

OK, so if I understand you here, what you are saying is that you dont
actually use the skin markup, you simply use that functionality to connect
css pages to controls ?
 
K

Kevin Spencer

I didn't misunderstand you. You wanted to know whether you should use
Themes/Skins vs. CSS. I was pointing out that there is no disadvantage in
using CSS with regards to Controls, as the CSS for the Controls can be
managed fully with the CssClass combined with the various properties of the
Control, and indeed, any inline CSS style may be added to the Control
separately. If you take that fact, along with the sheer power of CSS
properly used, you have no disadvantage at all using CSS alone.

--
HTH,

Kevin Spencer
Microsoft MVP

Printing Components, Email Components,
FTP Client Classes, Enhanced Data Controls, much more.
DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net
 
J

Just Me

Yeah ok


Kevin Spencer said:
I didn't misunderstand you. You wanted to know whether you should use
Themes/Skins vs. CSS. I was pointing out that there is no disadvantage in
using CSS with regards to Controls, as the CSS for the Controls can be
managed fully with the CssClass combined with the various properties of the
Control, and indeed, any inline CSS style may be added to the Control
separately. If you take that fact, along with the sheer power of CSS
properly used, you have no disadvantage at all using CSS alone.

--
HTH,

Kevin Spencer
Microsoft MVP

Printing Components, Email Components,
FTP Client Classes, Enhanced Data Controls, much more.
DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net
 
C

Cowboy \(Gregory A. Beamer\)

Ultimately, skins and themes are methods of simplifying UI look and feel
(aka customization or personalization). You can accomplish everything you
need with CSS, but you will have to be in control, so you lose a bit of the
drag and drop. But, this is not as bad as it seems, as you have found out,
since few people seem to really be grabbing the whole theme and skin idea
(more so for themes than skins). CSS is not going away, not sure about the
rest and with WPF/E (aka Silverlight) on the horizon, it is likely our UIs
will change (that could be bleeding edge as well, just like themes and
skins).

My advice: Focus on CSS first. You can always combine it with the Microsoft
specific stuff, but a good solid understanding of CSS will take you far no
matter which way the ship turns. I would then delve into Themes and SKins if
time allows.

Personally, other than my experimentation in the beta, I have not used
Themes and Skins and I have multiple sites using the exact same engine (ie,
skinnable). I have found the Themes/Skins direction to be half-baked. It is
great for someone without the time for the learning curve to build his own,
but it is so half-baked as to be unusable in Enterprise level software. Your
mileage may vary.
 
N

New Bee

Thanks Cowboy,

I see a pattern of concensus growing here.

I feel the same way about master pages , they dont seem worth the bother to
be honest. Ive had more problems in getting around the problems which they
cause than the problems that they solve. I think for my money, using
controls for menus and footers if far better than faffing around with master
pages.

What do you think ?
 
L

Larry Bud

3.) Using CSS with or Vs Themes

What strikes me here is that the properties of a control do not address all
the layout properties of Css. So you cant really get away without doing both
if you are to have full seperation between application and layout. This
makes things rather complex in designing a web site where all these design
abstractions are being used.

I'm not sure why you think it's an either/or proposition. A Theme
defines a group of a skin and css file. You create a skin of a
control, such as a GridView, and apply your stylesheet to it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,571
Members
45,045
Latest member
DRCM

Latest Threads

Top