• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
1

File issue

New Here ,
Sep 20, 2022 Sep 20, 2022

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.

Anyone can help me. Thanks in advance i would like to have an answer for my content writing

[Moderator Note: Irrelevant backlink removed.]

Views

134

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 20, 2022 Sep 20, 2022

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.

 

 

Nancy O'Shea— Product User, Community Expert & Moderator

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 21, 2022 Sep 21, 2022

Copy link to clipboard

Copied

quote

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.

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 21, 2022 Sep 21, 2022

Copy link to clipboard

Copied

LATEST

@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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines