W3C home > Mailing lists > Public > public-css-archive@w3.org > November 2016

[csswg-drafts] [css-fonts] font-size Descriptor for ex Unit

From: Christoph Päper via GitHub <sysbot+gh@w3.org>
Date: Thu, 17 Nov 2016 22:50:26 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-190187559-1479423025-sysbot+gh@w3.org>
Crissov has just created a new issue for 
https://github.com/w3c/csswg-drafts:

== [css-fonts] font-size Descriptor for ex Unit ==
There currently is no `font-size` 
[descriptor](https://drafts.csswg.org/css-fonts-4/#font-prop-desc) for
 use in `@font-face`. I propose it be added to manually specify the 
x-height and hence determine a non-fallback size (i.e. 0.5em) of the 
`ex` unit, which would be more useful and intuitive than the 
`font-size-adjust` property. If `cap` was added as a unit for the 
height of capital letters #660, this descriptor should also be able to
 set it. I think it makes most sense to only allow percentages of 
`1em`.

```css
@font-face {
  font-family: foo; src: url(foo.woff); 
  font-size: 45% 90%;
}
.foo {
  font-family: foo; 
  font-size: 20px;
  padding: 1ex /* = 0.45em = 9px */ 1cap /* = 0.9em = 18px */;
}
```

Please view or discuss this issue at 
https://github.com/w3c/csswg-drafts/issues/731 using your GitHub 
account
Received on Thursday, 17 November 2016 22:50:32 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:05 UTC