Changeset View
Changeset View
Standalone View
Standalone View
webroot/rsrc/css/layout/phabricator-source-code-view.css
/** | /** | ||||
* @provides phabricator-source-code-view-css | * @provides phabricator-source-code-view-css | ||||
*/ | */ | ||||
.phabricator-source-code-container { | .phabricator-source-code-container { | ||||
overflow-x: auto; | overflow-x: auto; | ||||
overflow-y: hidden; | overflow-y: hidden; | ||||
border: 1px solid {$paste.border}; | border: 1px solid {$paste.border}; | ||||
border-radius: 3px; | border-radius: 3px; | ||||
background-color: {$paste.content}; | background-color: {$paste.content}; | ||||
} | } | ||||
.phui-oi .phabricator-source-code-container { | .phui-oi .phabricator-source-code-container { | ||||
margin-left: 8px; | margin-left: 8px; | ||||
} | } | ||||
.phabricator-source-code-view tr:first-child * { | |||||
padding-top: 8px; | |||||
} | |||||
.phabricator-source-code-view tr:last-child * { | |||||
padding-bottom: 8px; | |||||
} | |||||
.phabricator-source-code { | .phabricator-source-code { | ||||
white-space: pre-wrap; | white-space: pre-wrap; | ||||
padding: 2px 8px 1px; | padding: 2px 8px 1px; | ||||
width: 100%; | width: 100%; | ||||
} | } | ||||
.phabricator-source-line { | .phabricator-source-line { | ||||
background-color: {$paste.highlight}; | background-color: {$paste.highlight}; | ||||
text-align: right; | text-align: right; | ||||
border-right: 1px solid {$paste.border}; | border-right: 1px solid {$paste.border}; | ||||
color: {$sh-yellowtext}; | color: {$sh-yellowtext}; | ||||
/* When the user selects rows of source, don't visibly select the line | /* When the user selects rows of source, don't visibly select the line | ||||
numbers beside them. We use JS to strip the line numbers out when the user | numbers beside them. We use JS to strip the line numbers out when the user | ||||
copies the text. */ | copies the text. */ | ||||
-moz-user-select: -moz-none; | -moz-user-select: -moz-none; | ||||
-khtml-user-select: none; | -khtml-user-select: none; | ||||
-webkit-user-select: none; | -webkit-user-select: none; | ||||
-ms-user-select: none; | -ms-user-select: none; | ||||
user-select: none; | user-select: none; | ||||
white-space: nowrap; | white-space: nowrap; | ||||
} | } | ||||
th.phabricator-source-line a { | th.phabricator-source-line a, | ||||
color: {$darkbluetext}; | th.phabricator-source-line span { | ||||
display: block; | display: block; | ||||
padding: 2px 6px 1px 12px; | padding: 2px 6px 1px 12px; | ||||
} | } | ||||
th.phabricator-source-line a { | |||||
color: {$darkbluetext}; | |||||
} | |||||
th.phabricator-source-line a:hover { | th.phabricator-source-line a:hover { | ||||
background: {$paste.border}; | background: {$paste.border}; | ||||
text-decoration: none; | text-decoration: none; | ||||
} | } | ||||
.phabricator-source-highlight { | .phabricator-source-highlight { | ||||
background: {$paste.highlight}; | background: {$paste.highlight}; | ||||
} | } | ||||
.phabricator-source-highlight th.phabricator-source-line { | |||||
background: {$paste.border}; | |||||
} | |||||
.phabricator-source-code-summary { | .phabricator-source-code-summary { | ||||
padding-bottom: 8px; | padding-bottom: 8px; | ||||
} | } | ||||
/* If a Paste has enormously long lines, truncate them in the summary on the | /* If a Paste has enormously long lines, truncate them in the summary on the | ||||
list page. They'll be fully visible on the Paste itself. */ | list page. They'll be fully visible on the Paste itself. */ | ||||
.phabricator-source-code-summary .phabricator-source-code-container { | .phabricator-source-code-summary .phabricator-source-code-container { | ||||
overflow-x: hidden; | overflow-x: hidden; | ||||
} | } | ||||
.phabricator-source-code-summary .phabricator-source-code { | .phabricator-source-code-summary .phabricator-source-code { | ||||
white-space: nowrap; | white-space: nowrap; | ||||
} | } |