📦 EqualifyEverything / equalify

📄 dark.scss · 165 lines
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165@use "./variables.module.scss";

body.dark {
  background: variables.$black;
  color: variables.$paper;

  // Links
  a,
  a:visited {
    color: variables.$yellow;
  }

  // Form controls
  input,
  textarea {
    background-color: variables.$dark-surface;
    color: variables.$paper;
    border-color: variables.$dark-border;
  }

  select {
    background-color: variables.$dark-surface;
    color: variables.$paper;
    border-color: variables.$dark-border;

    // overrides the :has() rule in selects.scss that forces $black
    &:has(option:not([hidden]):checked) {
      color: variables.$paper;
    }

    &::picker(select) {
      background-color: variables.$dark-surface;
      border-color: variables.$dark-border;
    }

    // replace the hardcoded currentColor-dependent arrow with an explicit
    // paper-colored one — same reasoning as the checkmark below: relying on
    // currentColor inside this embedded SVG doesn't reliably pick up
    // dark mode's $paper text color, so the base icon is overridden directly.
    &::picker-icon {
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23eff0eb' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' aria-hidden='true'%3E%3Cpath d='m6 9 6 6 6-6'%3E%3C/path%3E%3C/svg%3E");
    }

    & option {
      background-color: variables.$dark-surface;
      color: variables.$paper;

      // replace hardcoded black checkmark SVG with a paper-colored one
      &::after {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23eff0eb' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'%3E%3C/path%3E%3C/svg%3E");
      }

      &:hover,
      &:focus-visible {
        background-color: variables.$dark-border;
        color: variables.$paper;
      }
    }
  }

  // Tables
  .table-container {
    border-color: variables.$dark-border;

    .table-scroll-wrapper {
      // $gray keeps ≥3:1 contrast against the dark-mode track (black/dark-surface);
      // the light-mode #6b6b6b thumb would nearly disappear against them.
      scrollbar-color: variables.$gray transparent;

      &::-webkit-scrollbar-thumb {
        background-color: variables.$gray;
      }
      &::-webkit-scrollbar-thumb:hover {
        background-color: variables.$paper;
      }
      // $red only clears ~3.2:1 against near-black backgrounds — matches
      // the yellow-over-red swap already used elsewhere in dark mode.
      &:focus-visible {
        outline-color: variables.$yellow;
      }
    }

    table {
      thead {
        background-color: variables.$dark-border;

        tr th {
          color: variables.$paper;
          border-bottom-color: rgba(variables.$paper, 0.15);
        }
      }

      tbody {
        background-color: variables.$dark-surface;

        tr {
          td {
            color: variables.$paper;
            border-bottom-color: variables.$dark-border;
          }

          &:nth-child(even) td {
            background-color: variables.$black;
          }
        }
      }
    }

    .pagination {
      background: variables.$black;
      border-top: 1px solid variables.$dark-border;
      color: variables.$paper;

      select {
        background-color: variables.$dark-surface;
        color: variables.$paper;
        border-color: variables.$dark-border;
      }
    }

    .filter-group {
      .content-toggle-group .root {
        background-color: variables.$dark-surface;

        button {
          color: variables.$paper;

          &[aria-checked="true"] {
            background: variables.$paper;
            color: variables.$black;
          }
        }
      }

      .status-toggle-group button {
        color: variables.$paper;
      }
    }
  }

  // Tags
  .tags .tag {
    background-color: variables.$dark-border;
    color: variables.$paper;
  }

  // Tooltips
  .tooltip {
    background: variables.$dark-surface;
    border-color: variables.$dark-border;
    color: variables.$paper;
  }

  .tooltip-arrow {
    fill: variables.$dark-surface;
  }

  // Drawer
  .drawer-content {
    background: variables.$dark-surface;
    color: variables.$paper;
    border-color: variables.$dark-border;
  }
}