Commit b70bf309 authored by dpapad's avatar dpapad Committed by Commit Bot

NTP: Enable scrollbars to follow system's light/dark theme.

Previously scrollbars always appeared light, even if a WebUI
page was otherwise respecting dark mode. The upcoming
FormControlsDarkMode feature allows webpages to specify whether
scrollbars should follow the system's theme, by specifying a new
<meta name="color-scheme"> tag.

Launch Chrome with the following flags to experience dark scrollbars.
--enable-features=WebUIDarkMode,CSSColorSchemeUARendering \
--force-dark-mode

Bug: 1142291
Change-Id: Iaaea8427a88bdf7cb53559e5fed35d8d59df5ef3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2513686Reviewed-by: default avatarEsmael Elmoslimany <aee@chromium.org>
Commit-Queue: dpapad <dpapad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#823279}
parent 6954e201
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
<html dir="$i18n{textdirection}" lang="$i18n{language}"> <html dir="$i18n{textdirection}" lang="$i18n{language}">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="color-scheme" content="light dark">
<title>$i18n{title}</title> <title>$i18n{title}</title>
<style> <style>
body { body {
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
<html dir="$i18n{textdirection}" $i18n{modalOverlays}> <html dir="$i18n{textdirection}" $i18n{modalOverlays}>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="color-scheme" content="light dark">
<style> <style>
body { body {
margin: 0; margin: 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment