Skip to content

Commit

Permalink
Activate automatic dark mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Dawa Ometto committed Jan 18, 2023
1 parent 4208dbb commit 7bb97b0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions lib/gollum/public/gollum/stylesheets/template.scss.erb
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ h6 {

&:before {
content: url('data:image/svg+xml;utf8,<%= rocticon_css(:link) %>');
@media (prefers-color-scheme: dark) {
filter: invert(95%) sepia(4%) saturate(753%) hue-rotate(178deg) brightness(88%) contrast(92%);
}
}

&:not(.edit) {
Expand All @@ -64,6 +67,9 @@ h6 {

&:before {
content: url('data:image/svg+xml;utf8,<%= rocticon_css(:pencil) %>');
@media (prefers-color-scheme: dark) {
filter: invert(95%) sepia(4%) saturate(753%) hue-rotate(178deg) brightness(88%) contrast(92%);
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion lib/gollum/templates/layout.mustache
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html>
<html data-color-mode="auto" data-light-theme="light" data-dark-theme="dark">
<head>
<meta http-equiv="Content-type" content="text/html;charset=utf-8">
<meta name="MobileOptimized" content="width">
Expand Down

0 comments on commit 7bb97b0

Please sign in to comment.