Closed Bug 1997043 Opened 11 months ago Closed 3 months ago

[css-text-decor] text-decoration-inset: auto to `<length>` is not animatable

Categories

(Core :: Layout: Text and Fonts, defect)

Firefox 146
defect

Tracking

()

RESOLVED FIXED
154 Branch
Tracking Status
firefox154 --- fixed

People

(Reporter: percyley, Assigned: jfkthame)

References

(Blocks 1 open bug, )

Details

Attachments

(1 file, 1 obsolete file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36

Steps to reproduce:

Open:

data:text/html;charset=UTF-8,<!DOCTYPE html>
<style>
.test {
  font: 22px sans-serif;
  text-decoration: underline;
  transition: all 1s;
  text-decoration-trim: auto;
  &:hover {
    text-decoration-trim: 3em;
  }
}
</style>
<div class="test">text-decoration-trim transition</div>

Actual results:

The text decoration does not animate when narrowing.

Expected results:

Due to historical limitations, width: auto was also unable to be animated, leading to the eventual invention of calc-size().

text-decoration-trim is a new property, and we should avoid creating the same issues.

Blocks: 1780887

That seems to be something that needs to be defined in the specification.

Currently, the spec says:

specified keyword or absolute length

And it doesn't define an interpolation between them. Therefore, I've created https://github.com/w3c/csswg-drafts/issues/13036 to discuss that.

Sebastian

The property has been renamed to text-decoration-inset; updating bug title accordingly.

I don't see any reason not to do this, but we should get it clarified in the spec; thanks for filing the issue, Sebastian.

Summary: [css-text-decor] text-decoration-trim: auto to `<length>` is not animatable → [css-text-decor] text-decoration-inset: auto to `<length>` is not animatable
Assignee: nobody → jfkthame
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Severity: -- → S3
Attachment #9523967 - Attachment is obsolete: true
Pushed by jkew@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/115600d1e4c8 https://hg.mozilla.org/integration/autoland/rev/f6e6b3883247 Enable animating between 'auto' and explicit lengths for text-decoration-inset. r=firefox-style-system-reviewers,layout-reviewers,dshin

I guess the question for this kinda is... why are we not computing to a pixel value then? We'd be exposing the native value regardless right?

Flags: needinfo?(jfkthame)

Ok, I guess the spec resolution considered that... It still feels a bit weird?

Flags: needinfo?(jfkthame)
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 154 Branch

Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/60850 for changes under testing/web-platform/tests

Upstream PR merged by moz-wptsync-bot

QA Whiteboard: [qa-triage-done-c155/b154]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: