|
38 | 38 | }
|
39 | 39 |
|
40 | 40 | @scope (:root) to (#canvas-container) {
|
| 41 | + body { |
| 42 | + /* handle system preferences and utopia theme */ |
| 43 | + --theme-bg-color: white; |
| 44 | + --theme-fg-color: black; |
| 45 | + --theme-light-png-visibility: block; |
| 46 | + --theme-dark-png-visibility: none; |
| 47 | + } |
| 48 | + |
| 49 | + @media (prefers-color-scheme: dark) { |
| 50 | + body:not(.utopia-theme-light) { |
| 51 | + --theme-bg-color: #1a1a1a; |
| 52 | + --theme-fg-color: white; |
| 53 | + --theme-light-png-visibility: none; |
| 54 | + --theme-dark-png-visibility: block; |
| 55 | + } |
| 56 | + } |
| 57 | + |
| 58 | + /* utopia preferences should override system preferences */ |
| 59 | + body.utopia-theme-dark { |
| 60 | + --theme-bg-color: #1a1a1a; |
| 61 | + --theme-fg-color: white; |
| 62 | + --theme-light-png-visibility: none; |
| 63 | + --theme-dark-png-visibility: block; |
| 64 | + } |
| 65 | + |
41 | 66 | body {
|
42 | 67 | margin: 0;
|
43 | 68 | font-size: 11px !important;
|
|
46 | 71 | outline: none;
|
47 | 72 | overscroll-behavior-x: contain;
|
48 | 73 | --loadscreen-accent: rgba(46, 255, 109, 0.5);
|
| 74 | + background-color: var(--theme-bg-color); |
| 75 | + transition: background-color 0.1s ease-in-out; |
49 | 76 | }
|
50 | 77 |
|
51 | 78 | @keyframes animation-keyframes {
|
|
85 | 112 | flex-direction: column;
|
86 | 113 | align-items: center;
|
87 | 114 | justify-content: center;
|
88 |
| - background-color: white; |
| 115 | + background-color: var(--theme-bg-color); |
| 116 | + transition: background-color 0.1s ease-in-out; |
89 | 117 | z-index: 1000;
|
90 | 118 | }
|
91 | 119 |
|
|
105 | 133 | }
|
106 | 134 |
|
107 | 135 | .progress-bar-shell {
|
108 |
| - border: 1px solid black; |
| 136 | + border: 1px solid var(--theme-fg-color); |
| 137 | + transition: border-color 0.1s ease-in-out; |
109 | 138 | margin-top: 64px;
|
110 | 139 | width: 212px;
|
111 | 140 | height: 11px;
|
|
115 | 144 | }
|
116 | 145 |
|
117 | 146 | .progress-bar-progress {
|
118 |
| - background-color: black; |
| 147 | + background-color: var(--theme-fg-color); |
| 148 | + transition: background-color 0.1s ease-in-out; |
119 | 149 | border-radius: 6px;
|
120 | 150 | height: 9px;
|
121 | 151 | }
|
122 | 152 |
|
123 | 153 | .loading-screen-import-operations {
|
124 |
| - color: black; |
125 | 154 | height: 150px;
|
126 | 155 | overflow: hidden;
|
127 | 156 | width: auto;
|
|
136 | 165 | font-family: utopian-inter, 'sans-serif';
|
137 | 166 | }
|
138 | 167 |
|
| 168 | + .loading-screen-import-operations, |
| 169 | + .loading-screen-import-operations li { |
| 170 | + color: var(--theme-fg-color); |
| 171 | + transition: color 0.1s ease-in-out; |
| 172 | + } |
| 173 | + |
139 | 174 | .utopia-logo-pyramid.light {
|
140 |
| - display: block; |
| 175 | + display: var(--theme-light-png-visibility); |
141 | 176 | }
|
142 | 177 | .utopia-logo-pyramid.dark {
|
143 |
| - display: none; |
| 178 | + display: var(--theme-dark-png-visibility); |
144 | 179 | }
|
145 | 180 |
|
146 | 181 | .loading-screen-wrapper {
|
|
149 | 184 | align-items: center;
|
150 | 185 | justify-content: center;
|
151 | 186 | }
|
152 |
| - |
153 |
| - @media (prefers-color-scheme: dark) { |
154 |
| - body { |
155 |
| - background-color: #1a1a1a; |
156 |
| - } |
157 |
| - |
158 |
| - .editor-loading-screen { |
159 |
| - background-color: #1a1a1a; |
160 |
| - } |
161 |
| - |
162 |
| - .loading-screen-import-operations, |
163 |
| - .loading-screen-import-operations li { |
164 |
| - color: white; |
165 |
| - } |
166 |
| - |
167 |
| - .progress-bar-shell { |
168 |
| - border: 1px solid white; |
169 |
| - } |
170 |
| - |
171 |
| - .progress-bar-progress { |
172 |
| - background-color: white; |
173 |
| - } |
174 |
| - |
175 |
| - .utopia-logo-pyramid.light { |
176 |
| - display: none; |
177 |
| - } |
178 |
| - .utopia-logo-pyramid.dark { |
179 |
| - display: block; |
180 |
| - } |
181 |
| - } |
182 | 187 | }
|
183 | 188 | </style>
|
184 | 189 | </head>
|
|
0 commit comments