W3C home > Mailing lists > Public > public-css-archive@w3.org > January 2021

Re: [csswg-drafts] [css-scoping] Proposal for light-dom scoping/namespacing with re-designed `@scope` rule (#5809)

From: jimmyfrasche via GitHub <sysbot+gh@w3.org>
Date: Sat, 09 Jan 2021 21:50:04 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-757372485-1610229003-sysbot+gh@w3.org>
Re https://github.com/oddbird/css-sandbox/blob/main/src/scope/explainer.md#can-scoped-selectors-reference-external-context

If "scoped selectors should be otherwise unaware of the scope" wouldn't that mean that both divs in the example below are blue?
<div class=x>
  <div class=component>
    <div class=x>
      <div class=x>x</div>
      <div class=y>y</div>
@scope (.component) {
  .x .x { color: blue; }

My preference would be for an explicit `.my-host-page :scope .my-component-part` (if for no other reason than to make it clear what's intended!) with just disallowing it entirely a distant second.

GitHub Notification of comment by jimmyfrasche
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5809#issuecomment-757372485 using your GitHub account

Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Saturday, 9 January 2021 21:50:05 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:25 UTC