mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Optimization: Use absolute positioning instead of flexbox in editor
Flexbox was causing layouts and repaints to cover the entire scroll view instead of just the edited line. This cuts down on DOM manipulation cost significantly.
This commit is contained in:
@@ -12,16 +12,8 @@
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.editor .flexbox {
|
||||
display: -webkit-box;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.editor .gutter {
|
||||
position: absolute;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
padding-left: 0.4em;
|
||||
@@ -52,6 +44,11 @@
|
||||
}
|
||||
|
||||
.editor .scroll-view {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
overflow-x: auto;
|
||||
overflow-y: hidden;
|
||||
-webkit-box-flex: 1;
|
||||
|
||||
Reference in New Issue
Block a user