S
S
Selsh2014-06-14 00:10:34
css
Selsh, 2014-06-14 00:10:34

How to optimize layout?

How to optimize html and css code? What is shit code, and how to avoid it?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
A
Alexander Petrov, 2014-06-14
@Selsh

Read about BEM. About preprocessors (both CSS and HTML).
Shitcode - using ID. Creepy cascade. Style repetition. Poor class naming.
Well, for example, a layout laid out entirely in absolute positioning is a star, to put it mildly.
Good layout - if a person who did not make up the site, but knows how, can open the files and fix what he needs, and will not suffer for days in search of a place where to fix it and the layout will not fall apart after the slightest edits.

P
personaljs, 2014-06-14
@personaljs

Very useful

L
Lisonok, 2014-06-14
@Lisonok

Try using preprocessors such as sass or less for css, jade or haml for html, cofeescript for js, there are a bunch of others
.

A
Alexander Litvinov, 2014-06-14
@Sander_Li

I advise you to look PageSpeed

S
Sergey, 2014-06-14
@Hando

Shit code is writing styles in tags, giving stupid and not informative names to classes, code redundancy.
Code optimization is cross-browser compatibility + code formatting.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question