Css and Themes in net 3.5 question

W

WT

Hello,

I am using themes and have a lot of them in my site.
Problem is that this hierachy drive to a lot of duplication.

Many of my css rules are identical from theme to theme and I have to copy
the file in each theme folder.
I searching for a trick to share commun css files in a folder upper in tjhe
hierachy.
The idea would be to have some statement in css files like:

@Import "..\CommonCssFile.css"

Any idea how to do this ?

Thanks

CS
 
A

Allen Chen [MSFT]

Hi CS,

To share the css files you can remove the common css files from the theme
folders and keep one copy for each css file in a separate folder. Then you
can refer to this css file on your page by adding following tag in <head>
tag of your page.

<link href="url of your css file" type="text/css" rel="stylesheet" />

If you have further questions please feel free to ask.

Regards,
Allen Chen
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

Note: MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 2 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions. Issues of this
nature are best handled working with a dedicated Microsoft Support Engineer
by contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
W

WT

Hello Allen,

Thanks for answer, I was knowing of this, but introducing a link in header
was ont a choosen option for this web application.
I finally found a solution, quite near what I was searching for:
I use an @import on the first line of a default css present in each theme,
this import goes to a common css folder.
As we don't target old browsers like IE4, IE5, Nestcape, etc which does not
support @imprt directive, tseems Ok.

I hope that MS will imporve this: having only a common tehme folder for
server is not enough, we should have a shared theme folder and its content
be applyed first to current theme content.
I have done the spec, no MS jusyt do It :)

Thanks

CS
 
W

WT

Hello,
I just opened the Page and all I read seems right, especially for bad
things.
I would say 'ideas badly implemented and that should improve to reach
usability'.
I will read, thanks.

CS
 
H

Hillbilly

I'm having serious problems with Themes myself Allen.

I know how to use BrowserCapabilities object but I have no idea how to load
the many different css stylesheets needed to support the different browsers
when using Themes. IE conditional comments are working out but no support
for Firefoz or Opera or Safari-Chrome. So your explanation is not good
enough as I do not understand it.

Microsoft owes a complete explanation including code and examples how to fix
Themes. NOW!
 
H

Hillbilly

I understand what I read like you will but I have no idea how to make Themes
work with CSS stylesheets in different browsers other than IE. Microsoft is
DESTROYING OUR BUSINESS for those of us STUPID ENOUGH TO TRUST THEM because
Microsoft is not taking responsibility for design flaws and bugs in Themes.

Microsoft should be publishing blogs or whatever to FULLY EXPLAIN HOW TO
CODE AND MAKE CSS STYLESHEETS WORK WITH DIFFERENT BROWSERS WHEN USING
THEMES.
 
A

Allen Chen [MSFT]

Hi CS,

Quote from CS==================================================

I use an @import on the first line of a default css present in each theme,
this import goes to a common css folder.
As we don't target old browsers like IE4, IE5, Nestcape, etc which does not
support @imprt directive, tseems Ok.
==================================================

If you're not targeting the old browsers I believe it's a perfect solution.

Quote from CS==================================================
I hope that MS will imporve this: having only a common tehme folder for
server is not enough, we should have a shared theme folder and its content
==================================================

This is a good idea. We'll evaluate this feature request. Thanks for your
valuable feedback.

Regards,
Allen Chen
Microsoft Online Community Support
 
A

Allen Chen [MSFT]

Hi Hillbilly,

Quote from Hillbilly==================================================
I know how to use BrowserCapabilities object but I have no idea how to load
the many different css stylesheets needed to support the different browsers
when using Themes. IE conditional comments are working out but no support
for Firefoz or Opera or Safari-Chrome. So your explanation is not good
enough as I do not understand
it.==================================================

Could you tell me what do you mean by "IE conditional comments"? Do you
mean my reply in another post? I remember I told a customer before that we
can check the browser version to render different css and showed a sample
to render a specific css for IE only. If that's what you mean I think we
can also check if the browser is FireFox, Opera, etc. to decide what the
proper css to render is.

Could you also tell me what my explanation is? In this thread I only
suggested CS to add a link in the head of the page to add common css so I'm
confused.

Quote from Hillbilly==================================================
Microsoft is
DESTROYING OUR BUSINESS for those of us STUPID ENOUGH TO TRUST THEM because
Microsoft is not taking responsibility for design flaws and bugs in Themes.

Microsoft should be publishing blogs or whatever to FULLY EXPLAIN HOW TO
CODE AND MAKE CSS STYLESHEETS WORK WITH DIFFERENT BROWSERS WHEN USING
THEMES.
==================================================

I'm also confused about this. Theme itself is a great help for us, with no
doubt, though it still has some room to improve. As CS said, we can
consider supporting nested theme (we need to evaluate this feature request
first). If you have found a bug of theme could you tell me what it is? I'll
check it.

From your description I think your concern mainly focuses on the cross
browser css, not the Theme itself. You can check out the following article
to get some ideas on how to write cross browser css:

http://friendlybit.com/css/cross-browser-strategies-for-css/

If you still have concern on this issue you can start a new thread. We can
discuss further there.

Regards,
Allen Chen
Microsoft Online Community Support
 
H

Hillbilly

Thanks for showing up Allen.
I started a news article "How to cope with Themes and CSS style sheets" on
12/9/2008.

The fundamental problems have not been how to use IE conditional comments
but how to dynamically load the many different CSS style sheets for the many
different browsers and each release of those browsers that do not support
conditional comments because the Theme will not allow us to write link
element declarations into the head --after-- the link declaration the Theme
writes into the head.
 
W

WT

In don't think Microsoft is destroying our business...as they made a large
part of it.
We are free choosing not working with their technologies, so we are
responsible of part of the problem, we are not stupid.
But for sure we have to put our fingers on the points where they missed
something.

And its always good practice to throw some query with energy like you do :)
 

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,968
Messages
2,570,149
Members
46,695
Latest member
StanleyDri

Latest Threads

Top