4 ms·
The thing that has helped me the most is reading CSS. It's a lot easier to write CSS than it is to read it. Start with CSS you already have that works and re-ty
by err4nt 11y ago
The thing that has helped me the most is reading CSS. It's a lot easier to write CSS than it is to read it. Start with CSS you already have that works and re-type that into a new file and you'll soon start experimenting with what you can leave out, or just what does what.
One thing that really helps me read code is using a syntax-highlighting editor with a decent colour theme. You don't need auto suggesting, automatic tag closing, or anything. Every keystroke you press on the keyboard should map to one character being added or removed from your document.
Soon you'll find a formatting style that helps you quickly scan and read. For quickly skimming CSS it's best if it's all on one level. Selectors can be long, so starting them at arbitrary indents makes it a mess.
What they mean by nesting would be grouping 'blocks' of CSS together by indenting them. This might be one way somebody would nest button hover state under a CSS rule for a button:
button {
background: darkgreen;
}
button:hover {
background: green;
}
This is a super clean example, but in a big CSS file it can get pretty messy pretty quickly.