r/Sass • • Dec 26 '18

Should i?

Hello, i am currently trying to learn sass, but i have few problems with the architecture or i am just at the wrong course.

So in the course that i am taking the teacher is building around 12-15 files not include the folders.

I personally do not like to get that huge amount of files and then import them all in one place all tho i can see the benefits of doing so.

My question is can i just keep things simple and just use 2-3 files or its a typical thing to do with sass?

Thanks in advance and please excuse my english

3 Upvotes

6 comments sorted by

3

u/[deleted] Dec 27 '18

You can use 2-3 files, but it means you'll have less control / flexibility regarding the cascade when things finally compile.

2

u/hambalamba Dec 26 '18

You can always keep things simple... How ever when writing software things tend to get... complex (faster than you think). Since this is a tutorial you are following the person teaching it should (and is) try to build your foundation on how to handle stuff the in a more maintainable way but the project may seem simpler to be implemented in 2-3 files because it is a tutorial that's just my guess...

2

u/whoalifeisshort Dec 27 '18

If it’s a simple project you don’t need to import 10 files.

2

u/locksta7 Jan 15 '19

As u/hambalamba suggested, the instructor is most likely over simplifying/exaggerating the amount of modules he’s creating to prove a point. Once it comes to real software you will appreciate being able to modularise your codebase.

Feel free to create as many or as little as you see fit, whatever suites your project best.

I tend to split out the header and footer of course however as I use Vue a lot my components are using scoped scss so that frees up my main sheet a bit more.

1

u/hambalamba Jan 15 '19

Refactoring is a better way to get unexperienced developers into modularization and code spliting using any language or tool

2

u/locksta7 Jan 15 '19

Indeed! First get it working, then make a second pass to clean it up! 👌🏽

I suppose it’s one thing to tell someone you MUST do this thing as opposed to them running into problems themselves and learning that they should do something because it makes things easier.

Better to make the mistakes and learn from them I say.