Copy link to clipboard
Copied
maybe I have no clue what i am doing but apparently styles.css and styles.scss cannot exist together in a folder. When I make the scss file - both files are then erased to blank.
Copy link to clipboard
Copied
SCSS and CSS are not the same things. The former is pre-processed code used in SASS (synthetically awesome style sheets), the latter is final processed code recognized by browsers.
Developers typically prefix their SCSS files with an underscore, _styles.scss. SCSS is convenient for advanced developers who combine it with variables and mixins prior to running it through a processor that exports it to final CSS, styles.css.
Hope that helps. Post back if you have more questions.
Copy link to clipboard
Copied
Developers typically prefix their SCSS files with an underscore, _styles.scss.
By @Nancy OShea
In fact, this is not quite true. Prefixing a SCSS document with an underscore tells the compiler that this is a partial file, and that this file, which must be imported into another SCSS file, does not need to be rendered as a CSS file.
https://sass-lang.com/guide#topic-4
Therefore, prefixed files will not be rendered, so if you prefix the styles.css file, which is the filename usually used as a root file, this file will never be rendered as CSS.
Generally, we use underscore as a prefix, only for files imported into another file.
Copy link to clipboard
Copied
@Ryan26209318c4si I use styles.scss all the time, and although I use a different tree structure (I don't put my SCSS and CSS files in the same folders), for testing purpose, I've never had a problem putting the two in the same folder.
Try to create a new site, blank, just place a SCSS file into it and test... do both files always disappear?