mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-20 15:37:46 +03:00
making the editor .focused .is-focused for symmetry
This commit is contained in:
parent
a004433edd
commit
0d2a328dcc
@ -9,8 +9,8 @@ gutter.
|
||||
You can change the background color using the following CSS:
|
||||
|
||||
```css
|
||||
.editor.focused .line.cursor-line,
|
||||
.editor.focused .line-number.cursor-line {
|
||||
.editor.is-focused .line.cursor-line,
|
||||
.editor.is-focused .line-number.cursor-line {
|
||||
background-color: green;
|
||||
}
|
||||
```
|
||||
@ -18,7 +18,7 @@ You can change the background color using the following CSS:
|
||||
You can change the line number foreground color using the following CSS:
|
||||
|
||||
```css
|
||||
.editor.focused .line-number.cursor-line {
|
||||
.editor.is-focused .line-number.cursor-line {
|
||||
color: blue;
|
||||
}
|
||||
```
|
||||
|
@ -111,11 +111,11 @@ describe "Editor", ->
|
||||
editor.isFocused = false
|
||||
editor.hiddenInput.focus()
|
||||
expect(editor.isFocused).toBeTruthy()
|
||||
expect(editor).toHaveClass('focused')
|
||||
expect(editor).toHaveClass('is-focused')
|
||||
|
||||
editor.hiddenInput.focusout()
|
||||
expect(editor.isFocused).toBeFalsy()
|
||||
expect(editor).not.toHaveClass('focused')
|
||||
expect(editor).not.toHaveClass('is-focused')
|
||||
|
||||
describe "when the activeEditSession's file is modified on disk", ->
|
||||
it "triggers an alert", ->
|
||||
|
@ -351,11 +351,11 @@ class Editor extends View
|
||||
@hiddenInput.on 'focus', =>
|
||||
@rootView()?.editorFocused(this)
|
||||
@isFocused = true
|
||||
@addClass 'focused'
|
||||
@addClass 'is-focused'
|
||||
|
||||
@hiddenInput.on 'focusout', =>
|
||||
@isFocused = false
|
||||
@removeClass 'focused'
|
||||
@removeClass 'is-focused'
|
||||
@autosave() if config.get "editor.autosave"
|
||||
|
||||
@underlayer.on 'click', (e) =>
|
||||
|
@ -44,17 +44,17 @@ class TextMateTheme extends Theme
|
||||
'color': @translateColor(foreground)
|
||||
|
||||
@rulesets.push
|
||||
selector: '.editor.focused .cursor'
|
||||
selector: '.editor.is-focused .cursor'
|
||||
properties:
|
||||
'border-color': @translateColor(caret)
|
||||
|
||||
@rulesets.push
|
||||
selector: '.editor.focused .selection .region'
|
||||
selector: '.editor.is-focused .selection .region'
|
||||
properties:
|
||||
'background-color': @translateColor(selection)
|
||||
|
||||
@rulesets.push
|
||||
selector: '.editor.focused .line-number.cursor-line-no-selection, .editor.focused .line.cursor-line'
|
||||
selector: '.editor.is-focused .line-number.cursor-line-no-selection, .editor.is-focused .line.cursor-line'
|
||||
properties:
|
||||
'background-color': @translateColor(lineHighlight)
|
||||
|
||||
|
@ -85,8 +85,8 @@
|
||||
border-left: 1px solid;
|
||||
}
|
||||
|
||||
.editor:not(.focused) .cursor,
|
||||
.editor.focused .cursor.blink-off {
|
||||
.editor:not(.is-focused) .cursor,
|
||||
.editor.is-focused .cursor.blink-off {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
|
@ -3,15 +3,15 @@
|
||||
color: #c5c8c6;
|
||||
}
|
||||
|
||||
.editor.focused .cursor {
|
||||
.editor.is-focused .cursor {
|
||||
border-color: #FFFFFF;
|
||||
}
|
||||
|
||||
.editor.focused .selection .region {
|
||||
.editor.is-focused .selection .region {
|
||||
background-color: #333333;
|
||||
}
|
||||
|
||||
.editor.focused .line-number.cursor-line-no-selection, .editor.focused .line.cursor-line {
|
||||
.editor.is-focused .line-number.cursor-line-no-selection, .editor.is-focused .line.cursor-line {
|
||||
background-color: rgba(255, 255, 255, 0.14);
|
||||
}
|
||||
|
||||
|
@ -3,15 +3,15 @@
|
||||
color: #555;
|
||||
}
|
||||
|
||||
.editor.focused .cursor {
|
||||
.editor.is-focused .cursor {
|
||||
border-color: #000;
|
||||
}
|
||||
|
||||
.editor.focused .selection .region {
|
||||
.editor.is-focused .selection .region {
|
||||
background-color: #afc4da;
|
||||
}
|
||||
|
||||
.editor.focused .line-number.cursor-line-no-selection, .editor.focused .line.cursor-line {
|
||||
.editor.is-focused .line-number.cursor-line-no-selection, .editor.is-focused .line.cursor-line {
|
||||
background-color: rgba(255, 255, 134, 0.34);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user