最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

How to continuously change style using sass - Stack Overflow

programmeradmin5浏览0评论

I recently learned Sass and am working on a project. In this project, whenever I change my styles, I open the terminal and type the command sass style.scss style.css to update my CSS file.

Is there a way to automatically update my CSS file without having to type this command every time?

I just want a good solution that work.

I recently learned Sass and am working on a project. In this project, whenever I change my styles, I open the terminal and type the command sass style.scss style.css to update my CSS file.

Is there a way to automatically update my CSS file without having to type this command every time?

I just want a good solution that work.

Share Improve this question edited 10 hours ago bmargulies 100k40 gold badges194 silver badges321 bronze badges asked 10 hours ago Anonymous GhostAnonymous Ghost 12 bronze badges
Add a comment  | 

2 Answers 2

Reset to default 0

Typically, people who use sass use some sort of ISE, perhaps combined with a build system. For example, VSCode is aware of SASS.

Eventually, you will have a build pipeline that involved other steps than running SASS that have to happen to prepare your site for deployment, and the system you select and set up will run SASS along with other needed steps. While in early development, however, an IDE is a common solution.

Use the watch mode in Sass to automatically update your CSS file whenever you save changes to your .scss file.

Run this command in your terminal:

sass --watch style.scss:style.css
发布评论

评论列表(0)

  1. 暂无评论