8000 bug #22971 [Profiler] Fix code excerpt wrapping (ogizanagi) · symfony/symfony@6b9ff81 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6b9ff81

Browse files
committed
bug #22971 [Profiler] Fix code excerpt wrapping (ogizanagi)
This PR was merged into the 3.3 branch. Discussion ---------- [Profiler] Fix code excerpt wrapping | Q | A | ------------- | --- | Branch? | 3.3 <!-- see comment below --> | Bug fix? | yesish | New feature? | no <!-- don't forget updating src/**/CHANGELOG.md files --> | BC breaks? | no | Deprecations? | no <!-- don't forget updating UPGRADE-*.md files --> | Tests pass? | yes | Fixed tickets | N/A <!-- #-prefixed issue number(s), if any --> | License | MIT | Doc PR | N/A |Before|After| |--|--| |<img width="1346" alt="screenshot 2017-05-30 a 19 09 03" src="https://cloud.githubusercontent.com/assets/2211145/26595449/b8c4302c-456b-11e7-83c4-3471f915437b.PNG">|<img width="1075" alt="screenshot 2017-05-30 a 19 09 35" src="https://cloud.githubusercontent.com/assets/2211145/26595450/b8c61e64-456b-11e7-8b33-bdbe2e90b160.PNG">| However, I think my own preference for code excerpts would be to never wrap, at the risk of scrolling horizontally. 1024px is enough to read most of the code excerpt without scrolling, and it feels less messy (to me) when a line is too long. WDYT? Commits ------- 6c87863 [Profiler] Never wrap in code excerpts
2 parents 7183be3 + 6c87863 commit 6b9ff81

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/Symfony/Bundle/TwigBundle/Resources/views/exception.css.twig

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ header .container { display: flex; justify-content: space-between; }
9595
.trace-head .icon svg { height: 24px; width: 24px; }
9696

9797
.trace-message { font-size: 14px; font-weight: normal; margin: .5em 0 0; }
98-
98+
.trace-details { table-layout: fixed; }
9999
.trace-line { position: relative; padding-left: 36px; }
100100
.trace-line.sf-toggle:hover { background: #F5F5F5; }
101101
.trace-line a { color: #222; }
@@ -108,12 +108,12 @@ header .container { display: flex; justify-content: space-between; }
108108
.trace-method { color: #B0413E; color: #222; font-weight: bold; color: #B0413E; }
109109
.trace-arguments { color: #222; color: #999; font-weight: normal; color: #795da3; color: #777; padding-left: 2px; }
110110

111-
.trace-code { background: #FFF; font-size: 12px; margin: 10px 0 2px; padding: 10px; }
112-
.trace-code ol { margin: 0; }
113-
.trace-code li { color: #969896; margin: 0; padding-left: 10px; }
114-
.trace-code li + li { margin-top: 10px; }
115-
.trace-code li.selected { background: #F8EEC7; padding: 3px 0 3px 10px; }
116-
.trace-code li code { color: #222; }
111+
.trace-code { background: #FFF; font-size: 12px; margin: 10px 0 2px; padding: 10px; overflow-x: auto; }
112+
.trace-code ol { margin: 0; float: left; }
113+
.trace-code li { color: #969896; margin: 0; padding-left: 10px; float: left; width: 100%; }
114+
.trace-code li + li { margin-top: 5px; }
115+
.trace-code li.selected { background: #F8EEC7; padding: 3px 0 3px 10px; margin-top: 2px; }
116+
.trace-code li code { color: #222; white-space: nowrap; }
117117

118118
.trace-as-text .stacktrace { line-height: 1.8; margin: 0 0 15px; white-space: pre-wrap; }
119119

0 commit comments

Comments
 (0)
0