Skip to content

Commit 098f1be

Browse files
arthmismrobinson
andauthored
Add getter for prefers color scheme value found on Device (#100)
* add getter for prefers color scheme value found on Device * update doc comment Co-authored-by: Martin Robinson <mrobinson@igalia.com> Signed-off-by: arthmis <artmis9@protonmail.com> --------- Signed-off-by: arthmis <artmis9@protonmail.com> Co-authored-by: lazypassion <25536767+lazypassion@users.noreply.github.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
1 parent 35e0fa2 commit 098f1be

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎style/servo/media_queries.rs‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,11 @@ impl Device {
301301
AbsoluteColor::BLACK
302302
}
303303

304+
/// Returns the color scheme of this [`Device`].
305+
pub fn color_scheme(&self) -> PrefersColorScheme {
306+
self.prefers_color_scheme
307+
}
308+
304309
pub(crate) fn is_dark_color_scheme(&self, _: ColorSchemeFlags) -> bool {
305310
false
306311
}

0 commit comments

Comments
 (0)