Skip to content

[css-inline] spec should define behavior when 'initial-letter' and 'float' both set on same element/pseudo-element #688

@dbaron

Description

@dbaron

The definition of initial letter styling should specify what happens when float and initial-letter are set on the same element.

Prior to the introduction of initial letter styling, CSS had two types of ::first-letter pseudo-elements: (1) regular inlines and (2) floats. Now (3) initial-letter creates a third, but I think it should be creating only one more and not two. In particular, I don't think there should be two different types of initial letter. (The spec certainly doesn't describe two such types.)

Then there's the question of, given code like:

p::first-letter {
  float: left;
  initial-letter: 3 3;
}

which one wins. That is, do we create a type (2) pseudo-element or a type (3) one.

I tend to think that if we want to allow authors to use various graceful degradation strategies (although they could do more with @supports, I suppose) it's probably better for the newer feature to override the older one, i.e., for the above case to result in the float: left being ignored.

Either way, this should be explicitly specified.

And I think that explicit specification should probably result in the computed value that is ignored being changed, although I haven't thought through the details of this at all.

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