Skip to content

Commit c88a13d

Browse files
committed
Use system font stack in the toolbar
We follow the Django admin's lead, see https://code.djangoproject.com/ticket/33878
1 parent 5923f38 commit c88a13d

File tree

2 files changed

+26
-17
lines changed

2 files changed

+26
-17
lines changed

debug_toolbar/static/debug_toolbar/css/toolbar.css

+24-17
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,9 @@
7676
color: #000;
7777
vertical-align: baseline;
7878
background-color: transparent;
79-
font-family: sans-serif;
79+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui,
80+
Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji",
81+
"Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
8082
text-align: left;
8183
text-shadow: none;
8284
white-space: normal;
@@ -237,13 +239,30 @@
237239
font-size: 16px;
238240
}
239241

242+
#djDebug pre,
240243
#djDebug code {
241244
display: block;
242-
font-family: Consolas, Monaco, "Bitstream Vera Sans Mono", "Lucida Console",
243-
monospace;
245+
font-family: ui-monospace, Menlo, Monaco, "Cascadia Mono", "Segoe UI Mono",
246+
"Roboto Mono", "Oxygen Mono", "Ubuntu Monospace", "Source Code Pro",
247+
"Fira Mono", "Droid Sans Mono", "Courier New", monospace,
248+
"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
249+
"Noto Color Emoji";
250+
overflow: auto;
251+
}
252+
253+
#djDebug code {
244254
font-size: 12px;
245255
white-space: pre;
246-
overflow: auto;
256+
}
257+
258+
#djDebug pre {
259+
white-space: pre-wrap;
260+
color: #555;
261+
border: 1px solid #ccc;
262+
border-collapse: collapse;
263+
background-color: #fff;
264+
padding: 2px 3px;
265+
margin-bottom: 3px;
247266
}
248267

249268
#djDebug .djdt-panelContent {
@@ -562,19 +581,7 @@
562581
#djDebug .djSQLDetailsDiv {
563582
margin-top: 0.8em;
564583
}
565-
#djDebug pre {
566-
white-space: pre-wrap;
567-
color: #555;
568-
border: 1px solid #ccc;
569-
border-collapse: collapse;
570-
background-color: #fff;
571-
display: block;
572-
overflow: auto;
573-
padding: 2px 3px;
574-
margin-bottom: 3px;
575-
font-family: Consolas, Monaco, "Bitstream Vera Sans Mono", "Lucida Console",
576-
monospace;
577-
}
584+
578585
#djDebug .djdt-stack span {
579586
color: #000;
580587
font-weight: bold;

docs/changes.rst

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ Change log
44
Pending
55
-------
66

7+
* The toolbar's font stack now prefers system UI fonts.
8+
79
3.6.0 (2022-08-17)
810
------------------
911

0 commit comments

Comments
 (0)