编辑SASS文件后如何在Chrome中自动重新加载CSS [英] How to auto-reload css in Chrome after editing SASS files

查看:104
本文介绍了编辑SASS文件后如何在Chrome中自动重新加载CSS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Chrome Canary中设置映射功能.我关注了此答案中的屏幕截图.

I am trying to set up the mapping feature in Chrome canary. I followed the screenshots in this answer.

主要功能有效,当我检查一个元素时,它会将我指向我的本地sass文件,当我对其进行编辑时,它会显示本地文件保险箱,并触发"sass --watch".但是,即使我在devtools的常规"选项卡上选中了保存Sass时自动重新加载CSS",浏览器也不会刷新.

The main feature works, when I inspect an element, it points me to my local sass file and when I edit it, the local file safes, and the `sass --watch' is triggered. However, the browser does not refresh, even though on the "General" tab in devtools I have checked "Auto-reload CSS upon Sass save".

浏览器是否应该重新加载?有没有办法让它重新加载?

Should the browser reload? Is there a way to get it to reload?

Ps-我有指南针,但由于它不支持映射,所以无法使用它,因此我正在通过终端编译sass

Ps - I have compass but I can not use that as it does not support mapping, so I am compiling sass through the terminal

谢谢

推荐答案

Chrome尝试重新加载CSS时,可能仍在编译Sass文件.将保存Sass时自动重新加载CSS"超时设置为5000毫秒,对我来说已经解决了.当Chrome触发重新加载时,它甚至可以阻止Sass重新编译CSS.

It could be that the Sass-file is still compiling when Chrome tries to reload the CSS. Setting the 'Auto-reload CSS upon Sass save' Timeout to 5000 ms fixed it for me. When Chrome triggers the reload, it can even prevent Sass from recompiling the CSS.

这篇关于编辑SASS文件后如何在Chrome中自动重新加载CSS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆