Skip to content

Commit c977b4d

Browse files
authored
Merge pull request #700 from JunoLab/sp/moresubtlecellhighlighting
more subtle cell highlighting
2 parents 70cd1f7 + 7faf779 commit c977b4d

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

lib/package/config.coffee

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,10 @@ config =
258258
highlightCells:
259259
title: 'Highlight Cells'
260260
type: 'boolean'
261+
description: 'Customize the appearence of Juno\'s cell highlighting by
262+
adding styles for `.line.julia-current-cell` or
263+
`.line-number.julia-current-cell` to your personal
264+
stylesheet.'
261265
default: true
262266
order: 12
263267
layouts:

lib/ui/cellhighlighter.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@ function highlightCurrentCell (ed, marker, borders) {
7373
}
7474

7575
marker = ed.markBufferRange(range)
76+
ed.decorateMarker(marker, {
77+
type: 'line-number',
78+
class: 'julia-current-cell'
79+
})
7680
ed.decorateMarker(marker, {
7781
type: 'line',
7882
class: 'julia-current-cell'

styles/julia-client.less

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,8 @@ atom-text-editor.editor[data-grammar$="source weave latex"] {
155155
max-width: 500px;
156156
}
157157

158-
.julia-current-cell {
159-
background-color: fade(@syntax-selection-color, 30%);
158+
.line-number.julia-current-cell {
159+
background-image: linear-gradient(to right, rgba(255,255,0,0), 90%, fade(@syntax-text-color, 10%));
160160
}
161161

162162
.julia-cell-border {

0 commit comments

Comments
 (0)