ui: use absolute positionning when possible to optimize browse layout calculation (flexbox performs much worse)

This commit is contained in:
bordun 2020-04-20 12:01:45 +02:00
parent 2335328c4e
commit 11eb291182
3 changed files with 38 additions and 7 deletions

View file

@ -29,8 +29,13 @@ input {
}
html, body {
height:100%;
position:relative;
position: absolute;
top:0;
left:0;
right:0;
bottom:0;
overflow:hidden;
overscroll-behavior: none;
background-color: var(--color-background);

View file

@ -5,9 +5,13 @@ osc-workspace {
--color-fill: var(--color-widget);
--color-stroke: var(--color-widget);
position: static;
width: 100%;
height: 100%;
// optimize layout recalc
position: absolute;
top:0;
left:0;
right:0;
bottom:0;
display: flex;
flex-direction: row;
overflow: hidden;
@ -249,7 +253,7 @@ osc-panel-inner {
min-width: 0;
position: relative;
contain: strict;
}
// @keyframes test{
@ -321,9 +325,17 @@ osc-panel-content {
}
&.hidden {
display: none;
+ #osc-container {
// optimize layout recalc
position: absolute;
top:0;
left:0;
right:0;
bottom:0;
}
}
}
#osc-container {
background: var(--color-background)
background: var(--color-background);
}

View file

@ -193,8 +193,22 @@
width: 100%;
height: 100%;
// optimize layout recalc
position: absolute;
top:0;
left:0;
right:0;
bottom:0;
> inner {
margin: calc(var(--widget-spacing) / 2);
// optimize layout recalc
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
}