Skip to content

Commit 7d4de3c

Browse files
committed
Simplify SQL HTML and CSS
Remove ineffective z-index. Using the Firefox developer tools reports: z-index has no effect on this element as it's not a positional element. Per MDN (https://developer.mozilla.org/en-US/docs/Web/CSS/word-break) using "word-break: break-word" is deprecated. Replace usage with "overflow-wrap: anywhere". This allows removing some CSS and one div element.
1 parent 4315af0 commit 7d4de3c

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

debug_toolbar/static/debug_toolbar/css/toolbar.css

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -413,10 +413,6 @@
413413
border-radius: 3px;
414414
}
415415

416-
#djDebug .djDebugSqlWrap {
417-
position: relative;
418-
}
419-
420416
#djDebug .djDebugCollapsed {
421417
color: #333;
422418
}
@@ -434,8 +430,7 @@
434430
}
435431

436432
#djDebug .djDebugSql {
437-
word-break: break-word;
438-
z-index: 100000002;
433+
overflow-wrap: anywhere;
439434
}
440435

441436
#djDebug .djSQLDetailsDiv tbody th {

debug_toolbar/templates/debug_toolbar/panels/sql.html

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,7 @@
3737
<button type="button" class="djToggleSwitch" data-toggle-name="sqlMain" data-toggle-id="{{ forloop.counter }}">+</button>
3838
</td>
3939
<td class="djdt-query">
40-
<div class="djDebugSqlWrap">
41-
<div class="djDebugSql">{{ query.sql|safe }}</div>
42-
</div>
40+
<div class="djDebugSql">{{ query.sql|safe }}</div>
4341
{% if query.similar_count %}
4442
<strong>
4543
<span class="djdt-color" style="background-color:{{ query.similar_color }}"></span>

0 commit comments

Comments
 (0)