diff --git a/actionpack/lib/action_dispatch/middleware/templates/routes/_table.html.erb b/actionpack/lib/action_dispatch/middleware/templates/routes/_table.html.erb index 4c521377a2..0b0cf41e4a 100644 --- a/actionpack/lib/action_dispatch/middleware/templates/routes/_table.html.erb +++ b/actionpack/lib/action_dispatch/middleware/templates/routes/_table.html.erb @@ -51,22 +51,13 @@ } @media (prefers-color-scheme: dark) { - body { - background-color: #222; - color: #ECECEC; - } - #route_table tbody tr:nth-child(odd) { - background: #333; + background: #282828; } - #route_table tbody tr:nth-child(even) { - background: #444; - } - - #route_table tbody.exact_matches, - #route_table tbody.fuzzy_matches { - color: #333; + #route_table tbody.exact_matches tr, + #route_table tbody.fuzzy_matches tr { + background: DarkSlateGrey; } } <% end %> diff --git a/railties/lib/rails/templates/layouts/application.html.erb b/railties/lib/rails/templates/layouts/application.html.erb index 5aecaa712a..47a6bafa29 100644 --- a/railties/lib/rails/templates/layouts/application.html.erb +++ b/railties/lib/rails/templates/layouts/application.html.erb @@ -25,6 +25,21 @@ h2 { padding-left: 10px; } + @media (prefers-color-scheme: dark) { + body { + background-color: #222; + color: #ececec; + } + + pre { + background-color: #333; + } + + a { color: #fff; } + a:visited { color: #999; } + a:hover { color: #000; background-color: #fff; } + } + <%= yield :style %>