D
D
Dmitry Smirnov2017-10-01 13:57:30
css
Dmitry Smirnov, 2017-10-01 13:57:30

How to type in sass so that everything is in one file?

Good afternoon.
There is a site: here , where there are many pages and one style file for everything.
I'm building with gulp using sass. Can you tell me how to properly layout large sites and what should be the style file?
Should it be one file?
And if you use sass, then how to build a hierarchy in styles?
Let me give you an example:
I usually type with nesting, like

.main{
   ...
   .block{
       ...
      .element{...}
   }
}

For a large site, do you need to separate styles so that there is no nesting? For example:
.main{...}
.block{...}
.element{...}

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey Verkhovtsev, 2017-10-01
@wakamon

https://sass-guidelin.es/ I think you will like the architecture, it is then assembled into 1 file and as mrusklon said , use bem

P
Pavel, 2017-10-01
@mrusklon

for large sites, use bem , yes, it is desirable to make one file.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question