Merge "Improve highlighter styling"

This commit is contained in:
jenkins-bot 2020-11-17 10:34:00 +00:00 committed by Gerrit Code Review
commit cbb34e1e62
2 changed files with 12 additions and 9 deletions

View file

@ -34,21 +34,20 @@
pointer-events: none;
}
.detected-comment:nth-child( 2n ) {
.detected-comment:nth-of-type( 2n ) {
background: lightpink;
}
.detected-comment:nth-child( 2n + 1 ) {
.detected-comment:nth-of-type( 2n + 1 ) {
background: skyblue;
}
.detected-comment-ruler {
position: absolute;
box-sizing: border-box;
border-left: 3px solid red;
border-bottom: 3px solid red;
box-shadow: -5px 10px 6px 0 white;
border-bottom-left-radius: 8px;
border-left: 2px solid #ccc;
border-bottom: 2px solid #ccc;
border-bottom-left-radius: 3px;
}
.detected-comment-warnings {
@ -69,7 +68,11 @@
.detected-comment-warnings:before {
content: '⚠';
color: white;
color: #000;
background: #fff;
font-size: 1rem;
pointer-events: all;
margin-left: -1em;
position: absolute;
z-index: 1;
}

View file

@ -114,10 +114,10 @@ function markComment( comment ) {
marker2.style.height = ( rect.top - ( parentRect.top + parentRect.height ) + 10 ) + 'px';
if ( rtl ) {
marker2.style.right = ( initialOffset - indentWidth / 2 + comment.parent.level * indentWidth ) + 'px';
marker2.style.width = ( ( comment.level - comment.parent.level ) * indentWidth - indentWidth / 2 ) + 'px';
marker2.style.width = ( ( comment.level - comment.parent.level ) * indentWidth - indentWidth / 2 ) - 2 + 'px';
} else {
marker2.style.left = ( initialOffset - indentWidth / 2 + comment.parent.level * indentWidth ) + 'px';
marker2.style.width = ( ( comment.level - comment.parent.level ) * indentWidth - indentWidth / 2 ) + 'px';
marker2.style.width = ( ( comment.level - comment.parent.level ) * indentWidth - indentWidth / 2 ) - 2 + 'px';
}
document.body.appendChild( marker2 );
}