- From: Shaw Jia via GitHub <sysbot+gh@w3.org>
- Date: Tue, 25 Apr 2023 23:15:39 +0000
- To: public-css-archive@w3.org
I'm not sure I understand the distinction. You say that for `@container`, there's a context to draw from which is the container element. And you say that's a single specific element when evaluating a CQ. However, you must define the container element using the very same selector `.foo` that you consider problematic when it comes to `@media`. `.foo { --x: 100px; container-type: inline-block; @container (min-width: var(--x)) {...}}` So you can also override `--x` from somewhere else, such as `.foo {--x: 200px!important}` or `.foo.foo {--x:200px}`. How does `@media` differ from `@container` when they face the same issue? Also I don't think it's actually a problem that the variable `--x` can be over-ridden from other sources, I consider it a feature not a bug. If you want to treat `--x` as a constant then either add `!important` to it or impose rules upon yourself to not declare it , somewhere else, such as follow a naming convention and rename `--x` to `--_foo-breakpoint` etc. -- GitHub Notification of comment by miragecraft Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8753#issuecomment-1522533879 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 25 April 2023 23:15:41 UTC