Skip to content

layout: Make Servo compatible with Stylo with extra preference media query support - #42011

Closed
lukewarlow wants to merge 1 commit into
servo:mainfrom
lukewarlow:minimal-preference-mqs
Closed

lukewarlow wants to merge 1 commit into
servo:mainfrom
lukewarlow:minimal-preference-mqs

Conversation

@lukewarlow

@lukewarlow lukewarlow commented Jan 19, 2026 •

Copy link
Copy Markdown
Member

Make Servo compatible with Stylo with extra preference media query support

Obtaining the value from the embedder is left for a follow-up.

This makes Servo recognise prefers-contrast, prefers-reduced-transparency, prefers-reduced-motion.

Stylo PR: servo/stylo#288

See #39068

@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Jan 19, 2026
Comment thread Cargo.toml Resolved
@lukewarlow
lukewarlow force-pushed the minimal-preference-mqs branch from 86155b2 to 4e8e61b Compare January 19, 2026 14:34
@servo-highfive servo-highfive removed the S-awaiting-review There is new code that needs to be reviewed. label Jan 19, 2026
Comment thread components/layout/layout_impl.rs Resolved
@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Jan 19, 2026
@lukewarlow
lukewarlow force-pushed the minimal-preference-mqs branch from 1275b1b to 1e00e22 Compare January 27, 2026 12:22
@mrobinson mrobinson changed the title Make Servo compatible with Stylo with extra preference media query support layout: Make Servo compatible with Stylo with extra preference media query support Jan 28, 2026
@servo-highfive servo-highfive added S-needs-rebase There are merge conflict errors. and removed S-awaiting-review There is new code that needs to be reviewed. labels Jan 28, 2026
@lukewarlow
lukewarlow force-pushed the minimal-preference-mqs branch from 1e00e22 to f48e19b Compare January 28, 2026 14:49
@servo-highfive servo-highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-needs-rebase There are merge conflict errors. labels Jan 28, 2026
@lukewarlow
lukewarlow force-pushed the minimal-preference-mqs branch from f48e19b to 6c7b91d Compare February 24, 2026 11:26
Comment thread Cargo.toml
sea-query-rusqlite = { version = "0.8.0-rc.15" }
sec1 = "0.7"
selectors = { git = "https://github.com/servo/stylo", rev = "9a413b4d05d899c3baedd7b648dbf2c23dc9b879" }
selectors = { git = "https://github.com/servo/stylo", rev = "refs/pull/288/head" }

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO change once stylo PR is merged

@lukewarlow

Copy link
Copy Markdown
Member Author

Not sure what's going on, I can't seem to build this one locally anymore.

error: failed to load manifest for workspace member `/Users/luke/Development/BrowserEngines/servo/ports/servoshell`
referenced by workspace at `/Users/luke/Development/BrowserEngines/servo/Cargo.toml`

Caused by:
  failed to load manifest for dependency `libservo`

Caused by:
  failed to load manifest for dependency `background_hang_monitor`

Caused by:
  failed to load manifest for dependency `background_hang_monitor_api`

Caused by:
  failed to load manifest for dependency `base`

Caused by:
  failed to load manifest for dependency `servo_config`

Caused by:
  failed to parse manifest at `/Users/luke/Development/BrowserEngines/servo/components/config/Cargo.toml`

Caused by:
  error inheriting `stylo_static_prefs` from workspace root manifest's `workspace.dependencies.stylo_static_prefs`

Caused by:
  `dependency.stylo_static_prefs` was not found in `workspace.dependencies`
Failed in 0:00:00

@jdm

jdm commented Feb 24, 2026

Copy link
Copy Markdown
Member

You need to update your cargo.toml to account for servo/stylo#312

@lukewarlow

Copy link
Copy Markdown
Member Author

Ah! Thanks for spotting that.

…pport

Obtaining the value from the embedder is left for a follow-up.

Signed-off-by: Luke Warlow <[email protected]>
@lukewarlow
lukewarlow force-pushed the minimal-preference-mqs branch from 6c7b91d to 3e862e3 Compare February 24, 2026 13:05
@webbedspace

Copy link
Copy Markdown

Noticed that a few sites break because they put important fallbacks under @media(prefers-reduced-motion:false) (such as https://deltarune.com/ ) so I'm glad something like this is getting that ready.

@TimvdLippe

Copy link
Copy Markdown
Contributor

@lukewarlow Can we revive this PR? Seems valuable to me.

@lukewarlow

Copy link
Copy Markdown
Member Author

@TimvdLippe unfortunately I'm probably not going to have time for the next little bit so if you would like to pick this and the style PR up that would be great

@TimvdLippe

Copy link
Copy Markdown
Contributor

Sure thing, done in #50095

@lukewarlow lukewarlow closed this Nov 20, 2026
TimvdLippe added a commit to TimvdLippe/servo that referenced this pull request Nov 20, 2026
…query support

Make Servo compatible with Stylo with extra preference media query support

Obtaining the value from the embedder is left for a follow-up.

This makes Servo recognise `prefers-contrast`, `prefers-reduced-transparency`, `prefers-reduced-motion`.

Stylo PR: servo/stylo#528

Part of servo#39068
Supersedes and closes servo#42011

Co-authored-by: Luke Warlow <[email protected]>
Signed-off-by: Tim van der Lippe <[email protected]>
setoelkahfi pushed a commit to setoelkahfi/servo that referenced this pull request Nov 20, 2026
…query support (servo#50095)

Make Servo compatible with Stylo with extra preference media query
support Obtaining the value from the embedder is left for a follow-up.
This makes Servo recognise `prefers-contrast`,
`prefers-reduced-transparency`, `prefers-reduced-motion`.

Stylo PR: servo/stylo#528
Fixes: Part of servo#39068
Supersedes and closes servo#42011
Supersedes and closes servo#49958

Signed-off-by: Tim van der Lippe <[email protected]>
Co-authored-by: Luke Warlow <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-awaiting-review There is new code that needs to be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants