LoginSignup
0
0

More than 5 years have passed since last update.

AtomのsyntaxUIでシンタックスエラーの警告が出たときの対処法

Posted at

発生したもの
以前のバージョンからいろいろ更新されていなかったみたいで
左下の{警告マーク}が出て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がリンク切れになっていたのでそのへんはプルリクを送ってちょっと待ち状態になってます。

ひとまず警告がなくなって安心

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0