mirror of
https://github.com/atom/atom.git
synced 2026-01-23 13:58:08 -05:00
Horizontal / vertical scrollbars render a 'corner' on the lower right when they would otherwise overlap. I previously relied on drawing both dummy scrollbars at their full width/height so the corner got rendered, but that interfered with the display of the horizontal scrollbar in certain circumstances because it was too wide to scroll. This commit provides that behavior with an absolutely positioned div with the same dimensions as the intersection of scrollbars when both are visible.
268 lines
3.9 KiB
Plaintext
268 lines
3.9 KiB
Plaintext
@import "ui-variables";
|
|
@import "octicon-utf-codes";
|
|
@import "octicon-mixins";
|
|
|
|
.editor.react {
|
|
.underlayer {
|
|
position: absolute;
|
|
top: 0;
|
|
bottom: 0;
|
|
left: 0;
|
|
right: 0;
|
|
z-index: -2;
|
|
}
|
|
|
|
.lines {
|
|
z-index: -1;
|
|
}
|
|
|
|
.horizontal-scrollbar {
|
|
position: absolute;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
|
|
height: 15px;
|
|
overflow-x: auto;
|
|
overflow-y: hidden;
|
|
z-index: 3;
|
|
|
|
.scrollbar-content {
|
|
height: 15px;
|
|
}
|
|
}
|
|
|
|
.vertical-scrollbar {
|
|
overflow-x: hidden;
|
|
}
|
|
|
|
.scrollbar-corner {
|
|
position: absolute;
|
|
overflow: auto;
|
|
bottom: 0;
|
|
right: 0;
|
|
}
|
|
|
|
.scroll-view {
|
|
overflow: hidden;
|
|
}
|
|
|
|
.scroll-view-content {
|
|
position: relative;
|
|
width: 100%;
|
|
}
|
|
|
|
.gutter {
|
|
padding-left: 0.5em;
|
|
padding-right: 0.5em;
|
|
|
|
.line-number {
|
|
position: absolute;
|
|
left: 0;
|
|
right: 0;
|
|
padding: 0;
|
|
white-space: nowrap;
|
|
|
|
.icon-right {
|
|
padding: 0;
|
|
padding-left: .1em;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.editor {
|
|
overflow: hidden;
|
|
cursor: text;
|
|
display: -webkit-flex;
|
|
-webkit-user-select: none;
|
|
position: relative;
|
|
z-index: 0;
|
|
font-family: Inconsolata, Monaco, Consolas, 'Courier New', Courier;
|
|
line-height: 1.3;
|
|
}
|
|
|
|
.editor .gutter .line-number.cursor-line {
|
|
opacity: 1;
|
|
}
|
|
|
|
.editor .gutter {
|
|
overflow: hidden;
|
|
text-align: right;
|
|
cursor: default;
|
|
min-width: 1em;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.editor .gutter .line-number {
|
|
padding-left: .5em;
|
|
opacity: 0.6;
|
|
}
|
|
|
|
.editor .gutter .line-numbers {
|
|
position: relative;
|
|
}
|
|
|
|
.editor .gutter .line-number.folded.cursor-line {
|
|
opacity: 1;
|
|
}
|
|
|
|
.editor .gutter .line-number .icon-right {
|
|
.octicon(chevron-down, 0.8em);
|
|
display: inline-block;
|
|
visibility: hidden;
|
|
padding-left: .1em;
|
|
padding-right: .5em;
|
|
opacity: .7;
|
|
}
|
|
|
|
.editor .gutter:hover .line-number.foldable .icon-right {
|
|
visibility: visible;
|
|
|
|
&:before {
|
|
content: @chevron-down;
|
|
}
|
|
|
|
&:hover {
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
.editor .gutter, .editor .gutter:hover {
|
|
.line-number.folded .icon-right {
|
|
.octicon(chevron-right, 0.8em);
|
|
visibility: visible;
|
|
|
|
&:before { // chevron-right renders too far right compared to chevron-down
|
|
position: relative;
|
|
left: -.1em;
|
|
content: @chevron-right;
|
|
}
|
|
}
|
|
}
|
|
|
|
.editor .fold-marker:after {
|
|
.icon(0.8em, inline);
|
|
content: @ellipsis;
|
|
padding-left: 0.2em;
|
|
}
|
|
|
|
.editor .line.cursor-line .fold-marker:after {
|
|
opacity: 1;
|
|
}
|
|
|
|
.editor.is-blurred .line.cursor-line {
|
|
background: rgba(0, 0, 0, 0);
|
|
}
|
|
|
|
.editor .invisible-character {
|
|
font-weight: normal !important;
|
|
font-style: normal !important;
|
|
}
|
|
|
|
.editor .indent-guide {
|
|
display: inline-block;
|
|
box-shadow: inset 1px 0;
|
|
}
|
|
|
|
.editor .vertical-scrollbar {
|
|
position: absolute;
|
|
top: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
|
|
width: 15px;
|
|
overflow-y: auto;
|
|
z-index: 3;
|
|
}
|
|
|
|
.editor .scroll-view {
|
|
overflow-x: auto;
|
|
overflow-y: hidden;
|
|
-webkit-flex: 1;
|
|
min-width: 0;
|
|
position: relative;
|
|
}
|
|
|
|
.editor.soft-wrap .scroll-view {
|
|
overflow-x: hidden;
|
|
}
|
|
|
|
.editor .underlayer {
|
|
z-index: 0;
|
|
position: absolute;
|
|
min-height: 100%;
|
|
}
|
|
|
|
.editor .lines {
|
|
position: relative;
|
|
z-index: 1;
|
|
}
|
|
|
|
.editor .overlayer {
|
|
z-index: 2;
|
|
position: absolute;
|
|
}
|
|
|
|
.editor .line {
|
|
white-space: pre;
|
|
}
|
|
|
|
.editor .line span {
|
|
vertical-align: top;
|
|
}
|
|
|
|
.editor .cursor {
|
|
position: absolute;
|
|
border-left: 1px solid;
|
|
}
|
|
|
|
.editor .cursor,
|
|
.editor.is-focused .cursor.blink-off {
|
|
visibility: hidden;
|
|
}
|
|
|
|
.editor.is-focused .cursor {
|
|
visibility: visible;
|
|
}
|
|
|
|
.editor .hidden-input {
|
|
padding: 0;
|
|
border: 0;
|
|
position: absolute;
|
|
z-index: -1;
|
|
top: 0;
|
|
left: 0;
|
|
opacity: 0;
|
|
width: 1px;
|
|
}
|
|
|
|
.editor .selection .region {
|
|
position: absolute;
|
|
pointer-events: none;
|
|
z-index: -1;
|
|
}
|
|
|
|
.editor.mini {
|
|
height: auto;
|
|
line-height: 25px;
|
|
|
|
.cursor {
|
|
width: 2px;
|
|
line-height: 20px;
|
|
margin-top: 2px;
|
|
}
|
|
|
|
.gutter {
|
|
display: none;
|
|
}
|
|
|
|
.scroll-view {
|
|
overflow: hidden;
|
|
}
|
|
|
|
.placeholder-text {
|
|
color: @text-color-subtle;
|
|
}
|
|
}
|