Subject: [css-d] Media="all" vs. @import

From: Craig.Saila at bgminteractive.com (Saila, Craig)
Date: Thu, 24 Apr 2003 11:27:28 -0400

Steve Thomas wrote:
> 1. link to one single style sheet, as in
>=20
>     <link rel=3D"stylesheet" href=3D"site.css" type=3D"text/css">

The only catch with this is that the default media for LINK is "screen",
so /technically/ other media types would never see the embedded @media
stuff. But as you point out, it does work...
=20
> 2. Begin that style sheet with an @import to import the stuff which
> fouls up NN4 etc.=20

Yup. Just be careful, because as you know, rules in the main file will
override those in the imported file.

> One interesting aside: the @page rule only makes sense for print (I

Essentially, yes, but @page can also be used (in theory) for anything
determined to be a paged media (i.e., one that isn't continuous like a
screen). Paged media types include: emboss, handheld (which is also
continuous), print, screen, and also tv (which, like handheld, is both).

--=20
Cheers,

Craig Saila
------------------------------------------
[email-masked] : http://www.saila.com/
------------------------------------------

---

From: ian at hixie.ch (Ian Hickson)
Date: Thu, 24 Apr 2003 10:01:31 -0700 (PDT)

On Thu, 24 Apr 2003, Saila, Craig wrote:
>>     <link rel="stylesheet" href="site.css" type="text/css">
>
> stuff.

That's an error in the HTML spec. The HTML working group has delegated
authority over the "media" attribute to the CSS working group, who has
decided to change the default to "all".

Unfortunately I can't find a public reference to this decision. I'll look
into it.

-- 
Ian Hickson                                      )\._.,--....,'``.    fL
"meow"                                          /,   _.. \   _\  ;`._ ,.
http://index.hixie.ch/                         `._.-(,_..'--(,_..'`-.;.'

---

From: Josh at Ambrutis.com (Josh Ambrutis)
Date: Thu, 24 Apr 2003 14:30:47 -0400

If this is something that everyone knows about, forgive me for somehow
missing it somewhere!

For those redirecting non-compliant browsers via sniff or the cute
"ahem" class that's revealed when the stylesheet isn't loaded... Where
are you going to send your non-compliant users now?  If anywhere?

>From the page I always point to: http://webstandards.org/upgrade/

"Note to site builders: The WaSP Browser Upgrade Campaign has come to a
close. As such we ask that you discontinue your use of this upgrade
message and visit the Beyond the Browser Upgrade Campaign page to learn
about what to do instead."

:(

This isn't old news is it? (I'll be really red-faced if it is).

So is there still a need to re-direct your non-compliant visitors, or do
you agree with the sentiments about it just being an easy out for not
testing our pages for some browsers like NN4 as expressed at
http://webstandards.org/act/campaign/buc/ ?

I personally, still see the need to redirect non-compliant users to a
page that tells them more information, like where to obtain an upgrade,
why they were redirected (or why they were provided the link) and the
like.  Thoughts?

--Josh

---

From: work at cookiecrook.com (James Craig)
Date: Thu, 24 Apr 2003 13:33:01 -0500

I admit I haven't been paying as close attention to this thread as 
possible, but what do you guys think of adding @media rules? Would this 
work?

<link rel="stylesheet" type="text/css" media="all" />

Then the stylesheet could include general styles still hidden from 
Netscape 4, immediately followed by:

@media screen {
   @import "screen.css";
}
@media print {
   @import "print.css";
}

Perhaps there are some bugs associated with this approach, too?

Just curious.
James

-- 
http://www.cookiecrook.com/

---

From: lists at thinkbigideas.com (Anthony Baker)
Date: Thu, 24 Apr 2003 02:24:29 -0700

| I personally, still see the need to redirect non-compliant users to a
| page that tells them more information, like where to obtain 
| an upgrade,
| why they were redirected (or why they were provided the link) and the
| like.  Thoughts?
| 
| --Josh

Make one of your own. Copy the content, create an upgrade page with
your design, paste the content in. I did something similar on an
earlier site myself. 

That, or, someone could create another version of the page and have
it hosted somewhere, allowing folks to point to it. A grassroots
upgrade effort, as it were.

/Anthony

---

From: Josh at Ambrutis.com (Josh Ambrutis)
Date: Thu, 24 Apr 2003 17:05:33 -0400

> Anthony Baker : 
> Make one of your own. 

Yeah, that's what I plan on doing I think.. But my real main concern was
the sites out there that have that reference that are now out of the
designer's control.  Thankfully I saw on Mark Pilgrim's site that the
page isn't going anywhere, so we won't be sending folks to a 404 on
those older sites.
http://diveintomark.org/archives/2003/04/21/browser_upgrade_campaign_off
icially_retired.html

-- Josh

---

From: fortuneb at bellsouth.net (Brandy (mediadiva))
Date: Fri, 25 Apr 2003 18:40:10 -0400

can you have more then one media="all" on a page?

---

From: gleemax at attbi.com (John Lewis)
Date: Fri, 25 Apr 2003 17:49:00 -0500

> can you have more then one media="all" on a page?

Yes. It simply means that each style sheet will be applied in all
media (screen, handheld, projection, and so on). For example,

<link rel="stylesheet" type="text/css" href="/global.css" media="all">
<link rel="stylesheet" type="text/css" href="local.css" media="all">

-- 
John Lewis

---

From: fortuneb at bellsouth.net (Brandy (mediadiva))
Date: Sat, 26 Apr 2003 13:55:04 -0400

can you have more then one import?

----- Original Message ----- 
From: "John Lewis" <[email-masked]>
To: <[email-masked]>
Sent: Friday, April 25, 2003 6:49 PM
Subject: Re: [css-d] Media="all" vs. @import

> ______________________________________________________________________
> css-discuss [[email-masked]]
> http://www.css-discuss.org/mailman/listinfo/css-d
> Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

---

From: gleemax at attbi.com (John Lewis)
Date: Sat, 26 Apr 2003 13:54:58 -0500

> can you have more then one import?

Yes, with the caveat that all @import rules must appear before all
other rules. For example, this is okay:

    @import "main.css";
    @import "print.css" print;
    h1{font-size:3em}

Also, keep in mind that an imported style sheet without a specified
media, like the first rule in the above example, has an implied media
of "all".

-- 
John Lewis

---

From: ian at hixie.ch (Ian Hickson)
Date: Mon, 28 Apr 2003 09:55:50 -0700 (PDT)

On Thu, 24 Apr 2003, Ian Hickson (that's me) wrote:
>> The only catch with this is that the default media for LINK is
>> "screen", so /technically/ other media types would never see the
>> embedded @media stuff.
>
> Unfortunately I can't find a public reference to this decision. I'll
> look into it.

I've found a formal reference to this decision:

   http://hades.mn.aptest.com/cgi-bin/voyager-issues/HTML-4.01?id=528;expression=screen;user=guest

That's the relevant entry in the HTML working group issues database.

HTH,