W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2010

Re: [widgets] Applying Stylesheets to Resources

From: Marcos Caceres <marcosc@opera.com>
Date: Tue, 4 May 2010 14:42:28 +0200
Message-ID: <s2nb21a10671005040542t6b453ff4p4cf971a88592c38c@mail.gmail.com>
To: Doug Schepers <schepers@w3.org>
Cc: Boris Zbarsky <bzbarsky@mit.edu>, "public-webapps@w3.org" <public-webapps@w3.org>
On Thu, Feb 11, 2010 at 7:18 PM, Doug Schepers <schepers@w3.org> wrote:
> Hi, Boris-
>
> Boris Zbarsky wrote (on 2/11/10 12:04 PM):
>>
>> On 2/11/10 11:57 AM, Doug Schepers wrote:
>>>
>>> One odd part of the separation of content and presentation is that a
>>> stylesheet is applied to a file by including a link to the stylesheet in
>>> the target file. That is totally backward.
>>
>> Strictly speaking, this is just because most people don't have control
>> over their web servers (which is why the <link> element exists). Link
>> HTTP headers work fine for applying stylesheets.
>
> Ah, interesting... I didn't know that, thanks!  Is this [1] the most recent
> reference on that?
>
> Still, I think adding a way to do this in the Widgets manifest would be a
> nice authoring solution.

Having a <style>, or styles, for a might be interesting:

<widget ...>
   <style src="global.css"/>
  <style media="conditionA" src="x.css"/>
  <style media="conditionB" src="y.css"/>
  <content src="someFile.html"/>
</widget>


Or

<widget ...>
  <content src="someFile.html"/>
   <style src="global.css"/>
   <style media="conditionA" src="x.css"/>
   <style media="conditionB" src="y.css"/>
  </content>
</widget>

And the document order gives precedence to order of the cascade.

-- 
Marcos Caceres
Opera Software ASA, http://www.opera.com/
http://datadriven.com.au
Received on Tuesday, 4 May 2010 12:43:24 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:38 GMT