Skip to content

[css-viewport-1] Specify relationship between zoom and font properties #12358

Open
@lilles

Description

@lilles

With the sign() function, the zoom property can now have computed values that depend on the computed font and font selection. Also, the zoom property affects font selection, which means the spec needs to say whether font relative units in zoom are evaluated against the parent font or the same element's font.

Chrome and Safari behave differently for this case (Chrome uses the parent font):

<!DOCTYPE html>
<style>
  #target {
    font-size: 30px;
    zoom: calc(1 + 0.5 * sign(20px - 1em));
  }
</style>
<div id="target">Zoom</div>
<script>
  console.log(getComputedStyle(target).zoom);
</script>

@chrishtr @emilio

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