Search code examples
csssasscodekit

What happens if you manually update a .CSS file when a .SCSS/.SASS file is in use?


I've got the below setup:

  • Brackets IDE
  • CodeKit for compiling SASS/SCSS into CSS
  • CloudMounter to mount a live copy of a Wordpress site via FTP (it also auto updates the server's files with any changes I make to the mounted version).

Here's how it works:

  1. Add SCSS styling into .SCSS file
  2. Save SCSS file
  3. CodeKit auto compiles into CSS file, and stores on Local/mounted drive.
  4. CloudMounter picks up the change and auto uploads it to server where Wordpress site is hosted.

Probably not the most efficient workflow but I'm quite impressed with what I've managed to pull off.

My question is: What happens if one of the other people in my office directly FTPs onto the server and makes an edit to the .CSS file instead of using the above method to add SCSS instead?

Will this break the compiler? When I update the SCSS file in the future, will this overwrite/ignore the new custom CSS?

I'd rather like to keep myself as the only developer who uses SCSS instead of having to train the other people in the office.


Solution

  • DON'T! It will be very hard to maintain what you edited and when you reload the Wordpress site you will lose the edits to the compiled CSS file (pure assumption). If you ABSOLUTELY have to just put the extra CSS you want to add or want your coworkers to add in separate CSS files that AREN'T SCSS/SASS.

    SCSS compiles to CSS, that would be like writing software in C++ and then editing the compiled object files or writing software in Java and then editing the byte code. It is just very backwards and not ideal.

    By doing what you said you wanted to do you are doing something that is not not advised. SCSS is neat because it allows you to short hand a bunch of stuff and saves you typing and annoying syntax and lets you use variables which plain CSS doesn't allow. Adding plain CSS to a mainly SCSS styled app isn't bad, but I suggest you put all your additional CSS in a separate file so that it is clear what the compiled CSS from SCSS is and what the new CSS you used is.

    For the most part SCSS can almost be used Exactly like CSS as far as I know and its worth learning.