RESOLVED FIXED Bug 189766
Web Inspector: Dark Mode: use the same CSS variables for dark and light modes
https://bugs.webkit.org/show_bug.cgi?id=189766
Summary Web Inspector: Dark Mode: use the same CSS variables for dark and light modes
Nikita Vasilyev
Reported 2018-09-19 15:29:52 PDT
With the dark mode, I added several dozen CSS variables. Currently, they are *only* used by the dark mode. The goal was to not break anything in the light mode while working on the dark mode. This is what it often looks like in the code: .cm-s-default { color: black; } @media (prefers-dark-interface) { :root { --text-color: hsl(0, 0%, 88%); } .cm-s-default { color: var(--text-color); } } Now that we don't expect many changes in the dark mode, it makes sense to start using the same variables for the light mode as well: :root { --text-color: black; } @media (prefers-dark-interface) { :root { --text-color: hsl(0, 0%, 88%); } } .cm-s-default { color: var(--text-color); }
Attachments
Patch (29.02 KB, patch)
2018-09-22 19:35 PDT, Nikita Vasilyev
no flags
Radar WebKit Bug Importer
Comment 1 2018-09-19 15:30:16 PDT
Nikita Vasilyev
Comment 2 2018-09-22 19:35:58 PDT
Created attachment 350543 [details] Patch This patch focuses on --text-color and --background-color. There's more to be done, but I plan to complete the refactoring in 3-4 patches.
Nikita Vasilyev
Comment 3 2018-10-01 18:04:58 PDT
*** Bug 190181 has been marked as a duplicate of this bug. ***
Matt Baker
Comment 4 2018-10-01 18:06:19 PDT
Comment on attachment 350543 [details] Patch r=me
WebKit Commit Bot
Comment 5 2018-10-01 18:31:44 PDT
Comment on attachment 350543 [details] Patch Clearing flags on attachment: 350543 Committed r236705: <https://trac.webkit.org/changeset/236705>
WebKit Commit Bot
Comment 6 2018-10-01 18:31:45 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.