mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-07 08:39:43 +00:00
LibWeb: Handle Auto
resolution within Page::preferred_color_scheme
Handling this here means we don't have to it within individual callers
This commit is contained in:
parent
a19a6deaa4
commit
e0e00220fe
Notes:
github-actions[bot]
2025-08-04 10:30:40 +00:00
Author: https://github.com/Calme1709
Commit: e0e00220fe
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5517
Reviewed-by: https://github.com/AtkinsSJ ✅
Reviewed-by: https://github.com/gmta
3 changed files with 9 additions and 9 deletions
|
@ -370,9 +370,8 @@ Optional<CSS::MediaFeatureValue> Window::query_media_feature(CSS::MediaFeatureID
|
|||
return CSS::MediaFeatureValue(CSS::Keyword::Light);
|
||||
case CSS::PreferredColorScheme::Dark:
|
||||
return CSS::MediaFeatureValue(CSS::Keyword::Dark);
|
||||
case CSS::PreferredColorScheme::Auto:
|
||||
default:
|
||||
return CSS::MediaFeatureValue(page().palette().is_dark() ? CSS::Keyword::Dark : CSS::Keyword::Light);
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
}
|
||||
case CSS::MediaFeatureID::PrefersContrast:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue