Skip to content

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

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

layout: Make Servo compatible with Stylo with extra preference media query support#42011
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 Outdated
@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 Outdated
@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 <lwarlow@igalia.com>
@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.

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.

5 participants