I don't think I am confused. My view of themes are as follows: When
dynamically generating the ids of elements that were rendered from
server controls on a page, microsoft broke css selectors that were
based on id's for asp.net controls. Furthermore microsoft broke css
selectors that were based on the type of control by using server side
control tags that do not match the tags of elements which are rendered
on the html page. I am not arguing they made poor decisions here, just
that these decisions had consequences to css.
To correct this, microsoft has built a server side method to change the
look and feel of your rendered html called themes. This is a great
idea, but I feel themes should have paralleled the concepts that were
used in the making of css since in most cases themes will be realized
with css.
Alan Silver wrote:
I think you might be confusing themes with CSS. A theme is an overall
visual style for a page. Just like a page can only have one title, it
can have only one theme. Sure elements in that theme can cascade, that's
part of the CSS that makes up the theme.
This is exactly what CSS is! You can build one stylesheet (or set of
stylesheets) that has a completely different visual style than another
and so on. See
http://www.csszengarden.com/ if you want an example.
Ever heard of alternate stylesheets?
CSS rules can be used to style a particular type of element (e.g. input
{ color: red }) or even all elements that have a common attribute (e.g.
input[type="text"] { color: red }) (with the proper browser support) in
addition to the typical class and id selectors that are most commonly
used. Is this not what skin files are doing?
I am not arguing for multiple themes on a page. I am arguing for one
abstract theme that is the combination of many actual themes or for
themes that inherit from other themes. I don't care who stores the
relationship, I just want reuse of common components to be shared!
Because themes are *not* stylesheets!! Stylesheets are a component of
themes.
Yes, but I sure wish they were!
Well, if you have common files, don't put them in the theme folder, put
them somewhere else and manually add a reference to them in your master
page.
Pretty easy to do and robust.
Yes, but this is hacky. What if I wanted to change one or more common
stylesheets in some themes but not in others? I don't want to build
some nasty proprietary framework for this!
>
2) css by nature is cascading. Not provided themes that inherit from
each other breaks this cascading ability.
No it doesn't, themes are NOT CSS!!
Yes it does. How can my style rules cascade when every stylesheet is
included in every page? Note that I am discussing cascading among
external stylesheets, not cascading from external stylesheet to style
element in page to inline styles. I generally try to avoid putting my
css in my html page if possible.
Ah, now here you have finally hit on a genuine weakness of themes. Not
one that will render them as bad as you claim, but a weakness that needs
to be addressed nevertheless.
Why not just build one giant
ugly stylesheet for every theme?
Why? This is not a weakness in themes, it's a CSS issue.
I think you misunderstood this comment. My comment related to all
stylesheets from one theme being included in every page. Why do I need
multiple stylesheets when I could just throw all of my style rules in
one giant stylesheet? At this least way the browser will have to
perform less requests to get external files...
No offence, but it sounds to me like you are really confused about what
themes actually are. Sure they have their weaknesses, but your rant (as
you called it) doesn't centre around them.
none taken. hopefully we can both learn something from our
disagreement.
>
Themes are a very powerful tool in designing a site. You just have to
know what they can and can't do. More to the point, you have to know
what they are and are not intended to do.
HTH
--
Alan Silver
(anything added below this line is nothing to do with me)