diff --git a/ci/dev/gen_icons.sh b/ci/dev/gen_icons.sh
index 432b8f62..9d27486d 100755
--- a/ci/dev/gen_icons.sh
+++ b/ci/dev/gen_icons.sh
@@ -21,6 +21,24 @@ main() {
convert -quiet -background transparent -resize 512x512 pwa-icon.png pwa-icon-512.png
# We use -quiet above to avoid https://github.com/ImageMagick/ImageMagick/issues/884
+
+ # The following adds dark mode support for the favicon as favicon-dark-support.svg
+ # There is no similar capability for pwas or .ico so we can only add support to the svg.
+ favicon_dark_style=""
+ # See https://stackoverflow.com/a/22901380/4283659
+ # This escapes all newlines so that sed will accept them.
+ favicon_dark_style="$(printf "%s\n" "$favicon_dark_style" | sed -e ':a' -e 'N' -e '$!ba' -e 's/\n/\\n/g')"
+ sed "$(
+ cat -n << EOF
+s% favicon-dark-support.svg
}
main "$@"
diff --git a/src/browser/media/favicon-dark-support.svg b/src/browser/media/favicon-dark-support.svg
new file mode 100644
index 00000000..06f1fa00
--- /dev/null
+++ b/src/browser/media/favicon-dark-support.svg
@@ -0,0 +1,7 @@
+
\ No newline at end of file
diff --git a/src/browser/pages/error.html b/src/browser/pages/error.html
index 4d24d85f..73a9599b 100644
--- a/src/browser/pages/error.html
+++ b/src/browser/pages/error.html
@@ -11,7 +11,7 @@
content="style-src 'self'; manifest-src 'self'; img-src 'self' data:; font-src 'self' data:;"
/>
{{ERROR_TITLE}} - code-server
-
+
diff --git a/src/browser/pages/login.html b/src/browser/pages/login.html
index 9f74b296..ef3f16a4 100644
--- a/src/browser/pages/login.html
+++ b/src/browser/pages/login.html
@@ -11,7 +11,7 @@
content="style-src 'self'; script-src 'self' 'unsafe-inline'; manifest-src 'self'; img-src 'self' data:; font-src 'self' data:;"
/>
code-server login
-
+
diff --git a/src/browser/pages/vscode.html b/src/browser/pages/vscode.html
index c46cb47a..ef61fa5e 100644
--- a/src/browser/pages/vscode.html
+++ b/src/browser/pages/vscode.html
@@ -24,7 +24,7 @@
-
+