Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove <font> element text decoration color override. #8566

Closed
bfgeek opened this issue Nov 30, 2022 · 6 comments
Closed

Remove <font> element text decoration color override. #8566

bfgeek opened this issue Nov 30, 2022 · 6 comments

Comments

@bfgeek
Copy link
Member

bfgeek commented Nov 30, 2022

Currently WebKit and Blink have a behaviour where they'll change the decoration of any inherited text decoration colors within an <a> element, and <font> element.

See this testcase:
https://www.software.hixie.ch/utilities/js/live-dom-viewer/?saved=11071

<!DOCTYPE html>
<div style="text-decoration: underline solid 5px hotpink">
  <font style="color: purple">font tag</font>
  <br>
  <a style="color: green" href="example.com">a tag</a>
</div>

Currently this behaviour is described for the <font> element, but not the <a> element (I think). See:
https://html.spec.whatwg.org/#phrasing-content-3
https://html.spec.whatwg.org/#phrasing-content-3:~:text=The%20font%20element%20is%20expected%20to%20override%20the%20color%20of%20any%20text%20decoration%20that%20spans%20the%20text%20of%20the%20element%20to%20the%20used%20value%20of%20the%20element%27s%20%27color%27%20property.

The font element is expected to override the color of any text decoration that spans the text of the element to the used value of the element's 'color' property.

We (Blink) would like to align with Gecko's behaviour.

We suspect that there isn't any compat risk for removing this from the <font> element, however a small compat risk with the <a> element (we'll roll this out with a kill switch).

The following WPTs will need to be updated:
html/rendering/non-replaced-elements/phrasing-content-0/font-element-text-decoration-color/001-a.html
html/rendering/non-replaced-elements/phrasing-content-0/font-element-text-decoration-color/001-q.html
html/rendering/non-replaced-elements/phrasing-content-0/font-element-text-decoration-color/001-s.html
html/rendering/non-replaced-elements/phrasing-content-0/font-element-text-decoration-color/001-x.xhtml

Ian

@bfgeek
Copy link
Member Author

bfgeek commented Nov 30, 2022

cc/ @emilio @drott @kojiishi @mfreed7

@emilio
Copy link
Contributor

emilio commented Nov 30, 2022

So Firefox behavior is somewhat weird. Code and comment is here, see https://www.software.hixie.ch/utilities/js/live-dom-viewer/saved/11073.

Do you plan to remove that as well? It might be ok doing that fwiw, it's legacy quirks behavior and it might not matter so much anymore, but just wanted to point it out.

@bfgeek
Copy link
Member Author

bfgeek commented Nov 30, 2022

Wild... yup plan on removing that case as well.

With my disable patch above renders above case with a blue underline.

Ian

@bfgeek
Copy link
Member Author

bfgeek commented Nov 30, 2022

FWIW this was originally just a quirk (in the quirks spec), but then added to the HTML spec via: 08e78b5d3 which was likely a mistake.

@bfgeek
Copy link
Member Author

bfgeek commented Dec 1, 2022

@emilio - Can I put you down as "interested" from Firefox's perspective?

@emilio
Copy link
Contributor

emilio commented Dec 1, 2022

Yes :)

chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Dec 1, 2022
This adds and enables a flag to disable the non-standard text-decoration
color override logic.

This "quirk" was only ever meant to be for the <font> element (not for
the <a> element) and in quirks mode.

Firefox applies this quirk in a far reduced set of circumstances, and
likely isn't required by web content anymore.

This is hooked up to a finch kill-switch so we can disable if necessary.

See:
whatwg/html#8568
whatwg/html#8566

Bug: 1394817
Change-Id: Icdf86b1099c81571729767b56a7b3aaee7c85e7d
@domenic domenic closed this as completed in 055bc6b Dec 2, 2022
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Dec 2, 2022
This adds and enables a flag to disable the non-standard text-decoration
color override logic.

This "quirk" was only ever meant to be for the <font> element (not for
the <a> element) and in quirks mode.

Firefox applies this quirk in a far reduced set of circumstances, and
likely isn't required by web content anymore.

This is hooked up to a finch kill-switch so we can disable if necessary.

See:
whatwg/html#8568
whatwg/html#8566

Bug: 1394817
Change-Id: Icdf86b1099c81571729767b56a7b3aaee7c85e7d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4066694
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1078424}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Dec 2, 2022
This adds and enables a flag to disable the non-standard text-decoration
color override logic.

This "quirk" was only ever meant to be for the <font> element (not for
the <a> element) and in quirks mode.

Firefox applies this quirk in a far reduced set of circumstances, and
likely isn't required by web content anymore.

This is hooked up to a finch kill-switch so we can disable if necessary.

See:
whatwg/html#8568
whatwg/html#8566

Bug: 1394817
Change-Id: Icdf86b1099c81571729767b56a7b3aaee7c85e7d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4066694
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1078424}
pmeenan pushed a commit to pmeenan/html that referenced this issue Dec 2, 2022
pmeenan pushed a commit to pmeenan/html that referenced this issue Dec 2, 2022
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Dec 11, 2022
…disable text-decoration override, a=testonly

Automatic update from web-platform-tests
[text-decorations] Add & enable flag to disable text-decoration override

This adds and enables a flag to disable the non-standard text-decoration
color override logic.

This "quirk" was only ever meant to be for the <font> element (not for
the <a> element) and in quirks mode.

Firefox applies this quirk in a far reduced set of circumstances, and
likely isn't required by web content anymore.

This is hooked up to a finch kill-switch so we can disable if necessary.

See:
whatwg/html#8568
whatwg/html#8566

Bug: 1394817
Change-Id: Icdf86b1099c81571729767b56a7b3aaee7c85e7d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4066694
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1078424}

--

wpt-commits: 8646f9fc564439fe5c7582ce5d73a86427a57cf2
wpt-pr: 37283
BruceDai pushed a commit to BruceDai/wpt that referenced this issue Dec 13, 2022
This adds and enables a flag to disable the non-standard text-decoration
color override logic.

This "quirk" was only ever meant to be for the <font> element (not for
the <a> element) and in quirks mode.

Firefox applies this quirk in a far reduced set of circumstances, and
likely isn't required by web content anymore.

This is hooked up to a finch kill-switch so we can disable if necessary.

See:
whatwg/html#8568
whatwg/html#8566

Bug: 1394817
Change-Id: Icdf86b1099c81571729767b56a7b3aaee7c85e7d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4066694
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1078424}
jamienicol pushed a commit to jamienicol/gecko that referenced this issue Dec 14, 2022
…disable text-decoration override, a=testonly

Automatic update from web-platform-tests
[text-decorations] Add & enable flag to disable text-decoration override

This adds and enables a flag to disable the non-standard text-decoration
color override logic.

This "quirk" was only ever meant to be for the <font> element (not for
the <a> element) and in quirks mode.

Firefox applies this quirk in a far reduced set of circumstances, and
likely isn't required by web content anymore.

This is hooked up to a finch kill-switch so we can disable if necessary.

See:
whatwg/html#8568
whatwg/html#8566

Bug: 1394817
Change-Id: Icdf86b1099c81571729767b56a7b3aaee7c85e7d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4066694
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1078424}

--

wpt-commits: 8646f9fc564439fe5c7582ce5d73a86427a57cf2
wpt-pr: 37283
noamr pushed a commit to noamr/html that referenced this issue Jan 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants