Skip to content

Commit db7968e

Browse files
author
joseph lenton
committed
JosephLenton#18 improved line number CSS
The line numbers are now in better alignment with the lines, and with the file header above the code area.
1 parent 7978929 commit db7968e

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

example/very_wide_stack.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
require( dirname(__FILE__) . '/../src/php_error.php' );
3-
\php_error\reportErrors();
3+
\php_error\reportErrors( array('display_line_numbers' => true) );
44

55
function a() {
66
b();

src/php_error.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3281,7 +3281,7 @@ function displayHTML( Closure $head, $body=null, $javascript=null ) {
32813281
width: 100%;
32823282
-moz-box-sizing: border-box;
32833283
box-sizing: border-box;
3284-
padding-left: 148px;
3284+
padding-left: 166px;
32853285

32863286
overflow: hidden;
32873287
}
@@ -3341,7 +3341,18 @@ function displayHTML( Closure $head, $body=null, $javascript=null ) {
33413341
display: inline-block;
33423342
float: left;
33433343
clear: both;
3344+
3345+
position: relative;
33443346
}
3347+
.error-file-line-number {
3348+
position: absolute;
3349+
top: 0;
3350+
right: 100%;
3351+
margin-right: 12px;
3352+
display: block;
3353+
text-indent: 0;
3354+
text-align: left;
3355+
}
33453356
<?php
33463357
/*
33473358
* Stack Trace

0 commit comments

Comments
 (0)