units that depend on font metrics (such as 'ch') should be derived from horizontal font metrics when writing-mode is vertical but text-orientation is sideways

RESOLVED FIXED in mozilla37

Status

()

RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: jfkthame, Assigned: jfkthame)

Tracking

unspecified
mozilla37
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

4 years ago
Compare:

data:text/html;charset=utf-8,
  <div style="font-family:monospace">
    <div style="width:9ch; height:9ch; border:1px solid black">123456789</div>

data:text/html;charset=utf-8,
  <div style="font-family:monospace; writing-mode:vertical-lr; text-orientation:sideways-right">
    <div style="width:9ch; height:9ch; border:1px solid black">123456789</div>

IMO, these should both produce the same size of square <div>, just large enough to fit the line of digits.


Note that it's expected that without text-orientation, as in

data:text/html;charset=utf-8,
  <div style="font-family:monospace; writing-mode:vertical-lr">
    <div style="width:9ch; height:9ch; border:1px solid black">123456789</div>

we get a larger square, because its size will be based on 9 characters of upright vertical text (consider if the ASCII digits were replaced by fullwidth ones).

Webkit appears to behave in this way, too.
(Assignee)

Comment 1

4 years ago
Created attachment 8535084 [details] [diff] [review]
Use horizontal-font metrics as basis for CSS units when text-orientation is sideways
Attachment #8535084 - Flags: review?(smontagu)
(Assignee)

Updated

4 years ago
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Comment on attachment 8535084 [details] [diff] [review]
Use horizontal-font metrics as basis for CSS units when text-orientation is sideways

Review of attachment 8535084 [details] [diff] [review]:
-----------------------------------------------------------------

Makes sense
Attachment #8535084 - Flags: review?(smontagu) → review+
https://hg.mozilla.org/mozilla-central/rev/977d6c001d70
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.