LibWeb/CSS: Implement the color-scheme CSS property

This commit is contained in:
Gingeh
2025-01-02 12:59:09 +11:00
committed by Sam Atkins
parent 89296b88a0
commit ce5cd012b9
36 changed files with 618 additions and 370 deletions

View File

@@ -130,12 +130,6 @@ String ProcessManager::generate_html()
<title>Task Manager</title>
<style>
@media (prefers-color-scheme: dark) {
/* FIXME: We should be able to remove the HTML style when "color-scheme" is supported */
html {
background-color: rgb(30, 30, 30);
color: white;
}
tr:nth-child(even) {
background: rgb(57, 57, 57);
}
@@ -147,6 +141,10 @@ String ProcessManager::generate_html()
}
}
html {
color-scheme: light dark;
}
table {
width: 100%;
border-collapse: collapse;