AtomのsyntaxUIでシンタックスエラーの警告が出たときの対処法
発生したもの
以前のバージョンからいろいろ更新されていなかったみたいで
左下の{警告マーク}が出てsyntaxの設定にエラーがあったらしい
エラー内容は以下
Starting from Atom v1.13.0, the contents of atom-text-editor elements are no longer encapsulated
within a shadow DOM boundary. This means you should stop using :host and ::shadow pseudo-selectors,
and prepend all your syntax selectors with syntax--. To prevent breakage with existing style sheets,
Atom will automatically upgrade the following selectors:
要するに、以前サポートしていた構文が使えなくなってますよーというものだった。
syntaxを使うこと自体には特に何か問題があったわけでもないけどずっと出続けるのが面倒なので廃止された箇所を修正
修正する箇所:
とりあえず、怒られている ::shadowと ::host に該当する箇所を削除して修正した。
atom-text-editor::shadow => atom-text-editor.editor
::host .search-results .marker .region => atom-text-editor .search-results .syntax--marker .region
こんな感じにするとうまくいきました。
修正前
atom-text-editor::shadow {
background-color: @syntax-background-color;
color: @syntax-text-color;
修正後
atom-text-editor,atom-text-editor {
background-color: @syntax-background-color;
color: @syntax-text-color;
あと、自分で修正したあと、思ったけどすでにメンテナーの人が直していた。
Fix deprecations
別件でREADMEがリンク切れになっていたのでそのへんはプルリクを送ってちょっと待ち状態になってます。
ひとまず警告がなくなって安心
Author And Source
この問題について(AtomのsyntaxUIでシンタックスエラーの警告が出たときの対処法), 我々は、より多くの情報をここで見つけました https://qiita.com/tukapai/items/8f1b5d50ecc23a235195著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .