[line-clamp] Don't expose the `line-clamp` longhands [chromium/src : main]

3 views
Skip to first unread message

Ian Kilpatrick (Gerrit)

unread,
Apr 28, 2026, 12:18:00 PMApr 28
to Andreu Botella, Anders Hartvoll Ruud, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, apavlo...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org
Attention needed from Anders Hartvoll Ruud and Andreu Botella

Ian Kilpatrick added 1 comment

Patchset-level comments
File-level comment, Patchset 2 (Latest):
Ian Kilpatrick . resolved

+Anders for review.

Open in Gerrit

Related details

Attention is currently required from:
  • Anders Hartvoll Ruud
  • Andreu Botella
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I73d254b9e8014f52fc8fd2223a1d651a99a50187
Gerrit-Change-Number: 7798861
Gerrit-PatchSet: 2
Gerrit-Owner: Andreu Botella <abot...@igalia.com>
Gerrit-Reviewer: Anders Hartvoll Ruud <and...@chromium.org>
Gerrit-Reviewer: Andreu Botella <abot...@igalia.com>
Gerrit-Reviewer: Ian Kilpatrick <ikilp...@chromium.org>
Gerrit-CC: Menard, Alexis <alexis...@intel.com>
Gerrit-Attention: Andreu Botella <abot...@igalia.com>
Gerrit-Attention: Anders Hartvoll Ruud <and...@chromium.org>
Gerrit-Comment-Date: Tue, 28 Apr 2026 16:17:50 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Anders Hartvoll Ruud (Gerrit)

unread,
Apr 30, 2026, 10:01:07 AMApr 30
to Andreu Botella, Ian Kilpatrick, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, apavlo...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org
Attention needed from Andreu Botella

Anders Hartvoll Ruud added 5 comments

File third_party/blink/renderer/core/css/css_properties.json5
Line 7404, Patchset 3 (Latest): name: "-alternative-webkit-line-clamp",
alternative_of: "-webkit-line-clamp",
property_methods: ["ParseSingleValue", "CSSValueFromComputedStyleInternal"],
style_builder_custom_functions: ["initial", "inherit", "value"],
keywords: ["none"],
typedom_types: ["Keyword", "Number"],
stored_on_extra_field: ["Continue", "MaxLines", "HasAutoMaxLines", "BlockEllipsis"],
// overlaps with line-clamp
legacy_overlapping: true,
runtime_flag: "CSSLineClamp",
},
{
name: "-alternative2-webkit-line-clamp",
alternative_of: "-alternative-webkit-line-clamp",
Anders Hartvoll Ruud . unresolved

Can we get a comment on each of these alternatives to explain why we need both of them?

File third_party/blink/renderer/core/css/css_property_equality.cc
Line 597, Patchset 3 (Latest): bool ignore_block_ellipsis = a.Continue() != EContinue::kNormal;
Anders Hartvoll Ruud . unresolved

What is the explanation for this behavior? Looking briefly at the spec, I couldn't find anything relevant.

File third_party/blink/renderer/core/css/properties/longhands/longhands_custom.cc
Line 6539, Patchset 3 (Latest): // not setting BlockEllipsis
Anders Hartvoll Ruud . unresolved

Why not? It has _some_ initial value, surely.

File third_party/blink/renderer/core/css/resolver/style_cascade.cc
Line 780, Patchset 3 (Latest): LookupAndApply(line_clamp, resolver);
maybe_skip(GetCSSPropertyAlternativeWebkitLineClamp(), *priority);
Anders Hartvoll Ruud . unresolved

If we're adding code for it, we should probably have a test which verifies that line-clamp and -webkit-line-clamp interact correctly in the cascade. (I.e. a test which verifies that one overwrites the other by its cascade strength, not e.g. just order of appearance.)

File third_party/blink/renderer/core/style/computed_style_extra_fields.json5
Line 397, Patchset 3 (Latest): // We store the line-clamp shorthands (continue, max-lines, block-ellipsis)
Anders Hartvoll Ruud . unresolved

They are longhands?

Open in Gerrit

Related details

Attention is currently required from:
  • Andreu Botella
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I73d254b9e8014f52fc8fd2223a1d651a99a50187
    Gerrit-Change-Number: 7798861
    Gerrit-PatchSet: 3
    Gerrit-Owner: Andreu Botella <abot...@igalia.com>
    Gerrit-Reviewer: Anders Hartvoll Ruud <and...@chromium.org>
    Gerrit-Reviewer: Andreu Botella <abot...@igalia.com>
    Gerrit-Reviewer: Ian Kilpatrick <ikilp...@chromium.org>
    Gerrit-CC: Menard, Alexis <alexis...@intel.com>
    Gerrit-Attention: Andreu Botella <abot...@igalia.com>
    Gerrit-Comment-Date: Thu, 30 Apr 2026 14:00:51 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Andreu Botella (Gerrit)

    unread,
    Apr 30, 2026, 11:31:42 AMApr 30
    to Anders Hartvoll Ruud, Ian Kilpatrick, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, apavlo...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org
    Attention needed from Anders Hartvoll Ruud

    Andreu Botella added 2 comments

    File third_party/blink/renderer/core/css/css_property_equality.cc
    Line 597, Patchset 3 (Latest): bool ignore_block_ellipsis = a.Continue() != EContinue::kNormal;
    Anders Hartvoll Ruud . unresolved

    What is the explanation for this behavior? Looking briefly at the spec, I couldn't find anything relevant.

    Andreu Botella

    This, alongside with not setting an initial value for `BlockEllipsis`, are to fix an interaction of things that I feel might be fine for a shorthand property, since they're explainable based on the longhands, but might not be so much for a longhand. I'm not sure that this fix is the right one, or even that there should be one at all though. Still, I should've documented this.

    In the spec, `block-ellipsis` is an inherited property, while the other `line-clamp` longhands aren't. This is because when deciding whether the clamp point has an ellipsis (and in the future, what custom string to show instead of an ellipsis), the value checked is not the one in the line-clamp container, but in the inline formatting context root for the clamped line. So you could hide or customize the ellipsis depending on the paragraph.

    One consequence of this is that an unstyled child of an element with `line-clamp: 3` would have an unserializable value of `line-clamp`, since the value for the longhands would be `continue: normal` (initial), `max-lines: auto` (initial), `block-ellipsis: ellipsis` (non-initial, inherited).

    This also means that `<div style="line-clamp: 3"><div style="line-clamp: initial"><div id="a"></div></div></div>`

    These two behaviors seem acceptable if `line-clamp` is a shorthand, but not if it's shipped as a non-inherited longhand. To try to fix this, I had `line-clamp: none` _not_ set the value of `block-ellipsis`; and when serializing or comparing `line-clamp`, `block-ellipsis` is ignored if `continue: normal` (so a non-initial value of `block-ellipsis` doesn't prevent `line-clamp` from serializing or comparing to `none`).

    Are there any other alternatives I could've used?

    File third_party/blink/renderer/core/css/properties/longhands/longhands_custom.cc
    Line 6539, Patchset 3 (Latest): // not setting BlockEllipsis
    Anders Hartvoll Ruud . unresolved

    Why not? It has _some_ initial value, surely.

    Andreu Botella

    Same explanation as `ignore_block_ellipsis` above.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Anders Hartvoll Ruud
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I73d254b9e8014f52fc8fd2223a1d651a99a50187
    Gerrit-Change-Number: 7798861
    Gerrit-PatchSet: 3
    Gerrit-Owner: Andreu Botella <abot...@igalia.com>
    Gerrit-Reviewer: Anders Hartvoll Ruud <and...@chromium.org>
    Gerrit-Reviewer: Andreu Botella <abot...@igalia.com>
    Gerrit-Reviewer: Ian Kilpatrick <ikilp...@chromium.org>
    Gerrit-CC: Menard, Alexis <alexis...@intel.com>
    Gerrit-Attention: Anders Hartvoll Ruud <and...@chromium.org>
    Gerrit-Comment-Date: Thu, 30 Apr 2026 15:31:04 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Anders Hartvoll Ruud <and...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Andreu Botella (Gerrit)

    unread,
    Apr 30, 2026, 11:36:43 AMApr 30
    to Anders Hartvoll Ruud, Ian Kilpatrick, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, apavlo...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org
    Attention needed from Anders Hartvoll Ruud

    Andreu Botella added 1 comment

    File third_party/blink/renderer/core/css/css_property_equality.cc
    Line 597, Patchset 3 (Latest): bool ignore_block_ellipsis = a.Continue() != EContinue::kNormal;
    Anders Hartvoll Ruud . unresolved

    What is the explanation for this behavior? Looking briefly at the spec, I couldn't find anything relevant.

    Andreu Botella

    This, alongside with not setting an initial value for `BlockEllipsis`, are to fix an interaction of things that I feel might be fine for a shorthand property, since they're explainable based on the longhands, but might not be so much for a longhand. I'm not sure that this fix is the right one, or even that there should be one at all though. Still, I should've documented this.

    In the spec, `block-ellipsis` is an inherited property, while the other `line-clamp` longhands aren't. This is because when deciding whether the clamp point has an ellipsis (and in the future, what custom string to show instead of an ellipsis), the value checked is not the one in the line-clamp container, but in the inline formatting context root for the clamped line. So you could hide or customize the ellipsis depending on the paragraph.

    One consequence of this is that an unstyled child of an element with `line-clamp: 3` would have an unserializable value of `line-clamp`, since the value for the longhands would be `continue: normal` (initial), `max-lines: auto` (initial), `block-ellipsis: ellipsis` (non-initial, inherited).

    This also means that `<div style="line-clamp: 3"><div style="line-clamp: initial"><div id="a"></div></div></div>`

    These two behaviors seem acceptable if `line-clamp` is a shorthand, but not if it's shipped as a non-inherited longhand. To try to fix this, I had `line-clamp: none` _not_ set the value of `block-ellipsis`; and when serializing or comparing `line-clamp`, `block-ellipsis` is ignored if `continue: normal` (so a non-initial value of `block-ellipsis` doesn't prevent `line-clamp` from serializing or comparing to `none`).

    Are there any other alternatives I could've used?

    Andreu Botella

    Sorry, I left a paragraph unfinished there:

    This also means that in `<div style="line-clamp: 3"><div id="a" style="line-clamp: initial"></div></div>`, `#a` will behave differently if it contains a clamp point than if it didn't have `line-clamp: initial`, because that resets the value of `block-ellipsis`.

    Gerrit-Comment-Date: Thu, 30 Apr 2026 15:36:23 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Andreu Botella <abot...@igalia.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Anders Hartvoll Ruud (Gerrit)

    unread,
    May 4, 2026, 5:37:46 AM (11 days ago) May 4
    to Andreu Botella, Ian Kilpatrick, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, apavlo...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org
    Attention needed from Andreu Botella

    Anders Hartvoll Ruud added 1 comment

    File third_party/blink/renderer/core/css/css_property_equality.cc
    Line 597, Patchset 3 (Latest): bool ignore_block_ellipsis = a.Continue() != EContinue::kNormal;
    Anders Hartvoll Ruud . unresolved

    What is the explanation for this behavior? Looking briefly at the spec, I couldn't find anything relevant.

    Andreu Botella

    This, alongside with not setting an initial value for `BlockEllipsis`, are to fix an interaction of things that I feel might be fine for a shorthand property, since they're explainable based on the longhands, but might not be so much for a longhand. I'm not sure that this fix is the right one, or even that there should be one at all though. Still, I should've documented this.

    In the spec, `block-ellipsis` is an inherited property, while the other `line-clamp` longhands aren't. This is because when deciding whether the clamp point has an ellipsis (and in the future, what custom string to show instead of an ellipsis), the value checked is not the one in the line-clamp container, but in the inline formatting context root for the clamped line. So you could hide or customize the ellipsis depending on the paragraph.

    One consequence of this is that an unstyled child of an element with `line-clamp: 3` would have an unserializable value of `line-clamp`, since the value for the longhands would be `continue: normal` (initial), `max-lines: auto` (initial), `block-ellipsis: ellipsis` (non-initial, inherited).

    This also means that `<div style="line-clamp: 3"><div style="line-clamp: initial"><div id="a"></div></div></div>`

    These two behaviors seem acceptable if `line-clamp` is a shorthand, but not if it's shipped as a non-inherited longhand. To try to fix this, I had `line-clamp: none` _not_ set the value of `block-ellipsis`; and when serializing or comparing `line-clamp`, `block-ellipsis` is ignored if `continue: normal` (so a non-initial value of `block-ellipsis` doesn't prevent `line-clamp` from serializing or comparing to `none`).

    Are there any other alternatives I could've used?

    Andreu Botella

    Sorry, I left a paragraph unfinished there:

    This also means that in `<div style="line-clamp: 3"><div id="a" style="line-clamp: initial"></div></div>`, `#a` will behave differently if it contains a clamp point than if it didn't have `line-clamp: initial`, because that resets the value of `block-ellipsis`.

    Anders Hartvoll Ruud

    I don't get it.

    This is because when deciding whether the clamp point has an ellipsis (and in the future, what custom string to show instead of an ellipsis), the value checked is not the one in the line-clamp container, but in the inline formatting context root for the clamped line.

    That is not relevant for the computed value stage. "Value checked" by what? Where?

    unstyled child of an element with line-clamp: 3 would have an unserializable value of line-clamp

    Why is it not just `line-clamp: ellipsis`? Though it depends on what you mean by "unstyled child". (There is no such thing, unless it's display:none, or outside the flat tree.)

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Andreu Botella
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I73d254b9e8014f52fc8fd2223a1d651a99a50187
    Gerrit-Change-Number: 7798861
    Gerrit-PatchSet: 3
    Gerrit-Owner: Andreu Botella <abot...@igalia.com>
    Gerrit-Reviewer: Anders Hartvoll Ruud <and...@chromium.org>
    Gerrit-Reviewer: Andreu Botella <abot...@igalia.com>
    Gerrit-Reviewer: Ian Kilpatrick <ikilp...@chromium.org>
    Gerrit-CC: Menard, Alexis <alexis...@intel.com>
    Gerrit-Attention: Andreu Botella <abot...@igalia.com>
    Gerrit-Comment-Date: Mon, 04 May 2026 09:37:24 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Andreu Botella (Gerrit)

    unread,
    May 4, 2026, 1:56:21 PM (11 days ago) May 4
    to Anders Hartvoll Ruud, Ian Kilpatrick, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, apavlo...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org
    Attention needed from Anders Hartvoll Ruud

    Andreu Botella added 1 comment

    File third_party/blink/renderer/core/css/css_property_equality.cc
    Line 597, Patchset 3 (Latest): bool ignore_block_ellipsis = a.Continue() != EContinue::kNormal;
    Anders Hartvoll Ruud . unresolved

    What is the explanation for this behavior? Looking briefly at the spec, I couldn't find anything relevant.

    Andreu Botella

    This, alongside with not setting an initial value for `BlockEllipsis`, are to fix an interaction of things that I feel might be fine for a shorthand property, since they're explainable based on the longhands, but might not be so much for a longhand. I'm not sure that this fix is the right one, or even that there should be one at all though. Still, I should've documented this.

    In the spec, `block-ellipsis` is an inherited property, while the other `line-clamp` longhands aren't. This is because when deciding whether the clamp point has an ellipsis (and in the future, what custom string to show instead of an ellipsis), the value checked is not the one in the line-clamp container, but in the inline formatting context root for the clamped line. So you could hide or customize the ellipsis depending on the paragraph.

    One consequence of this is that an unstyled child of an element with `line-clamp: 3` would have an unserializable value of `line-clamp`, since the value for the longhands would be `continue: normal` (initial), `max-lines: auto` (initial), `block-ellipsis: ellipsis` (non-initial, inherited).

    This also means that `<div style="line-clamp: 3"><div style="line-clamp: initial"><div id="a"></div></div></div>`

    These two behaviors seem acceptable if `line-clamp` is a shorthand, but not if it's shipped as a non-inherited longhand. To try to fix this, I had `line-clamp: none` _not_ set the value of `block-ellipsis`; and when serializing or comparing `line-clamp`, `block-ellipsis` is ignored if `continue: normal` (so a non-initial value of `block-ellipsis` doesn't prevent `line-clamp` from serializing or comparing to `none`).

    Are there any other alternatives I could've used?

    Andreu Botella

    Sorry, I left a paragraph unfinished there:

    This also means that in `<div style="line-clamp: 3"><div id="a" style="line-clamp: initial"></div></div>`, `#a` will behave differently if it contains a clamp point than if it didn't have `line-clamp: initial`, because that resets the value of `block-ellipsis`.

    Anders Hartvoll Ruud

    I don't get it.

    This is because when deciding whether the clamp point has an ellipsis (and in the future, what custom string to show instead of an ellipsis), the value checked is not the one in the line-clamp container, but in the inline formatting context root for the clamped line.

    That is not relevant for the computed value stage. "Value checked" by what? Where?

    unstyled child of an element with line-clamp: 3 would have an unserializable value of line-clamp

    Why is it not just `line-clamp: ellipsis`? Though it depends on what you mean by "unstyled child". (There is no such thing, unless it's display:none, or outside the flat tree.)

    Andreu Botella

    Why is it not just `line-clamp: ellipsis`? Though it depends on what you mean by "unstyled child". (There is no such thing, unless it's display:none, or outside the flat tree.)

    I meant a child with no (relevant) styles set, so all the properties would inherit or have their initial values.

    For the `line-clamp` shorthand, `line-clamp: none` sets all the longhands to their initial values; in particular, it sets `continue` to `normal` (or `auto` in the current spec text, which hasn't been updated yet; see https://github.com/w3c/csswg-drafts/issues/13670). Meanwhile, a value other than `none` always sets `continue` to either `collapse` or `-webkit-legacy`.

    The reason for this is that with the initial value of `continue` there's no clamping, so `max-lines` and `block-ellipsis` don't take effect. But that also means that there's no syntax for `line-clamp` that results in `continue: normal` and `block-ellipsis: ellipsis`.

    ------

    That is not relevant for the computed value stage. "Value checked" by what? Where?

    You're right that this is not relevant for the computed value stage, but there's an alternative implementation of this where the `BlockEllipsis` computed style extra field does not inherit, and doesn't share the same storage with the `block-ellipsis` longhand. This could be made to work, but it'd need layout code refactoring, and I'd rather keep the difference between the different runtime flag options limited to the style code.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Anders Hartvoll Ruud
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I73d254b9e8014f52fc8fd2223a1d651a99a50187
    Gerrit-Change-Number: 7798861
    Gerrit-PatchSet: 3
    Gerrit-Owner: Andreu Botella <abot...@igalia.com>
    Gerrit-Reviewer: Anders Hartvoll Ruud <and...@chromium.org>
    Gerrit-Reviewer: Andreu Botella <abot...@igalia.com>
    Gerrit-Reviewer: Ian Kilpatrick <ikilp...@chromium.org>
    Gerrit-CC: Menard, Alexis <alexis...@intel.com>
    Gerrit-Attention: Anders Hartvoll Ruud <and...@chromium.org>
    Gerrit-Comment-Date: Mon, 04 May 2026 17:56:04 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Anders Hartvoll Ruud (Gerrit)

    unread,
    May 5, 2026, 3:52:19 AM (10 days ago) May 5
    to Andreu Botella, Ian Kilpatrick, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, apavlo...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org
    Attention needed from Andreu Botella

    Anders Hartvoll Ruud added 1 comment

    File third_party/blink/renderer/core/css/css_property_equality.cc
    Anders Hartvoll Ruud

    there's an alternative implementation of this where the BlockEllipsis computed style extra field does not inherit, and doesn't share the same storage with the block-ellipsis longhand.

    I don't see why that would be needed.

    I'd rather keep the difference between the different runtime flag options limited to the style code.

    Agreed.

    unstyled child of an element with line-clamp: 3 would have an unserializable value of line-clamp

    [myself] Why is it not just line-clamp: ellipsis?

    OK, now I see why it's not just `ellipsis`. `line-clamp: ellipsis` actually corresponds to `max-lines:none;continue:collapse;block-ellipsis:ellipsis`, where as we would actually need to represent `max-lines:none;continue:normal;block-ellipsis:ellipsis` on the "unstyled child".

    This just sounds like poor design. Unless this is a deliberate choice by the CSSWG, we should just raise an issue and fix it.

    Either way, the way it's set up now is wrong. When applying the initial value of `line-clamp` (as well as `none`), we do need to explicitly apply the _entire_ initial value onto the `ComputedStyle`. Right now, we're applying a partial initial value on top of some undefined `block-ellipsis` value.

    If this _is_ a deliberate choice, then we probably need to return an empty string for the `line-clamp` longhand-which-should-have-been-a-shorthand. After all, this is how the true `line-clamp` shorthand would behave as well.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Andreu Botella
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I73d254b9e8014f52fc8fd2223a1d651a99a50187
    Gerrit-Change-Number: 7798861
    Gerrit-PatchSet: 3
    Gerrit-Owner: Andreu Botella <abot...@igalia.com>
    Gerrit-Reviewer: Anders Hartvoll Ruud <and...@chromium.org>
    Gerrit-Reviewer: Andreu Botella <abot...@igalia.com>
    Gerrit-Reviewer: Ian Kilpatrick <ikilp...@chromium.org>
    Gerrit-CC: Menard, Alexis <alexis...@intel.com>
    Gerrit-Attention: Andreu Botella <abot...@igalia.com>
    Gerrit-Comment-Date: Tue, 05 May 2026 07:52:00 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Andreu Botella (Gerrit)

    unread,
    May 6, 2026, 10:19:13 AM (9 days ago) May 6
    to Anders Hartvoll Ruud, Ian Kilpatrick, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, apavlo...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org
    Attention needed from Anders Hartvoll Ruud

    Andreu Botella added 1 comment

    File third_party/blink/renderer/core/css/css_property_equality.cc
    Line 597, Patchset 3 (Latest): bool ignore_block_ellipsis = a.Continue() != EContinue::kNormal;
    Anders Hartvoll Ruud . resolved
    Andreu Botella

    This just sounds like poor design. Unless this is a deliberate choice by the CSSWG, we should just raise an issue and fix it.

    `continue: normal` blocks the effects of the other two properties, so this isn't necessarily a bad design in my opinion. When you're using `line-clamp`, the value space makes sense, and the only case where something goes wrong is when serializing.

    ------

    I discussed some of this with Ian, and I think this implementation where the value state for the `block-ellipsis` property when exposed is also used for the `line-clamp` longhand is probably not a good idea. Instead, I'll work on a change where the `block-ellipsis` state is stored in a separate non-inherited computed state extra field, since the layout code change needed for this is relatively small.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Anders Hartvoll Ruud
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I73d254b9e8014f52fc8fd2223a1d651a99a50187
    Gerrit-Change-Number: 7798861
    Gerrit-PatchSet: 3
    Gerrit-Owner: Andreu Botella <abot...@igalia.com>
    Gerrit-Reviewer: Anders Hartvoll Ruud <and...@chromium.org>
    Gerrit-Reviewer: Andreu Botella <abot...@igalia.com>
    Gerrit-Reviewer: Ian Kilpatrick <ikilp...@chromium.org>
    Gerrit-CC: Menard, Alexis <alexis...@intel.com>
    Gerrit-Attention: Anders Hartvoll Ruud <and...@chromium.org>
    Gerrit-Comment-Date: Wed, 06 May 2026 14:18:53 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy
    Reply all
    Reply to author
    Forward
    0 new messages