ASP.NET themes suck

  • Thread starter Clinton Farleigh
  • Start date
C

Clinton Farleigh

Hi,

I was going to ask a question, but I think I've answered it so now I am
going to rant about how crappy ASP.NET themes are instead.

As I've indicated above, my problem today is with themes. Per
microsoft "Only one theme can be applied to each page. You cannot apply
multiple themes to a page, unlike style sheets where multiple style
sheets can be applied."

Quote is from here:
http://msdn2.microsoft.com/en-us/library/ykzx33wh.aspx

Basically this says to me that themes cannot cascade (or inherit from
each other) like stylesheets. Right away I see a few obvious problems
with this:
1) you cannot share resources between themes. Every common file must
be duplicated in every theme that uses it (with exception of image
files as far as I can tell). Even completely different themes are
likely to have at least some elements in common.
2) css by nature is cascading. Not provided themes that inherit from
each other breaks this cascading ability. Every stylesheet in your
theme will be included on every page. Why not just build one giant
ugly stylesheet for every theme?

Why does Microsoft have to try to be smarter than the w3c?

If anyone has any suggestions or corrections please feel free to let me
know! I appreciate any help or criticism.

Thanks.
Clint.
 
C

Clinton Farleigh

oh well I guess it's back to the old broken stylesheet model where I
code around the ids of elements that correspond to server side
controls....

If anyone from the asp.net team reads these newsgroups, I think it
would be really nice if there were server-side type stylsheets (e.g.
css like) where id's of server side controls are generated and inserted
into a generated stylesheet that the client requests. Of course I
haven't spent a lot of time thinking this through so maybe this isn't
viable. I think this would be millions better than this xml skin crap.

Clint.
 
A

Alan Silver

Hi,

I was going to ask a question, but I think I've answered it so now I am
going to rant about how crappy ASP.NET themes are instead.

OK, but I'm going to rant about how good they are, even with their
limitations.
As I've indicated above, my problem today is with themes. Per
microsoft "Only one theme can be applied to each page. You cannot apply
multiple themes to a page, unlike style sheets where multiple style
sheets can be applied."

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.
Quote is from here:
http://msdn2.microsoft.com/en-us/library/ykzx33wh.aspx

Basically this says to me that themes cannot cascade (or inherit from
each other) like stylesheets.

Because themes are *not* stylesheets!! Stylesheets are a component of
themes.
Right away I see a few obvious problems
with this:
1) you cannot share resources between themes. Every common file must
be duplicated in every theme that uses it (with exception of image
files as far as I can tell). Even completely different themes are
likely to have at least some elements in common.

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.
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!!
Every stylesheet in your
theme will be included on every page.

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.
Why does Microsoft have to try to be smarter than the w3c?

Who said they are trying? They are NOT, repeat NOT trying to replace CSS
with themes. They are giving you a way of applying CSS and other things
in a programmable manner.
If anyone has any suggestions or corrections please feel free to let me
know! I appreciate any help or criticism.

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.

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
 
A

Alan Silver

If anyone from the asp.net team reads these newsgroups, I think it
would be really nice if there were server-side type stylsheets (e.g.
css like) where id's of server side controls are generated and inserted
into a generated stylesheet that the client requests. Of course I
haven't spent a lot of time thinking this through so maybe this isn't
viable.

Now there's a really good idea ;-)

Maybe you should suggest it to MS. They have a facility n their web site
(don't ask me where) for suggestions.
I think this would be millions better than this xml skin crap.

As mentioned in my other post, I think you are misunderstanding the
point of themes. Skins are merely a simple way off applying a whole
bunch of styles and/or attributes to one control in one go. Even with
the idea you suggest, skins would still be very useful.
 
C

Clinton Farleigh

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 said:
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!
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? 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.
 
G

Guest

What has happend is that spoofer has found a way to use them to spoof mail.
12 hundred sites crashed when a spoofer used the themes extention to hack
thousands of sites in mid November. I was one of them. So they are having to
re design the extentions but they do not want to tell anyone. big time
problem. Just looking at these questions anyone can see that it is big
problem.
 

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

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top