Re: [csswg-drafts] [css-cascade] Can we use `@scope` for style isolation? (#11002)

@mirisuzanne 

> * It can't be `hotPink`, that was isolated

Correct
 
> * Probably not `blue`? We can't inherit a color that was never applied, right?

I would say that intuitively it should be `blue`, although I'm sure if that's compatible with the way CSS works 😅

> * We could look at the parent to get `teal`, but is that confusing? Why would we inherit from an element that we think of as in-scope?

I feel like that would be confusing, not because it's inheriting from an in-scope element, but because it's skipping the non-scoped `color` declared on it's parent `.in-scope` (i.e., `blue`)

> * We could skip over that, and use `green`, but that's even more confusing. Does our scope rule isolate styles that aren't even scoped??

I agree, that's even more confusing

Again, I might be wrong, but I believe that the original idea is to remove the isolated style declarations from the cascade for all elements outside specified scope, if that makes sense.

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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 10 October 2024 09:11:50 UTC