coffeelintのpre commit設定をしたのに、 xargs: coffeelint: No such file or directory のエラーが出る時。
困りごと
xargs: coffeelint: No such file or directory のエラーが出る。
こちら↓↓の記事のように、チーム開発で、コミットする前に、coffeelintを使って、 書き方がいい感じかどうかチェックするように設定してみたりしたのですが、 xargs: coffeelint: No such file or directoryというエラーがでるので、困っていました。
rubocop, ham-lintなどをcommitする時点で適用 https://openbook4.me/sections/464#rubocop%2C%20ham-lint%E3%81%AA%E3%81%A9%E3%82%92commit%E3%81%99%E3%82%8B%E6%99%82%E7%82%B9%E3%81%A7%E9%81%A9%E7%94%A8
解決方法
npm install -g coffeelint
グローバルオプションを付けてインストールしてあげる。
modalの背景色が全体に適応されない時…。
iPadなどIOSのサファリでモーダルの背景が崩れるのを何とかする
原因
cssの-webkit-overflow-scrolling: touch; やtransformなどのプロパティが入ってると親が変わってしまって、modalが崩れることがあるらしい。
対策
ということで、 モーダルをbody直下に移動させる様に実装しました。
function moveModalAfterBody() { $(".modal-wrapper").insertAfter("body"); }
したのですが、ちょっと上の階層のクラスが足りなくて、 文字の大きさやフォントが変わってしまったので下記に変更。
function moveModalAfterBody() { wrapper = "<div class='needed-class-name'/>"; $("body").append($(".modal-wrapper").wrapAll(wrapper)); }