Skip to content

Commit

Permalink
Add getter for prefers color scheme value found on Device (#100)
Browse files Browse the repository at this point in the history
* add getter for prefers color scheme value found on Device

* update doc comment

Co-authored-by: Martin Robinson <[email protected]>
Signed-off-by: arthmis <[email protected]>

---------

Signed-off-by: arthmis <[email protected]>
Co-authored-by: lazypassion <[email protected]>
Co-authored-by: Martin Robinson <[email protected]>
  • Loading branch information
3 people authored Dec 11, 2024
1 parent 35e0fa2 commit 098f1be
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions style/servo/media_queries.rs
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,11 @@ impl Device {
AbsoluteColor::BLACK
}

/// Returns the color scheme of this [`Device`].
pub fn color_scheme(&self) -> PrefersColorScheme {
self.prefers_color_scheme
}

pub(crate) fn is_dark_color_scheme(&self, _: ColorSchemeFlags) -> bool {
false
}
Expand Down

0 comments on commit 098f1be

Please sign in to comment.