Merge pull request #215 from rtfpessoa/fix-linenumbers-on-scroll
Fix linenumbers on scroll
This commit is contained in:
commit
1bb5a0bbdd
3 changed files with 954 additions and 1097 deletions
18
package.json
18
package.json
|
|
@ -54,26 +54,26 @@
|
||||||
"fs": false
|
"fs": false
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"diff": "^3.5.0",
|
"diff": "^4.0.1",
|
||||||
"hogan.js": "^3.0.2",
|
"hogan.js": "^3.0.2",
|
||||||
"lodash.merge": "^4.6.1",
|
"lodash.merge": "^4.6.1",
|
||||||
"whatwg-fetch": "^3.0.0"
|
"whatwg-fetch": "^3.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"autoprefixer": "^9.3.1",
|
"autoprefixer": "^9.5.1",
|
||||||
"browserify": "^16.2.3",
|
"browserify": "^16.2.3",
|
||||||
"clean-css-cli": "^4.2.1",
|
"clean-css-cli": "^4.3.0",
|
||||||
"codacy-coverage": "^3.2.0",
|
"codacy-coverage": "^3.4.0",
|
||||||
"eslint": "^5.9.0",
|
"eslint": "^5.16.0",
|
||||||
"eslint-plugin-promise": "^4.0.1",
|
"eslint-plugin-promise": "^4.1.1",
|
||||||
"eslint-plugin-standard": "^4.0.0",
|
"eslint-plugin-standard": "^4.0.0",
|
||||||
"fast-html-parser": "^1.0.1",
|
"fast-html-parser": "^1.0.1",
|
||||||
"istanbul": "^0.4.5",
|
"istanbul": "^0.4.5",
|
||||||
"mkdirp": "^0.5.1",
|
"mkdirp": "^0.5.1",
|
||||||
"mocha": "^5.2.0",
|
"mocha": "5.2.0",
|
||||||
"nopt": "^4.0.1",
|
"nopt": "^4.0.1",
|
||||||
"postcss-cli": "^6.0.1",
|
"postcss-cli": "^6.1.2",
|
||||||
"uglify-js": "^3.4.9"
|
"uglify-js": "^3.5.9"
|
||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"files": [
|
"files": [
|
||||||
|
|
|
||||||
|
|
@ -74,11 +74,6 @@
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.d2h-diff-tbody > tr > td {
|
|
||||||
height: 20px;
|
|
||||||
line-height: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.d2h-files-diff {
|
.d2h-files-diff {
|
||||||
display: block;
|
display: block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
@ -86,7 +81,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.d2h-file-diff {
|
.d2h-file-diff {
|
||||||
overflow-x: scroll;
|
|
||||||
overflow-y: hidden;
|
overflow-y: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -102,13 +96,15 @@
|
||||||
.d2h-code-line {
|
.d2h-code-line {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
padding: 0 10px;
|
/* Compensate for the absolute positioning of the line numbers */
|
||||||
|
padding: 0 8em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.d2h-code-side-line {
|
.d2h-code-side-line {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
padding: 0 10px;
|
/* Compensate for the absolute positioning of the line numbers */
|
||||||
|
padding: 0 4.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.d2h-code-line del,
|
.d2h-code-line del,
|
||||||
|
|
@ -149,26 +145,27 @@
|
||||||
.line-num1 {
|
.line-num1 {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
float: left;
|
float: left;
|
||||||
width: 40px;
|
width: 3.5em;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
padding-left: 3px;
|
padding: 0 0.5em 0 0.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.line-num2 {
|
.line-num2 {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
float: right;
|
float: right;
|
||||||
width: 40px;
|
width: 3.5em;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
padding-left: 3px;
|
padding: 0 0.5em 0 0.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.d2h-code-linenumber {
|
.d2h-code-linenumber {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
width: 86px;
|
width: 7.5em;
|
||||||
padding-left: 2px;
|
/* Keep the numbers fixed on line contents scroll */
|
||||||
padding-right: 2px;
|
position: absolute;
|
||||||
|
display: inline-block;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
color: rgba(0, 0, 0, 0.3);
|
color: rgba(0, 0, 0, 0.3);
|
||||||
text-align: right;
|
text-align: right;
|
||||||
|
|
@ -177,11 +174,16 @@
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.d2h-code-linenumber:after {
|
||||||
|
content: '\200b';
|
||||||
|
}
|
||||||
|
|
||||||
.d2h-code-side-linenumber {
|
.d2h-code-side-linenumber {
|
||||||
|
/* Keep the numbers fixed on line contents scroll */
|
||||||
|
position: absolute;
|
||||||
|
display: inline-block;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
width: 56px;
|
width: 4em;
|
||||||
padding-left: 5px;
|
|
||||||
padding-right: 5px;
|
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
color: rgba(0, 0, 0, 0.3);
|
color: rgba(0, 0, 0, 0.3);
|
||||||
text-align: right;
|
text-align: right;
|
||||||
|
|
@ -192,6 +194,10 @@
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.d2h-code-side-linenumber:after {
|
||||||
|
content: '\200b';
|
||||||
|
}
|
||||||
|
|
||||||
.d2h-code-side-emptyplaceholder,
|
.d2h-code-side-emptyplaceholder,
|
||||||
.d2h-emptyplaceholder {
|
.d2h-emptyplaceholder {
|
||||||
background-color: #f1f1f1;
|
background-color: #f1f1f1;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue