mirror of
https://github.com/atom/atom.git
synced 2026-01-23 13:58:08 -05:00
Giving the hidden text area a fixed position was confusing webkit and making scroll behavior really odd. Using position: absolute and setting the z-index so it's behind the editor seems to make scrolling behave more normally.
47 lines
719 B
CSS
47 lines
719 B
CSS
.editor {
|
|
font: 18px Inconsolata, Monaco, Courier !important;
|
|
position: relative;
|
|
width: 100%;
|
|
height: 100%;
|
|
background: #333;
|
|
color: white;
|
|
overflow-y: scroll;
|
|
overflow-x: auto;
|
|
}
|
|
|
|
.editor pre {
|
|
margin: 0;
|
|
z-index: 1;
|
|
}
|
|
|
|
@-webkit-keyframes blink {
|
|
0% { opacity: .7; }
|
|
49% { opacity: .7; }
|
|
51% { opacity: 0; }
|
|
100% { opacity: 0; }
|
|
}
|
|
|
|
.editor .cursor {
|
|
border-left: 3px solid #9dff9d;
|
|
opacity: 0.7;
|
|
}
|
|
|
|
.editor .cursor.idle {
|
|
-webkit-animation: blink 0.6s;
|
|
-webkit-animation-iteration-count: infinite;
|
|
}
|
|
|
|
.editor .hidden-input {
|
|
position: absolute;
|
|
z-index: -1;
|
|
top: 0;
|
|
left: 0;
|
|
opacity: 0;
|
|
}
|
|
|
|
.editor .selection {
|
|
position: absolute;
|
|
background: white;
|
|
opacity: .1;
|
|
}
|