4 ms·
can someone explain the convention of importing a directory into a file of the same name (and same level) before main.scss. The structure is: src/sass/
by vonklaus 10y ago
can someone explain the convention of importing a directory into a file of the same name (and same level) before main.scss. The structure is:
src/sass/
components/
support/
vars/
_components.scss
_support.scss
main.scss
and within main:
@import "components";
Just curious why this is? I usually just import them directly into main, but I could understand if they were nested into the directory so they could be broken out. This structure doesn't make sense to me though as they are all flat & in same directory.
- tylerchilds 10y agoHey! Usually I do exactly what you describe, but I laid it out like this so that if people want to include all the components, it's one line. Or if they'd want to include just the grid from components, it would still just be one line. With something this small, it could be just into the one file, but I'm optimizing for that granularity.