- From: Romain Menke via GitHub <sysbot+gh@w3.org>
- Date: Wed, 25 Sep 2024 06:31:32 +0000
- To: public-css-archive@w3.org
> perhaps a straw poll for the character to separate the condition from the value
I will likely miss that due to TZ difference.
I have a slight preference for `?`.
_I started this by writing I have a preference for `:` and have talked myself out of it_
-----
We currently use `:` to separate properties and values in declarations.
We also use `:` in media and style queries in the context of conditionals but there these are used to describe the condition itself. `:` separates the feature name and the value it should match.
These inline conditions are neither.
In that line of thinking it makes more sense to me to use a different symbol.
`style(max-width: 400px)?` also reads as question which is kinda nice :)
```css
.foo {
color: rgb(
245
if(
style(max-width: 400px) ? 100,
style(max-width: 500px) ? 110,
style(max-width: 600px) ? 120,
else ? 140
)
10
)
}
```
vs.
```css
.foo {
color: rgb(
245
if(
style(max-width: 400px): 100,
style(max-width: 500px): 110,
style(max-width: 600px): 120,
else: 140
)
10
)
}
```
Not a strong preference but was interesting that trying to describe why I favored `:` and writing down some examples actually changed my preference.
--
GitHub Notification of comment by romainmenke
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10064#issuecomment-2373146566 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 25 September 2024 06:31:33 UTC