Xiaocheng Hu

Results 72 comments of Xiaocheng Hu

For the specific example, `--foo` refers to the `anchor-name` property value of another element. The test cases may serve as full examples: https://chromium.googlesource.com/chromium/src/+/main/third_party/blink/web_tests/wpt_internal/css/css-anchor-position

@mirisuzanne These two should have the same performance (at least in Chromium). Both are captured by preload scanners.

> So the currently specced behavior is just a little too restrictive Do you mean the currently specced behavior is the expected behavior or not? I think the current behavior...

> but I think the reasoning for the "inheritance" still makes decent sense - it means components can anchor to things outside of themselves, but without polluting namespaces that don't...

From my experience dealing with `@keyframes`, `@counter-style` and `@font-face`, name inheritance is quite complicated to support. I don't really see it as a convenience feature, but a workaround for backward-compatibility...

Re https://github.com/whatwg/html/issues/7540#issuecomment-1205826317: Extending the `media` attr syntax also for `` and `` makes a lot of sense to me. I can imagine cases like making conditional theme colors when there's...

Wait, should we do this for options only, or for any part?

We can still do it with some wrapper elements: ```html A B ``` (Not sure why we can't directly slot a `` into a named slot though... Either there's a...

The original Microsoft explainer is very old and has a lot of out-of-date details. Here's a new explainer: https://xiaochengh.github.io/Explainers/css-anchor-position/explainer.html

Declarations in `@position-try` are not descriptors but properties, so maybe `CSSPositionTryProperties` is better?