Re: Insulating part of a HTML document from global CSS

Scoped stylesheets would be sufficient if there was either an easy way to
reset all styles back to their browser defaults, or you could use scoped
styles to not inherit anything from outer styles.

Shadow DOM would work, but the problem with Shadow DOM and associated
components is their complexity and the required boilerplate. I don't know
how helpful it would be in the case of displaying, for example, the
contents of an email inline.

Being able to use scoped stylesheets in a way that disables inheritance
from outer styles would address a number of issues faced today. Shadow DOM
still has it's place as it seems to provide complete isolation including
script isolation, not just style and DOM isolation, but it's overkill for
the majority of simpler use cases.

Web technologies should be generic and unassuming in my opinion. Things
like Shadow DOM smell of "framework". Frameworks should be implemented at
the layer above "browser-space" and should be the responsibility of the web
developer rather than the browser vendors.

Tom


On Wed, Oct 16, 2013 at 9:31 PM, Garrett Smith <dhtmlkitchen@gmail.com>wrote:

>
>
>
> On Wed, Oct 16, 2013 at 2:07 AM, Robert O'Callahan <robert@ocallahan.org>wrote:
>
>> On Wed, Oct 16, 2013 at 8:53 PM, Tom Wardrop <tom@tomwardrop.com> wrote:
>>
>>> I tried searching online for this, but came up empty, so I'll ask here.
>>> Are there any plans to provide a mechanism for insulating part of a HTML
>>> node tree from globally defined CSS styles? The classic example is the case
>>> of a web-based email client. Emails contain their own style sheets and
>>> HTML, but how is one meant to display this within the context of another
>>> web page without resorting to iframe's. I don't see iframe's as solution as
>>> they come with scripting, security and usability limitations.
>>>
>>
>> <iframe sandbox> is designed for this, possibly combined with the
>> "seamless" attribute.
>>
>> He wants something sort of like the opposite of iframe seamless and in
> the same page.
>
> Are scoped stylesheets sufficient for what you want, Tom?
>
> Rob
>> --
>> Jtehsauts  tshaei dS,o n" Wohfy  Mdaon  yhoaus  eanuttehrotraiitny  eovni
>> le atrhtohu gthot sf oirng iyvoeu rs ihnesa.r"t sS?o  Whhei csha iids  teoa
>> stiheer :p atroa lsyazye,d  'mYaonu,r  "sGients  uapr,e  tfaokreg iyvoeunr,
>> 'm aotr  atnod  sgaoy ,h o'mGee.t"  uTph eann dt hwea lmka'n?  gBoutt  uIp
>> waanndt  wyeonut  thoo mken.o w
>>
> I see a pattern here, but haven;yet decipered it.
>
>
> --
> Garrett
> Twitter: @dhtmlkitchen
>

Received on Sunday, 17 November 2013 10:11:59 UTC