473,698 Members | 2,281 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Caring for yet-to-come media types

Hi,

I really hope I'm not hitting a frequently asked question here, because
I think almost every author must have made that decision. Anyway, here
goes:

Would it be better to write one global stylesheet, then write
specializations for media that need special treatment:

<link ... media="all">
<link ... media="print">
<link ... media="aural">

This might guarantee that a page looks "good" on all media the author
provided stylesheets for, but it might mess up the page on other media
types, possibly introduced at some later date.
Or would it be better to write no global stylesheet but only
stylesheets for supported media

<link ... media="screen">
<link ... media="print">
<link ... media="aural">

This seems safer by not trying to render fancy design on other media
types but these "unsupporte d" media would then render rather dull
pages.
What do you think?

Wolf

Jul 21 '05 #1
11 1918
Wolfgang Meier <wo***@sofort-mail.de> wrote:
Would it be better to write one global stylesheet, then write
specializations for media that need special treatment:

<link ... media="all">
<link ... media="print">
<link ... media="aural">


This makes sense if you've got CSS rules that are appropriate (or likely to
be appropriate) for braille (both refreshable displays and embossed paper),
handheld devices, print, projection displays, screen displays, speech, tty,
tv displays, and any other media types that might come along. Those rules
could go in the media="all" style sheet.

Do you? If not, then stick to media-specific style sheets. Although you can
also specify multiple media (e.g., media="print,pr ojection") when
appropriate.
--
Darin McGrew, mc****@stanford alumni.org, http://www.rahul.net/mcgrew/
Web Design Group, da***@htmlhelp. com, http://www.HTMLHelp.com/

"I used to do lots of dumb things, but I turned my life around 360 degrees!"
Jul 21 '05 #2
Tim
On 27 Jun 2005 12:47:03 -0700,
"Wolfgang Meier" <wo***@sofort-mail.de> posted:
Would it be better to write one global stylesheet, then write
specializations for media that need special treatment:

<link ... media="all">
<link ... media="print">
<link ... media="aural">


You can do the same sort of thing in the stylesheet too. Thus, all pages
that referred to a default stylesheet now, could later be styled to suit
specific media, without needing to edit the pages, just by editing the
default stylesheet, so long as you authored the pages in a sensible manner
in the first place.

e.g. In the pages just link to one style sheet.
In the CSS use @media to separate the different sections.

@media all {
some common rules...
}

@media screen, display {
some rules...
}

@media print {
some rules...
}

Of course this isn't brilliantly efficient cachewise (where browsers that
didn't support braille could avoid loading a braille stylesheet), but if
the CSS file is small enough that may be immaterial. And it's been my
experience that MSIE fetches all CSS files, even if it's not going to use
them (e.g. it fetches alternate stylesheets, but cannot use them).

--
If you insist on e-mailing me, use the reply-to address (it's real but
temporary). But please reply to the group, like you're supposed to.

This message was sent without a virus, please delete some files yourself.
Jul 21 '05 #3
Tim wrote:
You can do the same sort of thing in the stylesheet too. [...]
In the CSS use @media to separate the different sections.


True. I nearly forgot about this. Maybe I can even use this to "hide"
fancy CSS from NN4.

By the way: One big drawback of CSS, I think, is that most properties
only make sense if applied _together_, but there is no means to link
them. Consider this:

em {
font-style: normal;
font-weight: bold;
}

A browser that wouldn't support /font-weight/ would now render /em/s
just like normal text. I'd consider it a great improvement if blocks of
properties would only applied if _all_ properties were supported. This
might lead to longer styles like this:

em {
color: red;
}

em {
color: black;
font-style: normal;
font-weight: bold;
}

....but make sure you get either red, italic /em/s or black bold ones,
depending on your browser's capabilities.

Just a thought.

Wolf

Jul 21 '05 #4
Tim
On 28 Jun 2005 01:53:54 -0700,
"Wolfgang Meier" <wo***@sofort-mail.de> posted:
By the way: One big drawback of CSS, I think, is that most properties
only make sense if applied _together_, but there is no means to link
them. Consider this:

em {
font-style: normal;
font-weight: bold;
}

A browser that wouldn't support /font-weight/ would now render /em/s
just like normal text.


You end up with an awful lot of if/then/else programming if you're going to
pander to MSIE's foibles... <evil grin> It's usually *it* that needs
that sort of malarkey.

The problem with that approach, is that you're making a page that's reliant
on styles, when you shouldn't. That's the bigger mistake. Read your page
out aloud, top to bottom, left to right, just like a book. And if it
doesn't read out in a coherent fashion, the page needs redoing.

--
If you insist on e-mailing me, use the reply-to address (it's real but
temporary). But please reply to the group, like you're supposed to.

This message was sent without a virus, please delete some files yourself.
Jul 21 '05 #5
Tim wrote:
The problem with that approach, is that you're making
a page that's reliant on styles, when you shouldn't. [...]
If [the page] doesn't read out in a coherent fashion, the page
needs redoing.


I fully aggree with you. The problem I wanted to point out was,
however, a different one:

In my opinion it is not always possible to write a page that looks not
only fine with and without applied CSS but also looks fine if only a
(seemingly) random subset of CSS properties is applied.

In my opinion that's a shame.

Wolf

Jul 21 '05 #6
Wolfgang Meier:
By the way: One big drawback of CSS, I think, is that most properties
only make sense if applied _together_, but there is no means to link
them. Consider this:
There have had been several suggestions to overcome this on css-style. I
think the best one with least drawbacks was a '!required' keyword. It
hasn't made it into any draft yet, though.
em {
font-style: normal;
font-weight: bold;
}
You probably rather want to use 'inherit' and 'bolder', although they
yield the same result in most (not all) situations.
I'd consider it a great improvement if blocks of
properties would only applied if _all_ properties were supported.
If this was a general rule, I would consider it a great disimprovement, ...
This might lead to longer styles like this:


.... exactly for this reason.
Jul 21 '05 #7
Tim
On Tue, 28 Jun 2005 16:58:46 +0200,
Christoph Päper <ch************ **@nurfuerspam. de> posted:
'!required' keyword


I always thought that was a badly named keyword. In other programming
circles, an exclamation mark in front of something means "not" (i.e. it
looks like "not required"). On the other hand, if they'd written it as
"required!" it'd be normal English, and make complete sense.

--
If you insist on e-mailing me, use the reply-to address (it's real but
temporary). But please reply to the group, like you're supposed to.

This message was sent without a virus, please delete some files yourself.
Jul 21 '05 #8
Tim:
Christoph Päper <ch************ **@nurfuerspam. de> posted:
'!required' keyword
I always thought that was a badly named keyword.


It doesn't exist yet, of course, but follows the style of '!important',
which is in fact grammatically two items, '!' and 'important', which may
have whitespace between them.
In other programming circles, an exclamation mark in front of
something means "not" (i.e. it looks like "not required").
CSS is not a programming language, though. Nobody assumes '>' in
selectors meant "greater than", or '+' "plus".
On the other hand, if they'd written it as "required!"
it'd be normal English, and make complete sense.


If they hadn't had extensibility in mind, they could have used '!' only,
without 'important'. Then they maybe would have to introduce another
(ASCII) character, like '|', to do the job. Anyhow, nothing's specified
yet in this regard.
Jul 21 '05 #9
(Christoph Päper in comp.infosystem s.www.authoring.stylesheets)
Tim:

In other programming circles, an exclamation mark in front of
something means "not" (i.e. it looks like "not required").


CSS is not a programming language, though. Nobody assumes '>' in
selectors meant "greater than", or '+' "plus".


What he means by programming is you describe something in computer
code. CSS certainly does that.
Had to beat that horse...
Jul 21 '05 #10

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

Similar topics

7
1356
by: Marco Aschwanden | last post by:
Here is yet another decorator proposal: def sumSequencesLengths(var1, var2): """Computes something very important. __decorators__: staticmethod __parameters__: var1=Sequences var2=Sequences
6
1316
by: Mikael | last post by:
Hi all, i have some problem to solve a sql-query. (Out off topics? I don't know.) I have a site (a community) with a lot of members. A member who are logged in om my site can search for other members. A logged in member can block any other member out. I have these table. As u can see in blocklist Table member 100102 have blocked member 100100 out. My question now is. How should i write my sql question.
7
1857
by: lawrence | last post by:
This page renders slowly on both IE and Netscape - everything downloads before anything appears on screen. It is the behavior you'd expect if the whole thing was wrapped in a table, yet there is no table. What other sorts of problems normally cause this?
5
3499
by: Ken Dopierala Jr. | last post by:
Hi, I was wondering if there were any commercial applications out there that use .Net. Like games, accounting programs, and etc. I havn't seen any myself. I know a lot of web sites are built on .Net (like mine) but I havn't seen the framework installed with any programs yet. Thanks! Ken.
89
5573
by: Tak-Shing Chan | last post by:
Dear c.l.c regulars, How about codifying a list of acceptable acronyms on c.l.c? <g> <g,d&r> <VBG> AAMOF AFAIAA AFAIAC
0
1123
by: hn | last post by:
hi! when querying ad (win2k) i keep getting the error "Handling of this ADSVALUE type is not yet implemented (type = 0xb)." but the funny thing is that i only get in with certain properties like "memberOf" - i don't get it when i query for "sn" for example. also funny is, that i get the count-value for "memberOf" but not the string-collection. here is the code i use.
1
1474
by: zorro | last post by:
Greetings, My database was inserting NULL for empty strings so I changed the field definition with this query: ALTER TABLE `myTable` CHANGE `myUrl` `myUrl` VARCHAR( 255 ) NOT NULL DEFAULT '' No error was reported following the query and yet I still get NULLs on insertions.
12
1648
by: MonkeeSage | last post by:
Here's yet another take on a unique() function for sequences. It's more terse than others I've seen and works for all the common use cases (please report any errors on the recipe page): http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/502263 Regards, Jordan
0
1284
by: MonkeeSage | last post by:
There are several string interpolation functions, as well as string.Template. But here's yet another. This one emulates ruby's inline interpolation syntax (using #{}), which interpolates strings as well as expressions. NB. It uses eval(), so only use it in trusted contexts! import sys, re def interp(string): locals = sys._getframe(1).f_locals globals = sys._getframe(1).f_globals
39
2004
by: mike3 | last post by:
Hi. I was writing a program in C++ that generates fractals. I got this weird bug though right now that's holding it up and was wondering if you could help. Anyway, it seems that when this code is executed, it corrupts the memory causing a crash later on (the program actually causes an "access violation" error in Windows, which the program is running under):
0
9161
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9029
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8867
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7732
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6522
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5860
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4370
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4619
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3050
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.