Skip to content

Commit db43b2b

Browse files
committed
change hardcoded css colors to utilize css vars
the chosen variables are the ones that django uses for each of those elements, and ideally can also be omitted entirely in a future commit
1 parent 95819fc commit db43b2b

File tree

1 file changed

+19
-18
lines changed

1 file changed

+19
-18
lines changed

nested_inline/static/admin/css/forms-nested.css

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
overflow: hidden;
77
padding: 8px 12px;
88
font-size: 11px;
9-
border-bottom: 1px solid #eee;
9+
border-bottom: 1px solid var(--hairline-color);
1010
}
1111

1212
.form-row img, .form-row input {
@@ -28,13 +28,13 @@ form h4 {
2828

2929
label {
3030
font-weight: normal !important;
31-
color: #666;
31+
color: var(--body-fg);
3232
font-size: 12px;
3333
}
3434

3535
.required label, label.required {
3636
font-weight: bold !important;
37-
color: #333 !important;
37+
color: var(--body-fg);
3838
}
3939

4040
/* RADIO BUTTONS */
@@ -140,7 +140,8 @@ fieldset.collapsed h2, fieldset.collapsed {
140140
}
141141

142142
fieldset.collapsed h2 {
143-
color: #999;
143+
background: var(--darkened-bg);
144+
color: var(--body-quiet-color);
144145
}
145146

146147
fieldset.collapsed .collapse-toggle {
@@ -159,8 +160,8 @@ fieldset.monospace textarea {
159160
.submit-row {
160161
padding: 5px 7px;
161162
text-align: right;
162-
background-color: white;
163-
border: 1px solid #ccc;
163+
background: var(--darkened-bg);
164+
border: 1px solid var(--hairline-color);
164165
margin: 5px 0;
165166
overflow: hidden;
166167
}
@@ -232,7 +233,7 @@ body.popup .submit-row {
232233

233234
.inline-group {
234235
padding: 0;
235-
border: 1px solid #ccc;
236+
border: 1px solid var(--darkened-bg);
236237
margin: 10px 0;
237238
}
238239

@@ -249,8 +250,8 @@ body.popup .submit-row {
249250
color: #666;
250251
padding: 3px 5px;
251252
font-size: 11px;
252-
background-color: #e1e1e1;
253-
border-bottom: 1px solid #ddd;
253+
background: var(--darkened-bg);
254+
border-bottom: 1px solid var(--hairline-color);
254255
}
255256

256257
.inline-related h3 span.delete {
@@ -264,7 +265,7 @@ body.popup .submit-row {
264265

265266
.inline-related fieldset {
266267
margin: 0;
267-
background: #fff;
268+
background: var(--body-bg);
268269
border: none;
269270
}
270271

@@ -274,13 +275,13 @@ body.popup .submit-row {
274275
font-size: 11px;
275276
text-align: left;
276277
font-weight: bold;
277-
background: #bcd;
278-
color: #fff;
278+
background: var(--darkened-bg);
279+
color: var(--hairline-color);
279280
}
280281

281282
.inline-group .tabular > fieldset.module {
282283
border: none;
283-
border-bottom: 1px solid #ddd;
284+
border-bottom: 1px solid var(--hairline-color);
284285
}
285286

286287
.inline-related.tabular fieldset.module table {
@@ -314,7 +315,7 @@ body.popup .submit-row {
314315
overflow: hidden;
315316
font-size: 9px;
316317
font-weight: bold;
317-
color: #666;
318+
color: var(--body-quiet-color);
318319
_width: 700px;
319320
}
320321

@@ -331,10 +332,10 @@ body.popup .submit-row {
331332

332333
.inline-group div.add-row,
333334
.inline-group .tabular tr.add-row td {
334-
color: #666;
335+
color: var(--body-quiet-color);
335336
padding: 3px 5px;
336-
border-bottom: 1px solid #ddd;
337-
background-color: #e1e1e1;
337+
border-bottom: 1px solid var(--hairline-color);
338+
background-color: var(--darkened-bg);
338339
}
339340

340341
.inline-group .tabular tr.add-row td {
@@ -360,7 +361,7 @@ td > .nested-inline {
360361
}
361362

362363
.nested-inline-bottom-border {
363-
border-bottom: 1px solid #DDDDDD;
364+
border-bottom: 1px solid var(--hairline-color);
364365
}
365366

366367
.no-bottom-border.row1 > td {

0 commit comments

Comments
 (0)