Skip to content

Enable prefers-color-scheme - #93

Merged
nicoburns merged 2 commits into
mainfrom
prefers-color-scheme
Nov 29, 2024
Merged

nicoburns merged 2 commits into
mainfrom
prefers-color-scheme

Conversation

@nicoburns

@nicoburns nicoburns commented Nov 28, 2024 •

Copy link
Copy Markdown
Collaborator

Servo PR:

Tested with Blitz:

Screen.Recording.2024-11-28.at.16.07.45.mov

@nicoburns

Copy link
Copy Markdown
Collaborator Author

I looked at upstreaming this change. However, this is a part of Stylo where we are currently maintaining quite a large diff, so my patch would not easily apply upstream (I could modify the implementation, but I think that would just cause conflicts when we sync). My proposal is that we land this here (along with the corresponding servo PR), and then I can look at upstreaming all of style/servo (or at least all of servo/style/media_queries.rs).

@nicoburns nicoburns changed the title Enable prefers-color-scheme for Servo Enable prefers-color-scheme Nov 29, 2024
Comment thread style/servo/media_queries.rs Outdated
#[derive(Clone, Copy, Debug, FromPrimitive, Parse, PartialEq, ToCss)]
#[repr(u8)]
#[allow(missing_docs)]
pub enum PrefersColorScheme {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I actually have code for that already! (which I didn't push because I thought it might be better to do "one thing at a time"). I've pushed it now. Does that seem better?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Yeah, well, no big deal either way if you prefer to leave that for a follow-up

@nicoburns
nicoburns added this pull request to the merge queue Nov 29, 2024
Merged via the queue into main with commit 16c1b68 Nov 29, 2024
@Loirooriol
Loirooriol deleted the prefers-color-scheme branch November 29, 2024 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants