diff --git a/docs/advanced/keymaps.md b/docs/advanced/keymaps.md index 5e565312e..d03f7972b 100644 --- a/docs/advanced/keymaps.md +++ b/docs/advanced/keymaps.md @@ -16,7 +16,7 @@ keystrokes pass through `atom-text-editor` elements: 'ctrl-shift-e': 'editor:select-to-end-of-line' 'cmd-left': 'editor:move-to-first-character-of-line' -'atom-text-editor:not(.mini)' +'atom-text-editor:not([mini])' 'cmd-alt-[': 'editor:fold-current-row' 'cmd-alt-]': 'editor:unfold-current-row' ``` @@ -27,8 +27,8 @@ patterns* to *commands*. When an element with the `atom-text-editor` class is fo `editor:delete-to-beginning-of-line` is emitted on the `atom-text-editor` element. The second selector group also targets editors, but only if they don't have the -`.mini` class. In this example, the commands for code folding don't really make -sense on mini-editors, so the selector restricts them to regular editors. +`mini` attribute. In this example, the commands for code folding don't really +make sense on mini-editors, so the selector restricts them to regular editors. ### Keystroke Patterns diff --git a/docs/customizing-atom.md b/docs/customizing-atom.md index fc763942c..1b5bceca3 100644 --- a/docs/customizing-atom.md +++ b/docs/customizing-atom.md @@ -63,7 +63,7 @@ built-in keymaps: 'atom-text-editor': 'enter': 'editor:newline' -'atom-text-editor.mini input': +'atom-text-editor[mini] input': 'enter': 'core:confirm' ``` diff --git a/keymaps/base.cson b/keymaps/base.cson index f187cf2ed..d9941643c 100644 --- a/keymaps/base.cson +++ b/keymaps/base.cson @@ -5,7 +5,7 @@ 'shift-home': 'editor:select-to-first-character-of-line' 'shift-end': 'editor:select-to-end-of-line' -'atom-text-editor:not(.mini)': +'atom-text-editor:not([mini])': # Atom Specific 'ctrl-C': 'editor:copy-path' @@ -15,13 +15,13 @@ 'shift-tab': 'editor:outdent-selected-rows' 'ctrl-K': 'editor:delete-line' -'.select-list atom-text-editor.mini': +'.select-list atom-text-editor[mini]': 'enter': 'core:confirm' '.tool-panel.panel-left, .tool-panel.panel-right': 'escape': 'tool-panel:unfocus' -'atom-text-editor !important, atom-text-editor.mini !important': +'atom-text-editor !important, atom-text-editor[mini] !important': 'escape': 'editor:consolidate-selections' # allow standard input fields to work correctly diff --git a/keymaps/darwin.cson b/keymaps/darwin.cson index 4dd3fd8d7..5226bb5e6 100644 --- a/keymaps/darwin.cson +++ b/keymaps/darwin.cson @@ -136,7 +136,7 @@ 'cmd-l': 'editor:select-line' 'ctrl-t': 'editor:transpose' -'atom-workspace atom-text-editor:not(.mini)': +'atom-workspace atom-text-editor:not([mini])': # Atom specific 'alt-cmd-z': 'editor:checkout-head-revision' 'cmd-<': 'editor:scroll-to-cursor' diff --git a/keymaps/linux.cson b/keymaps/linux.cson index 89ed896f9..59803d193 100644 --- a/keymaps/linux.cson +++ b/keymaps/linux.cson @@ -101,7 +101,7 @@ 'ctrl-k ctrl-l': 'editor:lower-case' 'ctrl-l': 'editor:select-line' -'atom-workspace atom-text-editor:not(.mini)': +'atom-workspace atom-text-editor:not([mini])': # Atom specific 'alt-ctrl-z': 'editor:checkout-head-revision' 'ctrl-<': 'editor:scroll-to-cursor' diff --git a/keymaps/win32.cson b/keymaps/win32.cson index a98440d0c..da43ac364 100644 --- a/keymaps/win32.cson +++ b/keymaps/win32.cson @@ -98,7 +98,7 @@ 'ctrl-k ctrl-l': 'editor:lower-case' 'ctrl-l': 'editor:select-line' -'atom-workspace atom-text-editor:not(.mini)': +'atom-workspace atom-text-editor:not([mini])': # Atom specific 'alt-ctrl-z': 'editor:checkout-head-revision' 'ctrl-<': 'editor:scroll-to-cursor' diff --git a/src/text-editor-element.coffee b/src/text-editor-element.coffee index 6c9a07a91..f06a25dc2 100644 --- a/src/text-editor-element.coffee +++ b/src/text-editor-element.coffee @@ -214,7 +214,7 @@ atom.commands.add 'atom-text-editor', stopEventPropagationAndGroupUndo( 'editor:lower-case': -> @lowerCase() ) -atom.commands.add 'atom-text-editor:not(.mini)', stopEventPropagationAndGroupUndo( +atom.commands.add 'atom-text-editor:not([mini])', stopEventPropagationAndGroupUndo( 'core:move-up': -> @moveUp() 'core:move-down': -> @moveDown() 'core:move-to-top': -> @moveToTop() diff --git a/static/panels.less b/static/panels.less index 9d758309c..4d21ba814 100644 --- a/static/panels.less +++ b/static/panels.less @@ -99,7 +99,7 @@ atom-panel[location="modal"] { font-size: 1.3em; } - atom-text-editor.mini { + atom-text-editor[mini] { margin-bottom: 10px; } diff --git a/static/text-editor-light.less b/static/text-editor-light.less index aa3730614..f9795a646 100644 --- a/static/text-editor-light.less +++ b/static/text-editor-light.less @@ -8,7 +8,7 @@ atom-text-editor { line-height: 1.3; } -atom-text-editor.mini { +atom-text-editor[mini] { font-size: @input-font-size; line-height: @component-line-height; max-height: @component-line-height + 2; // +2 for borders