473,387 Members | 1,553 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,387 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 1977
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.