8000 Update profiler's layout to use flexbox · symfony/symfony@d986ac0 · GitHub
[go: up one dir, main page]

Skip to content

Commit d986ac0

Browse files
javiereguiluzfabpot
authored andcommitted
Update profiler's layout to use flexbox
1 parent 2980fb8 commit d986ac0

File tree

1 file changed

+34
-20
lines changed

1 file changed

+34
-20
lines changed

src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/profiler.css.twig

Lines changed: 34 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,15 @@ html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:1
1717

1818
{# Basic styles
1919
========================================================================= #}
20+
html, body {
21+
height: 100%;
22+
width: 100%;
23+
}
2024
body {
2125
background-color: #F9F9F9;
2226
color: #222;
27+
display: flex;
28+
flex-direction: column;
2329
{{ mixins.sans_serif_font|raw }}
2430
font-size: 14px;
2531
line-height: 1.4;
@@ -401,16 +407,34 @@ tr.status-warning td {
401407
max-width: 1300px;
402408
padding-right: 15px;
403409
}
410+
#header {
411+
flex: 0 0 auto;
412+
}
413+
#header .container {
414+
display: flex;
415+
flex-direction: row;
416+
justify-content: space-between;
417+
}
418+
#summary {
419+
flex: 0 0 auto;
420+
}
404421
#content {
405-
min-height: 1024px;
406-
overflow: hidden;
422+
height: 100%;
423+
}
424+
#main {
425+
display: flex;
426+
flex-direction: row-reverse;
427+
min-height: 100%;
428+
}
429+
#sidebar {
430+
flex: 0 0 220px;
407431
}
408432
#collector-wrapper {
409-
float: left;
410-
width: 100%;
433+
flex: 0 1 100%;
434+
min-width: 0;
411435
}
412436
#collector-content {
413-
margin: 0 0 30px 220px;
437+
margin: 0 0 30px 0;
414438
padding: 14px 0 14px 20px;
415439
}
416440

@@ -428,7 +452,6 @@ tr.status-warning td {
428452
color: #FFF;
429453
font-weight: normal;
430454
font-size: 21px;
431-
float: left;
432455
margin: 0;
433456
padding: 10px 10px 8px;
434457
}
@@ -445,7 +468,6 @@ tr.status-warning td {
445468
fill: #FFF;
446469
}
447470
#header .search {
448-
float: right;
449471
padding-top: 11px;
450472
}
451473
#header .search input {
@@ -511,10 +533,7 @@ tr.status-warning td {
511533
#sidebar {
512534
background: #444;
513535
color: #CCC;
514-
float: left;
515-
margin-bottom: -99999px; {# needed for 'same-height columns' trick #}
516-
margin-left: -100%;
517-
padding-bottom: 99999px; {# needed for 'same-height columns' trick #}
536+
padding-bottom: 30px;
518537
position: relative;
519538
width: 220px;
520539
z-index: 9999;
@@ -597,7 +616,6 @@ tr.status-warning td {
597616
#menu-profiler li {
598617
position: relative;
599618
margin-bottom: 0;
600-
width: 220px;
601619
}
602620
#menu-profiler li a {
603621
border: solid transparent;
@@ -922,17 +940,13 @@ table.logs .sf-call-stack abbr {
922940
}
923941

924942
@media (max-width: 768px) {
925-
#collector-content {
926-
margin-left: 50px;
927-
}
928-
929943
#sidebar {
930-
width: 50px;
931-
overflow-y: hidden;
932-
transition: width 200ms ease-out;
944+
flex-basis: 50px;
945+
overflow-x: hidden;
946+
transition: flex-basis 200ms ease-out;
933947
}
934948
#sidebar:hover, #sidebar.expanded {
935-
width: 220px;
949+
flex-basis: 220px;
936950
}
937951

938952
#sidebar-search {

0 commit comments

Comments
 (0)
10E
0