1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-13 02:12:41 +01:00
phorge-phorge/webroot/rsrc/css/application/diffusion/diffusion-source.css
epriestley 5f0d8e09d8 Use "user-select: none" to provide a visual cue about copy/paste JS magic
Summary:
  - For line numbers, use "user-select: none" to make them unselectable. This provides a stronger visual cue that copy/paste is enchanted.
  - In Paste, make it look sensible again after the blame-on-blame refactor in Diffusion. See also TODO to share this code formally.
  - In Diffusion, use the "phabricator-oncopy" behavior.

NOTE: I left blame/commit columns selectable in Diffusion, since you might reasonably want to copy/paste them?

NOTE: In Differential, the left side of the diff still highlights, even though it will be copied only if you select part of a line on the left and nothing else. But this seemed like a reasonable behavior, so I left it.

Test Plan:
  - Looked at Paste. Saw a nice line number column. Selected text, got the expected selection. Copied text, got the expected copy.
  - Looked at Diffusion. Saw a nice line number column, still. Selected text, got expected selection. Copied text, got expected copy.
  - Looked at Differential. Highlighted stuff, got expected results. Copied stuff, got expected results.

Reviewers: btrahan, vrana, jungejason

Reviewed By: vrana

CC: aran

Maniphest Tasks: T1123

Differential Revision: https://secure.phabricator.com/D2242
2012-04-16 15:55:16 -07:00

68 lines
1.3 KiB
CSS

/**
* @provides diffusion-source-css
*/
.diffusion-source {
margin: 1em 0 2em;
width: 100%;
font-family: "Monaco", Consolas, monospace;
font-size: 10px;
}
.diffusion-source th {
text-align: right;
vertical-align: top;
background: #eeeeee;
color: #888888;
border-style: solid;
border-width: 0px 1px;
border-color: #eeeeee #999999 #eeeeee #dddddd;
font-family: "Verdana";
font-size: 11px;
}
.diffusion-source td {
letter-spacing: 0.0083334px;
vertical-align: top;
white-space: pre-wrap;
padding-bottom: 1px;
padding-left: 8px;
line-height: 16px;
width: 100%;
}
.diffusion-browse-type-form {
float: right;
}
.diffusion-blame-link,
.diffusion-rev-link,
.diffusion-author-link {
white-space: nowrap;
}
.diffusion-blame-link a,
.diffusion-rev-link a,
.diffusion-author-link a,
.diffusion-line-link a {
padding: 2px 8px;
font-weight: bold;
}
.diffusion-blame-link a,
.diffusion-line-link a {
/* Give the user a larger click target. */
display: block;
}
.diffusion-author-link span {
padding: 2px 8px;
}
.diffusion-line-link {
-moz-user-select: -moz-none;
-khtml-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
user-select: none;
}