CSS changes after IONIC SERVE

Hey guys, just started in the Ionic world, so I have some newbies questions (didn’t find anything on previous posts). So everytime I run IONIC SERVE my CSS changes are reset to the original one.

I understand that I need to change de variables on ionic.app.scss but what if these variables aren’t defined on the variables.scss? Can I add variables to it? I am kinda confused about it.

Thanks in advance

Hey,

Are you directly editing the css file? that is now generated each time you run. You need to edit the scss file. Treat it like a normal css file.

Quick place to start is this video on using scss with ionic

http://learn.ionicframework.com/videos/sass/

The .scss files compile into .css, but are much easier to work with. Learning Sass is the best route because even on a small app working with just CSS get messy.

But if you just want to use plain CSS without Ionic overwriting it on every serve, you can rename the .css file, (and also change the filename in the the script tag in index.html which loads the stylesheet). Now Ionic won’t overwrite your new CSS stylesheet when it compiles the scss file.