0

I'm working on a Ruby on Rails project and trying to teach myself SASS. I'm understanding for the most part, but I'm confused about why anyone would import partials (e.g. @import "_partial.scss")

Regardless of whether I store css rules (e.g. for a navbar) in a partial or a regular .scss file, I haven't been able to notice a difference in my website's layout in Chrome.

Thus, I ask: what is the benefit of importing partials (instead of importing regular .scss files?)

EDIT:

I've been asked to explain why this question isn't a duplicate of this question.

Let me clarify: I already know that partials are not compiled to regular .css files. I just don't understand the benefit of that aspect to them - the sprockets gem, which is included with rails by default, already combines all CSS into a single file.

4

0 回答 0