8000 [css-writing-modes][css-pseudo][css-inline] text-combine-upright and initial-letter · Issue #653 · w3c/csswg-drafts · GitHub
[go: up one dir, main page]

Skip to content

[css-writing-modes][css-pseudo][css-inline] text-combine-upright and initial-letter #653

@frivoal

Description

@frivoal

It is not clear what this should do

p {
 writing-mode:vertical-rl;
  text-orientation: sideways;
  text-combine-upright: 2;
}
p::first-letter {
  initial-letter: 3;
 }
<p>13 is a really nice number. Lorem Ipsum...</p>

::first-letter should match the 1 at the beginning of the <p>, but that means it selects half of the text-combine-upright, and I have no idea of how you'd turn that into a 3-line drop cap.

I think there are three changes we could make to the specs to deal with that:

  1. initial-letter has no effect when applied to some-but-not-all the characters in a run of characters grouped by text-combine-upright
  2. ::first-letter needs to treat a run of characters grouped by text-combine-upright as single character and select all of it if it is the first thing in the element.
  3. ::first-letter does not select anything if the element starts with run of characters grouped by text-combine-upright

Just for the record, I believe that text-combine-upright itself isn't an issue, and that the following ought to work just fine, highlighting that the issue is just due to selecting part of this orthogonal bit of content.

p {
 writing-mode:vertical-rl;
  text-orientation: sideways;
}
span {
  text-combine-upright: all;
  initial-letter: 3;
 }
<p><span>13</span> is a really nice number. Lorem Ipsum...</p>

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

      0