Add underlayer / overlayer for the selection and cursor

The renderedLines div can now only contain actual lines, nothing else. Thes divs are designed to match the lines div in dimensions and make it easy to put things in front of or behind the text.
This commit is contained in:
Corey Johnson & Nathan Sobo
2012-11-09 10:43:58 -07:00
parent e6f5a60b44
commit d739736997
2 changed files with 31 additions and 5 deletions

View File

@@ -73,6 +73,17 @@
overflow-x: hidden;
}
.editor .underlayer, .editor .overlayer {
pointer-events: none;
position: absolute;
width: 100%;
height: 100%;
}
.editor .underlayer {
z-index: 0;
}
.editor .lines {
position: relative;
display: table;
@@ -80,8 +91,14 @@
width: 100%;
/*overflow: hidden; i'm worried this is causing rendering problems */
padding-right: 2em;
z-index: 1;
}
.editor .overlayer {
z-index: 2;
}
.editor .line span {
vertical-align: top;
}