Skip to content

Commit

Permalink
adobe#10325 First draft to add a highlight on the previous active lin…
Browse files Browse the repository at this point in the history
…e in the inactive pane
  • Loading branch information
aringot committed Feb 12, 2015
1 parent c6fdf50 commit 4d13aa8
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
44 changes: 44 additions & 0 deletions src/styles/brackets_codemirror_override.less
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,41 @@
background: transparent;
}

.CodeMirror .CodeMirror-activeline-background {
background: @activeline-bg-unfocused;
.dark & {
background-color: @dark-bc-highlight;
}
}

.CodeMirror-focused .CodeMirror-activeline-background {
background: @activeline-bg;
}

.show-line-padding .CodeMirror .CodeMirror-activeline-background {
box-shadow: inset @code-padding 0 0 0 @activeline-number-bg-unfocused;
}

.show-line-padding .CodeMirror-focused .CodeMirror-activeline-background {
box-shadow: inset @code-padding 0 0 0 @activeline-number-bg;
}

.CodeMirror .CodeMirror-activeline {
& > div, .CodeMirror-gutter-elt {
height: 100%;
}
.CodeMirror-gutter-elt {
background: @activeline-number-bg-unfocused;
color: @activeline-number-unfocused;
.dark & {
background-color: @dark-bc-highlight;
}
}
.inline-widget .CodeMirror-gutter-elt {
color: @accent-comment;
}
}

.CodeMirror-focused .CodeMirror-activeline {
& > div, .CodeMirror-gutter-elt {
height: 100%;
Expand Down Expand Up @@ -252,6 +279,13 @@ div.CodeMirror-cursors {
color: @accent-comment;
}

.CodeMirror .CodeMirror-activeline-background {
background: @activeline-bg-unfocused;
.dark & {
background-color: @dark-bc-highlight;
}
}

.CodeMirror-focused .CodeMirror-activeline-background {
background: @activeline-bg;
}
Expand All @@ -260,6 +294,16 @@ div.CodeMirror-cursors {
box-shadow: inset @code-padding 0 0 0 @background;
}

.CodeMirror .CodeMirror-activeline {
.CodeMirror-gutter-elt {
background: @activeline-number-bg-inline-unfocused;
color: @activeline-number-unfocused;
.dark & {
background-color: @dark-bc-highlight;
}
}
}

.CodeMirror-focused .CodeMirror-activeline {
.CodeMirror-gutter-elt {
background: @activeline-number-bg-inline;
Expand Down
6 changes: 6 additions & 0 deletions src/styles/brackets_theme_default.less
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,12 @@
@activeline-number-bg: #dee5e6;
@activeline-number-bg-inline: #d7dede;

/* background color of the line that has the cursor in the inactive pane */
@activeline-bg-unfocused: rgba(235, 239, 239, 0.5);
@activeline-number-unfocused: rgba(46, 46, 46, 0.5);
@activeline-number-bg-unfocused: rgba(222, 229, 230, 0.5);
@activeline-number-bg-inline-unfocused: rgba(215, 222, 222, 0.5);

/* custom scrollbar colors */
@win-scrollbar-track: rgb(240, 240, 240);
@win-scrollbar-thumb: rgb(206, 206, 206);
Expand Down

0 comments on commit 4d13aa8

Please sign in to comment.