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

Thoughts on having a mode switch like `box-sizing` but for font sizing?

```css
p {
  font-sizing: ex;
  font-size: 1.2ex;
}
```
would be equivalent to
```css
p {
  font-size: 1.2em;
}
```

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. The idea is that this follows precedent of changing modes in CSS and reduces possible confusion if both `font-size` and `font-x-size` are used in the same ruleset.

Like `box-sizing` this should’t inherit.

**Some more possible things to explore:**

This could also incorporate what @fantasai has done with the [`text-edge` property](https://www.w3.org/TR/css-inline-3/#propdef-text-edge), allowing finite control over what metrics are used beyond just x-height to size text.

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


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

Received on Thursday, 19 January 2023 22:12:48 UTC