Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[css-fonts] font-size Descriptor for ex Unit #731

@Crissov

Description

@Crissov

There currently is no font-size descriptor 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.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions