Fix select copy in diff for Polymer 2
Move all diff content related styles into same place in gr-diff.html Bug: Issue 11318 Change-Id: I1ea1b7ee8682d137f7602b0c61e520fa9e56c339
This commit is contained in:
@@ -20,30 +20,6 @@ limitations under the License.
|
||||
|
||||
<dom-module id="gr-diff-selection">
|
||||
<template>
|
||||
<style include="shared-styles">
|
||||
.contentWrapper ::content .content,
|
||||
.contentWrapper ::content .contextControl,
|
||||
.contentWrapper ::content .blame {
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
:host-context(.selected-left:not(.selected-comment)) .contentWrapper ::content .side-by-side .left + .content .contentText,
|
||||
:host-context(.selected-right:not(.selected-comment)) .contentWrapper ::content .side-by-side .right + .content .contentText,
|
||||
:host-context(.selected-left:not(.selected-comment)) .contentWrapper ::content .unified .left.lineNum ~ .content:not(.both) .contentText,
|
||||
:host-context(.selected-right:not(.selected-comment)) .contentWrapper ::content .unified .right.lineNum ~ .content .contentText,
|
||||
:host-context(.selected-left.selected-comment) .contentWrapper ::content .side-by-side .left + .content .message,
|
||||
:host-context(.selected-right.selected-comment) .contentWrapper ::content .side-by-side .right + .content .message :not(.collapsedContent),
|
||||
:host-context(.selected-comment) .contentWrapper ::content .unified .message :not(.collapsedContent),
|
||||
:host-context(.selected-blame) .contentWrapper ::content .blame {
|
||||
-webkit-user-select: text;
|
||||
-moz-user-select: text;
|
||||
-ms-user-select: text;
|
||||
user-select: text;
|
||||
}
|
||||
</style>
|
||||
<div class="contentWrapper">
|
||||
<slot></slot>
|
||||
</div>
|
||||
|
||||
@@ -305,6 +305,30 @@ limitations under the License.
|
||||
.lineNum.PARTIALLY_COVERED {
|
||||
background: linear-gradient(to right bottom, #FFD1A4 0%, #FFD1A4 50%, #E0F2F1 50%, #E0F2F1 100%);
|
||||
}
|
||||
|
||||
/** Select to copy */
|
||||
.content,
|
||||
.contextControl,
|
||||
.blame {
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.selected-left:not(.selected-comment) .side-by-side .left + .content .contentText,
|
||||
.selected-right:not(.selected-comment) .side-by-side .right + .content .contentText,
|
||||
.selected-left:not(.selected-comment) .unified .left.lineNum ~ .content:not(.both) .contentText,
|
||||
.selected-right:not(.selected-comment) .unified .right.lineNum ~ .content .contentText,
|
||||
.selected-left.selected-comment .side-by-side .left + .content .message,
|
||||
.selected-right.selected-comment .side-by-side .right + .content .message :not(.collapsedContent),
|
||||
.selected-comment .unified .message :not(.collapsedContent),
|
||||
.selected-blame .blame {
|
||||
-webkit-user-select: text;
|
||||
-moz-user-select: text;
|
||||
-ms-user-select: text;
|
||||
user-select: text;
|
||||
}
|
||||
</style>
|
||||
<style include="gr-syntax-theme"></style>
|
||||
<div id="diffHeader" hidden$="[[_computeDiffHeaderHidden(_diffHeaderItems)]]">
|
||||
|
||||
Reference in New Issue
Block a user