Fix the contrast of the `.formError` color
authorAlexander Ebert <ebert@woltlab.com>
Tue, 22 Aug 2023 09:23:33 +0000 (11:23 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 22 Aug 2023 09:23:33 +0000 (11:23 +0200)
See https://www.woltlab.com/community/thread/301284-fehler-in-labels-im-dark-mode-haben-keinen-guten-kontrast/

wcfsetup/install/files/style/layout/form.scss

index c6f38e08cf092fb8d41782cd853d4c0343073de7..6f41d61bd0a57a0e41e09c4e4aaa1c991c6ee0ff 100644 (file)
@@ -208,17 +208,23 @@ input {
 }
 
 .formError {
+       --color-error: #c00;
+
        dt {
-               color: rgba(204, 0, 1, 1) !important;
+               color: var(--color-error) !important;
        }
 
        input,
        select,
        textarea {
-               border-color: rgba(204, 0, 1, 1) !important;
+               border-color: var(--color-error) !important;
        }
 }
 
+html[data-color-scheme="dark"] .formError {
+       --color-error: #ff4747;
+}
+
 /* grid-based form controls */
 .formGrid {
        dt {