S
S
Sharapov2016-11-25 14:02:08
css
Sharapov, 2016-11-25 14:02:08

Which is better - a common all-in-one style.css or multiple .css files?

Multiple files are better, but won't that slow down page loading and rendering?
cf083ad92dba4054b86617c25318236b.png

Answer the question

In order to leave comments, you need to log in

3 answer(s)
I
Ivan Stroykin, 2016-11-25
@Sharapov

Affects. Each file is an additional request.
But spreading styles across files makes it easier to follow and edit them.
What to do? Correctly. Scatter over files and work with them. And when uploading to the server, pass through the project collector (for example, gulp), which will combine all css files into one, and also compress them

Сергей, 2016-11-25
@Shull

Это зависит от вашего уровня знаний и умений.
Сначала вы будете делать CSS-стили внутри HTML-файла.
Потом вы будете делать отдельный файл .CSS.
Потом вы подключите CSS-помогайки, например, reset.css и у вас будет несколько CSS. Я сейчас именно на этом этапе.
Потом вы начнёте использовать сборщики.
Потом вы будете всё это разумно комбинировать.
Удачи.

T
trevoga_su, 2016-11-25
@trevoga_su

will not reduce
css and js must be separated. for each template - its own css and js,
very common styles and scripts - we take it out to common.css and common.js,
if you don’t separate it, then you won’t understand this chaos

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question