Skip to content

Commit

Permalink
Better dark mode
Browse files Browse the repository at this point in the history
Fixes #422
  • Loading branch information
tomayac committed Jan 15, 2025
1 parent 2c54f4f commit cc86249
Showing 1 changed file with 37 additions and 1 deletion.
38 changes: 37 additions & 1 deletion css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,9 @@ table {
border-collapse: collapse;
border-spacing: 0;
}

/* WebAssembly.org CSS */

:root {
color-scheme: dark light;
}
Expand Down Expand Up @@ -1999,6 +2002,21 @@ header {
color: #9c8529;
}

@media (prefers-color-scheme: dark) {
.flash.flash-warn {
color: CanvasText;
background-color: #555;
}

.flash.flash-warn a {
color: #f2db81;
}

::after {
filter: invert(1) brightness(0.8);
}
}

.flash.flash-error {
background-color: #ffcdd2;
}
Expand Down Expand Up @@ -2490,14 +2508,32 @@ table td {
}

table tr {
background-color: #fff;
border-top: 1px solid #ccc;
}

table tr:nth-child(2n) {
background-color: #f8f8f8;
}

@media (prefers-color-scheme: dark) {
table th,
table td {
border: 1px solid #222;
}

table tr {
border-top: 1px solid #333;
}

table tr:nth-child(2n) {
background-color: #303030;
}

.feature-cell {
filter: brightness(2);
}
}

code {
padding: 0;
padding-top: 0.2em;
Expand Down

0 comments on commit cc86249

Please sign in to comment.