Re: [csswg-drafts] [css-fonts] Font Sizing for Readability (#6709)

Hi Scott @scottkellum 

> Thoughts on having a mode switch like `box-sizing` but for font sizing?
> 
> ```css
> p {
>   font-sizing: ex;
>   font-size: 1.2ex;
> }
> ```

I like this the more I think about it, actually makes a lot of sense to make it a switch like this. We pretty much never used x-height in traditional print.... We need set size with x-height now because the web is not fixed in place like print, it's always dynamic and always changing.

My concern is the amount of breakage this can do, at least until the property is widely adopted. How would it fallback for browsers the don't support it...?


A reason I was suggesting the property as above is that fallback would be easy:

```css
  div { 
    font-size:  21px;  
    font-x-size:  12px;  
  }
```

This assumes of course that `font-x-size:` always overwrote `font-size:` for supported browsers.


> All the units would be the same. This would only change the behavior of `font-size` making it apply to x-height instead of em-height. 


```css
  div { 
    font-sizing: ex;  
    font-size: 12px;  
    border-width: 1em;
  }
```

In this case what would the border width be? 12px, 17px, 23px, or 24px?

What if `font-sizing: ex` had an additional numeric property?

`font-sizing: ex 0.52;`  where the number is the relationship of the x-height to the em size x-height is about 0.52 for Helvetica, so in this example it will bring the font back to the em size..... Or perhaps that should simply be the default...




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


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

Received on Sunday, 22 January 2023 04:25:46 UTC