Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialJustine Lam
8,785 PointsDo you want to upload your *.scss file as well as the *.css file?
From the importing files video, it seems like you're just creating new *.css files for your website by switching up the *.scss files you are importing into the main.css file.
Does one typically upload only the *.css files to the website? Do you just keep on generating new *.css files where you switch out the components using the import feature?
3 Answers
Adam Sackfield
Courses Plus Student 19,663 PointsI usually upload the .scss files too, my reasoning is that another developer may at some point work on the project and want the option of ready made SASS stylesheets. Aslo I know if I upload the .SCSS file to the server if I ever have a problem with my backups locally then I have not lost all the SASS work I have done.
Justine Lam
8,785 PointsThanks for the answer, Adam!
So, if I want to create separate CSS files for different HTML pages can I use the same SCSS file and just change up the output file? For Example:
I want to string together _variables.scss + _global.scss + _pagespecific.scss into one css... and just keep switching the _pagespecific.scss partial file out.
Adam Sackfield
Courses Plus Student 19,663 PointsNo you can only output a .scss file to a sinle .css file, this is also best practise as it involves less requests to the server for the files. I guess if you really wanted different stylesheets for each page then you would have to have a separate .scss file on each page and then use the @import to access your variables, global etc. I tend to have it all in a single file and break the content down through global, then sections for each page with an id on the body tag and nest each pages styles within that ID.
Justine Lam
8,785 PointsOh, neat! So I should separate out pages with an id on the body tag and then create separate styles depending on the ID. Thx for your advice.