Open Bug 1997043 Opened 1 month ago Updated 1 month ago

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

Categories

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

Firefox 146
defect

Tracking

()

ASSIGNED

People

(Reporter: percyley, Assigned: jfkthame)

References

(Blocks 1 open bug, )

Details

Attachments

(1 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
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: