Skip to content

Commit f9a2bb9

Browse files
committed
[chores] CSS fixes for Django 5.2
1 parent dce7bc2 commit f9a2bb9

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

flat_json_widget/static/flat-json-widget/css/flat-json-widget.css

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@
1717
margin: 0 !important;
1818
padding: 0 !important;
1919
}
20+
.flat-json .related-widget-wrapper-link img {
21+
position: relative;
22+
top: -2px;
23+
}
24+
.flat-json-remove-row {
25+
margin-left: 3px;
26+
}
2027

2128
@media screen and (max-width: 767px) {
2229
.flat-json-add-row {
@@ -35,7 +42,4 @@
3542
.flat-json-rows .field-data {
3643
line-height: 33px;
3744
}
38-
.flat-json-remove-row {
39-
margin-left: 5px;
40-
}
4145
}

flat_json_widget/templates/flat_json_widget/flat_json_widget.html

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
type="text"
99
placeholder="{% trans 'value' %}"
1010
class="flat-json-value">
11-
<a href="#" class="flat-json-remove-row" title="{% trans 'remove row' %}">
11+
<a href="#"
12+
class="flat-json-remove-row related-widget-wrapper-link"
13+
title="{% trans 'remove row' %}">
1214
<img src="{% static 'admin/img/icon-deletelink.svg' %}">
1315
</a>
1416
</div>
@@ -48,12 +50,16 @@ <h2><%= label %></h2>
4850
</div>
4951

5052
<div class="form-row">
51-
<a href="#" class="flat-json-add-row" title="{% trans 'Add another row' %}">
53+
<a href="#"
54+
class="flat-json-add-row related-widget-wrapper-link"
55+
title="{% trans 'Add another row' %}">
5256
<img src="{% static 'admin/img/icon-addlink.svg' %}" alt="">
5357
{% trans "Add row" %}
5458
</a>
5559

56-
<a href="#" class="flat-json-toggle-textarea" title="{% trans 'toggle textarea' %}" style="float:right">
60+
<a href="#"
61+
class="flat-json-toggle-textarea related-widget-wrapper-link"
62+
title="{% trans 'toggle textarea' %}" style="float:right">
5763
<img src="{% static 'admin/img/icon-changelink.svg' %}" alt="">
5864
{% trans 'Toggle Raw JSON Editing' %}
5965
</a>

0 commit comments

Comments
 (0)