Skip to content

Commit cc3c89a

Browse files
juspencecraiga
andauthored
Remove a bit of inline CSS. Add CSP nonce where it might be required and is available. (#8783)
Co-authored-by: Craig Anderson <craiga@craiga.id.au>
1 parent a02bb79 commit cc3c89a

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

rest_framework/static/rest_framework/css/bootstrap-tweaks.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,3 +231,7 @@ body a:hover {
231231
margin-left: 5px;
232232
margin-right: 5px;
233233
}
234+
235+
.pagination {
236+
margin: 5px 0 10px 0;
237+
}

rest_framework/templates/rest_framework/base.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,19 +158,19 @@ <h4 class="text-center">Are you sure you want to delete this {{ name }}?</h4>
158158
<div class="page-header">
159159
<h1>{{ name }}</h1>
160160
</div>
161-
<div style="float:left">
161+
<div class="pull-left">
162162
{% block description %}
163163
{{ description }}
164164
{% endblock %}
165165
</div>
166166

167167
{% if paginator %}
168-
<nav style="float: right">
168+
<nav class="pull-right">
169169
{% get_pagination_html paginator %}
170170
</nav>
171171
{% endif %}
172172

173-
<div class="request-info" style="clear: both" aria-label="{% trans "request info" %}">
173+
<div class="request-info" aria-label="{% trans "request info" %}">
174174
<pre class="prettyprint"><b>{{ request.method }}</b> {{ request.get_full_path }}</pre>
175175
</div>
176176

rest_framework/templates/rest_framework/pagination/numbers.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<ul class="pagination" style="margin: 5px 0 10px 0">
1+
<ul class="pagination">
22
{% if previous_url %}
33
<li>
44
<a href="{{ previous_url }}" aria-label="Previous">

0 commit comments

Comments
 (0)