Re: [csswg-drafts] [css-inline-3] Requiring authors to declare two values for `text-box-edge` is a mistake (#11460)

Oh yes, `auto` is the better choice. 

> I think everyone agrees that reverting is better, but there's no consensus on "instead default like this" yet.

Ok! Let me try to list what the options we could choose:.

**Option 1:** `auto`
- `text-box-edge: cap` is understood to be  `text-box-edge: cap auto`
- `text-box-edge: ex` is understood to be  `text-box-edge: ex auto`
- `text-box-edge: alphabetic`  is understood to be  `text-box-edge: auto alphabetic`

I believe this is the best option, since `auto` [is the initial value](https://www.w3.org/TR/css-inline-3/#text-box-edge) for `text-box-edge`.

**Option 2:** `text`
- `text-box-edge: cap` is understood to be  `text-box-edge: cap text`
- `text-box-edge: ex` is understood to be  `text-box-edge: ex text`
- `text-box-edge: alphabetic`  is understood to be  `text-box-edge: auto alphabetic`

This is what I proposed above, but honestly I suggested this under the (wrong) assumption that `text` is the "do nothing, be regular" value. But `auto` is the better way to get there. 

**Option 3:** magic
- `text-box-edge: cap` is understood to be  `text-box-edge: cap alphabetic`
- `text-box-edge: ex` is understood to be  `text-box-edge: ex alphabetic`
- `text-box-edge: alphabetic`  is understood to be  `text-box-edge: cap alphabetic`

This is perhaps where this discussion started. It gets at the original idea proposed — make it so authors don't have to think about each edge separately, but rather assume that if someone is trimming to `cap` or `ex` they meant to also trim to `alphabetic`, etc. I believe this is a bad thing to do — especially since `cap`, `ex`, and `alphabetic` are going to be used for non-Latin scripts in the absence of proper metrics for many scripts in the world. We should not assume anything. If an author wants `text-box-edge: cap alphabetic`, they can write it. If they leave out a value, they get the initial value. 

Let's be safe, and make the absence of direction from the author be "hey, you didn't set this, so it goes back to the initial value" — in this case, `auto`. 

I'd like to resolve on this soon, and update implementations, so we can teach people how to use the shorthand. Otherwise, authors will have to learn a far more complicated understanding of what's going on. And the early days of teaching a new technology is critical for how it gets cemented in people's minds and taught for many years after. 


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


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

Received on Tuesday, 14 January 2025 23:01:06 UTC