Add remaining preference media queries#288
Open
lukewarlow wants to merge 15 commits intoservo:mainfrom
Open
Conversation
9d56be2 to
54fa517
Compare
mrobinson
approved these changes
Jan 19, 2026
aeb91ff to
f357935
Compare
Any ancestors of this commit are from upstream mozilla-central, with some filtering and renaming. Our patches and sync tooling start here. The sync tooling has all been squashed into this commit, based on: https://github.com/servo/stylo/commits/64731e10dc8ef87ef52aa2fb9f988c3b2530f3a7
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This preference is only used in Gecko-specific code, so it's unnecessary for Servo. Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Previously, Stylo was hard-coding the value for various preferences. Now Stylo will only define the default value for the preferences, but if the embedder sets a different value, the latter will be used instead. For example, when not set otherwise, `layout.threads` used to default to 0 as any other i32 pref. However, this was a bad default, it meant that embedders like Blitz were running Stylo single-threaded. With this change we can make it default to -1, while still allowing Servo to set it to 3. For consistent defaults, this replaces most `style_config::get_bool()` with `static_prefs::pref!()`. Servo PR: servo/servo#42491 Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Given [CSS Value Spec](https://drafts.csswg.org/css-values-4/#url-empty), CSS url value with empty string should be treated as invalid, and should not trigger resource load. This change specifically fix a corner case [wpt test](https://wpt.fyi/results/css/css-images/empty-background-image.html?label=master&label=experimental&product=chrome&product=edge&product=firefox&product=safari&product=servo&aligned). See the wpt try run in [parallel servo PR ](servo/servo#42622) --------- Signed-off-by: rayguo17 <tin.tun.aung1@huawei.com>
These crates used to have independent sets of preferences, which wasn't ideal. Now that it's no longer the case, it doesn't make sense to keep them as separate crates. Servo PR: servo/servo#42605 Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This adds `prefers-contrast`, `prefers-reduced-motion`, and `prefers-reduced-transparency`. Signed-off-by: Luke Warlow <lwarlow@igalia.com>
f357935 to
c85cd37
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds
prefers-contrast,prefers-reduced-motion, andprefers-reduced-transparency.Servo PR: servo/servo#42011