servo / servo/servo

`filter` on `html` doesn't affect backgrounds

Open
#41,375 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-layout/2020 C-has-manual-testcase I-wrong
Dominant language
Rust
Stars
38k
Forks
3.8k
Avg merge
1d 8h
Merged PRs (30d)
459

Description

Describe the bug:
filter CSS on html doesn't seem to apply an effect on the backgrounds of <html> or contained elements. This doesn't apply if filter is placed on body or any element below that.

To Reproduce:

<!doctype html>
<style>
html { filter:invert(100%) hue-rotate(-180deg); }
</style>
<body style="background:gold;color:brown;">Hello

Chrome:
Image
Servo:
Image

Platform:
Windows 10.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the HTML reproducer in the issue and compare Servo's rendering of an html-level filter with the body-level case. Trace the browser rendering path for CSS filters and the backgrounds of the html element and its descendants. Done means the supplied example applies the filter to those backgrounds consistently with Chrome.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, html, rust
Domain
frontend, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.