Re: [csswg-drafts] [css-anchor-1] More declarative syntax for simple cases (#7757)

Are you suggesting that using auto in both base style with a position fallback doesn't make much sense?

I was think of something else, but now I agree with that (the sentence above).

>"what happens if you use auto in base styles and also in a @position-fallback"? Then the auto in base styles doesn't do anything.

So how about making the restriction even stronger: if the base style has `anchor(auto)` and uses position fallback (see example below), then the `anchor(auto)` in the base style doesn't expand into any `@try` rule.

```css
.target {
  left: anchor(auto);
  position-fallback: --pf;
}

@position-fallback --pf {
 @try { top: ... }
 @try { bottom: ... }
}
```

Note that we may still need to evaluate a valid`anchor(auto)` from the base style, in which case we just evaluate it as normal.

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


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

Received on Friday, 10 February 2023 19:27:48 UTC