Skip to content

Commit 9e78ff6

Browse files
committed
Replace hardcoded colors with CSS variables and format css files
1 parent faec934 commit 9e78ff6

File tree

6 files changed

+190
-139
lines changed

6 files changed

+190
-139
lines changed

openwisp_controller/config/static/config/css/admin.css

Lines changed: 34 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@ a.jsoneditor-exit:focus {
99
font-family:
1010
"Bitstream Vera Sans Mono", "Monaco", "Droid Sans Mono", "DejaVu Sans Mono",
1111
"Ubuntu Mono", "Courier New", Courier, monospace;
12-
color: #f9f9f9;
12+
color: var(--ow-color-fg-lightest);
1313
overflow: auto;
14-
background-color: #222;
14+
background-color: var(--ow-color-fg-darker);
1515
white-space: pre-wrap;
1616
word-wrap: break-word;
1717
padding: 20px;
1818
line-height: 25px;
1919
}
2020
.jsoneditor .vLargeTextField {
21-
color: #333;
22-
background-color: #fff;
21+
color: var(--ow-color-fg-darker);
22+
background-color: var(--ow-color-white);
2323
padding: 15px;
2424
}
2525
.vLargeTextField.jsoneditor-raw {
@@ -28,8 +28,8 @@ a.jsoneditor-exit:focus {
2828
box-sizing: border-box;
2929
}
3030
input.readonly {
31-
border: 1px solid rgba(0, 0, 0, 0.05) !important;
32-
background-color: rgba(0, 0, 0, 0.07);
31+
border: 1px solid var(--ow-overlay-5) !important;
32+
background-color: var(--ow-overlay-7);
3333
}
3434
.djnjc-overlay {
3535
display: none;
@@ -39,7 +39,7 @@ input.readonly {
3939
z-index: 10000;
4040
width: 100%;
4141
height: 100%;
42-
background: rgba(0, 0, 0, 0.91);
42+
background: var(--ow-overlay-90);
4343
}
4444
.djnjc-overlay .inner {
4545
width: 100%;
@@ -49,13 +49,13 @@ input.readonly {
4949
}
5050
.djnjc-overlay.loading {
5151
display: flex;
52-
background: rgba(255, 255, 255, 0.98);
52+
background: var(--ow-overlay-light-75);
5353
align-items: center;
5454
}
5555
.spinner {
5656
width: 40px;
5757
height: 40px;
58-
background-color: rgba(0, 0, 0, 0.8);
58+
background-color: var(--ow-overlay-90);
5959
margin: 0 auto;
6060
border-radius: 100%;
6161
-webkit-animation: sk-scaleout 1s infinite ease-in-out;
@@ -102,11 +102,11 @@ input.readonly {
102102
margin: 0;
103103
padding: 40px 60px 20px;
104104
background-color: transparent;
105-
color: #adffa6;
105+
color: var(--ow-color-success);
106106
line-height: 1.5em;
107107
}
108108
.djnjc-preformatted.error {
109-
color: #ff7277;
109+
color: var(--ow-btn-danger-bg);
110110
}
111111
.djnjc-overlay .close,
112112
.djnjc-overlay .close:focus,
@@ -116,26 +116,26 @@ input.readonly {
116116
top: 1.5%;
117117
font-weight: bold;
118118
font-size: 15px;
119-
background-color: #772299;
120-
color: #fff;
119+
background-color: var(--ow-color-primary);
120+
color: var(--ow-color-white);
121121
padding: 5px 8px;
122122
border-radius: 5px;
123123
text-decoration: none;
124124
}
125125
.djnjc-overlay .close:hover {
126-
background-color: #9e47c1;
126+
background-color: var(--ow-color-primary);
127127
}
128128
.errors.field-templates li,
129129
.errorlist.nonfield li {
130130
white-space: pre-line;
131131
word-break: break-all;
132132
}
133133
.form-row select {
134-
background-color: #fff;
134+
background-color: var(--ow-color-white);
135135
}
136136
.form-row input[disabled],
137137
.form-row select[disabled] {
138-
background-color: #f4f4f4;
138+
background-color: var(--ow-color-fg-light);
139139
}
140140

141141
/* hide vpn specific fields by default */
@@ -166,7 +166,7 @@ input.readonly {
166166
}
167167
#container .sortedm2m-container .help {
168168
margin-bottom: 20px;
169-
color: #333;
169+
color: var(--ow-color-fg-darker);
170170
font-weight: bold;
171171
}
172172
#main ul.sortedm2m li {
@@ -193,9 +193,13 @@ input.readonly {
193193
}
194194
#config-group .field-status .help div {
195195
white-space: pre;
196-
color: #777;
196+
color: var(--ow-color-fg-dark);
197197
}
198-
div.change-form #device_form div.inline-group.tab-content > fieldset.module > h2,
198+
div.change-form
199+
#device_form
200+
div.inline-group.tab-content
201+
> fieldset.module
202+
> h2,
199203
div.change-form
200204
#device_form
201205
div.inline-group.tab-content
@@ -247,8 +251,8 @@ ul.tabs a:hover,
247251
ul.tabs a:focus {
248252
display: inline-block;
249253
padding: 12px 14px;
250-
color: #333;
251-
background: rgba(0, 0, 0, 0.06);
254+
color: var(--ow-color-fg-darker);
255+
background: var(--ow-overlay-5);
252256
border-radius: 3px;
253257
border-bottom-right-radius: 0;
254258
border-bottom-left-radius: 0;
@@ -257,17 +261,17 @@ ul.tabs a:focus {
257261
}
258262
ul.tabs a:hover,
259263
ul.tabs a:focus {
260-
color: #000;
261-
background: rgba(0, 0, 0, 0.15);
264+
color: var(--ow-color-black);
265+
background: var(--ow-overlay-10);
262266
}
263267
ul.tabs a.current,
264268
ul.tabs a.current:hover,
265269
ul.tabs a.current:focus {
266270
background: var(--ow-color-fg-ghost);
267-
color: #000;
268-
border: 1px solid rgba(0, 0, 0, 0.1);
271+
color: var(--ow-color-black);
272+
border: 1px solid var(--ow-overlay-10);
269273
border-bottom: 0 none;
270-
border-color: rgba(0, 0, 0, 0.25);
274+
border-color: var(--ow-overlay-25);
271275
cursor: default;
272276
position: relative;
273277
z-index: 9;
@@ -315,11 +319,11 @@ defined variables such as `secret`
315319
margin-top: 0;
316320
}
317321
.submit-row .previewlink {
318-
background: #778898;
322+
background: var(--ow-color-fg-medium);
319323
}
320324
.submit-row .previewlink:hover,
321325
.submit-row .previewlink:focus {
322-
background: #576a7c;
326+
background: var(--ow-color-fg-dark);
323327
}
324328
#system-context {
325329
overflow: hidden;
@@ -365,7 +369,7 @@ button.show-sc {
365369
max-height: 10em;
366370
padding: 0.5em;
367371
overflow: auto;
368-
background-color: #ffe5e582;
372+
background-color: var(--ow-btn-danger-bg);
369373
}
370374

371375
@media (max-width: 767px) {
@@ -380,7 +384,7 @@ button.show-sc {
380384
width: 100%;
381385
padding-left: 0;
382386
padding-right: 0;
383-
border: 1px solid rgba(0, 0, 0, 0.1) !important;
387+
border: 1px solid var(--ow-overlay-10) !important;
384388
border-radius: 0;
385389
text-align: center;
386390
}

0 commit comments

Comments
 (0)