about summary refs log tree commit diff
path: root/src/librustdoc/html/static/css
diff options
context:
space:
mode:
authorMichael Howell <michael@notriddle.com>2023-03-23 14:25:43 -0700
committerMichael Howell <michael@notriddle.com>2023-03-23 14:25:43 -0700
commit95ef91c573c7c49d620688e81ffe1c97fd22501c (patch)
tree3bd59236f646ff7de038778cf837c8d26f961ee0 /src/librustdoc/html/static/css
parentba3d6055adf0a93800d79ea2281222df81b44b59 (diff)
downloadrust-95ef91c573c7c49d620688e81ffe1c97fd22501c.tar.gz
rust-95ef91c573c7c49d620688e81ffe1c97fd22501c.zip
rustdoc: remove old `content` hack for theme switching
This is based on the compatibility data for `window.matchMedia` and
`MediaQueryList`'s `EventTarget` implementation.

https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryList#browser_compatibility

https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia#browser_compatibility

  * EventTarget would require us to drop support for all Chrome
    versions before 39. However, we already require Chrome 49,
    because rustdoc requires [CSS variables].
  * EventTarget would also limit us to Firefox 55, but since #106502
    rustdoc only supports Firefox > 68.
  * EventTarget limits us to Mobile Safari version 14, but #102404
    shows that our CSS is broken in Safari versions before 15.5.

[CSS variables]: https://developer.mozilla.org/en-US/docs/Web/CSS/--*#browser_compatibility
Diffstat (limited to 'src/librustdoc/html/static/css')
-rw-r--r--src/librustdoc/html/static/css/rustdoc.css15
1 files changed, 0 insertions, 15 deletions
diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css
index 7e036626efc..933a44c5aa7 100644
--- a/src/librustdoc/html/static/css/rustdoc.css
+++ b/src/librustdoc/html/static/css/rustdoc.css
@@ -87,21 +87,6 @@
 	box-sizing: border-box;
 }
 
-/* This part handles the "default" theme being used depending on the system one. */
-html {
-	content: "";
-}
-@media (prefers-color-scheme: light) {
-	html {
-		content: "light";
-	}
-}
-@media (prefers-color-scheme: dark) {
-	html {
-		content: "dark";
-	}
-}
-
 /* General structure and fonts */
 
 body {