This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 18382 - [Shadow]: ShadowRoot needs the flag to control @host @-rules in a similar way to the apply-author-styles flag.
Summary: [Shadow]: ShadowRoot needs the flag to control @host @-rules in a similar way...
Status: RESOLVED WONTFIX
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: HISTORICAL - Component Model (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Dimitri Glazkov
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 17515
  Show dependency treegraph
 
Reported: 2012-07-24 09:33 UTC by Takashi Sakamoto
Modified: 2013-07-17 18:21 UTC (History)
4 users (show)

See Also:


Attachments

Description Takashi Sakamoto 2012-07-24 09:33:00 UTC
Web developers want to control whether to apply @host @-rules declared in older shadow DOM subtrees when they add their own shadow root to the shadow host.

By using this flag, we don't need to see whether shadow dom subtrees are inert or not.

The following link is a document about the flag:
https://docs.google.com/document/d/1B39UFwTgAqIXQXwX4S42nvSe7ObJa7_oRMplsIR8WrE/edit
Comment 1 Dimitri Glazkov 2012-07-24 18:47:08 UTC
I am not sold that this flag is a useful feature. If you're not planning to use the older shadow root, just don't include it with <shadow>. If you do, you can stil override its styles.
Comment 2 Takashi Sakamoto 2012-07-25 11:04:25 UTC
(In reply to comment #1)
> I am not sold that this flag is a useful feature. If you're not planning to use
> the older shadow root, just don't include it with <shadow>. If you do, you can
> stil override its styles.

I agree that I can override the styles. However to do so, I have to see what styles come from @host @-rules declared in older shadow DOM subtrees. I think, web developers might want to just reset all existing @host @-rules.
And I think, I might want to reuse the host styles when I add my own shadow DOM subtree without <shadow>. In the case, I like the host style and just want to replace the shadow DOM subtree. I don't want to check what @host @-rules are applied and to apply my own @host @-rules.

Best regards,
Takashi Sakamoto
Comment 3 Dominic Cooney 2012-07-25 23:49:36 UTC
With each additional flag I think there is a danger that the spec becomes too hard to understand.

Applying @host rules could depend on whether the shadow root is included with <shadow>, along with all of the other rules in the stylesheets in the shadow root. I don’t think it is worth letting people special-case @host with a flag.
Comment 4 Takashi Sakamoto 2012-07-26 02:45:26 UTC
(In reply to comment #3)
> With each additional flag I think there is a danger that the spec becomes too
> hard to understand.
> 
> Applying @host rules could depend on whether the shadow root is included with
> <shadow>, along with all of the other rules in the stylesheets in the shadow
> root. I don’t think it is worth letting people special-case @host with a flag.

Does this mean that just @host @-rule doesn't depend on whether <shadow> is active or not? 
I mean the case: "when an insertion point or a shadow insertion poing has nothing assigned or distributed to them, the fallback content must be used instead when rendering."  written in shadow dom spec 5.5 Hosting Multiple Shadow Subtrees.

Best regards,
Takashi Sakamoto
Comment 5 Dimitri Glazkov 2012-07-26 22:24:22 UTC
There is an wholly different idea in bug 17515.
Comment 6 Dominic Cooney 2012-07-30 03:33:50 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > Applying @host rules could depend on whether the shadow root is included with
> > <shadow>, along with all of the other rules in the stylesheets in the shadow
> > root. I don’t think it is worth letting people special-case @host with a flag.
> 
> Does this mean that just @host @-rule doesn't depend on whether <shadow> is
> active or not? 

I intended it to depend on whether the <shadow> is inert or not. If the <shadow> is inert, @host rules in the older shadow tree would not apply.
Comment 7 Dimitri Glazkov 2012-08-03 17:55:20 UTC
I think the idea of a separate flag may still be worth discussing, but overloading apply-author-styles as a bit-field is about as foreign and awkward for the Web platform API as one could possibly get. We're definitely not doing that :)
Comment 8 Dimitri Glazkov 2013-07-17 18:21:31 UTC
There's no more @host, closing.