473,249 Members | 1,876 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,249 software developers and data experts.

Naming and organizing style sheets

Are there any guidelines or conventions for how to organize the
preferred and alternate style sheets for a site, sheets for
different media, and what titles to give them in the
<link rel="(alternate )stylesheet" title="..." ... />
element?

For example:

Are there user agents that have problems with characters like space or
apostrophe in the title? Are there user agents that can be configured
to e.g. prefer sheets with a name "simple" in them, so it's a good idea
to use separate and common words?

Should I have one complete and titled sheet per media type or "skin", or
factor out common elements to a common style sheet which is used in
addition to the more specific ones?

I expect to have users use the same sheet(s) for the entire site and
just use different markup for different types of documents, unless
someone says that's a bad idea.

--
Hallvard
Jul 1 '06 #1
2 1970
On Sat, 01 Jul 2006 23:46:45 +0200, Hallvard B Furuseth
<h.**********@usit.uio.nowrote:
Are there any guidelines or conventions for how to organize the
preferred and alternate style sheets for a site, sheets for
different media, and what titles to give them in the
<link rel="(alternate )stylesheet" title="..." ... />
element?
Not that I'm aware of. Not surprising, as the number of browsers that do
something remotely useful with alternative stylesheets is low. The feature
was dropped from Firefox 1 because it was deemed useless in its then
current state. Main obstacle: no way to 'set' an alternative style for a
complete website.
For example:

Are there user agents that have problems with characters like space or
apostrophe in the title?
No. On for example http://www.w3.org/Style/ , the alternative stylesheets
contain spaces and + signs.
Are there user agents that can be configured
to e.g. prefer sheets with a name "simple" in them, so it's a good idea
to use separate and common words?
No. The style sheet title attribute is (and should) be handled as one
opaque string by browsers.
Should I have one complete and titled sheet per media type or "skin",
You really shouldn't mix alternate stylesheets with media stylesheets. For
specific styles for specific media, use the media attribute in HML or the
@media rule in the CSS - and don't set the title attribute on LINKed
media-specific stylesheets. You don't want the user having to select a
print stylesheet manually before printing (for which browsers don't have
UI anyway).
or factor out common elements to a common style sheet which is used in
addition to the more specific ones?
That saves a few bytes and centralizes your design a bit, can't hurt.
I expect to have users use the same sheet(s) for the entire site and
just use different markup for different types of documents, unless
someone says that's a bad idea.

--
Opera 9: your web, your choice.
http://my.opera.com/Rijk/

Rijk van Geijtenbeek
Jul 3 '06 #2
Thanks, Rijk.

--
Hallvard
Jul 4 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Phil Thompson | last post by:
does it matter in which order i place different style sheets i.e. <link rel="stylesheet" type="text/css" media="screen" href="style/screen.css" /> <link rel="stylesheet" type="text/css"...
3
by: Jamie | last post by:
Hi, Thanks for the excellent answer to my last question! One more: Does anyone have a method they follow for organizing stylesheets themselves? They seem like they can get bloated and hard to...
12
by: relaxedrob | last post by:
Hi All! I have a page with with the following style information: <link rel="stylesheet" type="text/css" href="/eEmployment/eTech.css" /> <style type="text/css"> DIV.Application {...
10
by: Allan Ebdrup | last post by:
We have a developer who has defined our vraiable naming conventions, He has defined that variables should benamed the same as the class they are an instance of, for example: ...
12
by: Jarno Suni | last post by:
I want a device to use styles given for media type handheld and not the styles given for media type screen, if the device supports media types handheld and screen. Is it possible without writing...
9
by: Radium | last post by:
Cascading Style Sheet is an extreme hazard to your privacy. It allows others on the internet to see your monitor and files. It allows them to copy images on your monitor to their computers. It...
5
by: Ed Jay | last post by:
I have a switch statement that controls which of several containers is displayed or not. It currently looks like: function showHelp(n) { show('vhelp'); //makes parent container visible switch...
1
by: mscertified | last post by:
Can anyone explain how references to style sheets work, I've exhausted looking in help, its all so confusing. I have three style sheets in my project under 'Style Sheets'. Only the first style...
5
by: =?Utf-8?B?SmVycnkgQw==?= | last post by:
I have a machine running IIS 6.0. I just replaced the web.config and several aspx pages in the application and now the style sheets are not working. the images from the themes work but not the css...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.