Should a space be added after the colon or does it not matter?

(example 1:) background-color: purple;
(example 2:) background-color:purple;

This is not about a project, just curious.

Yes… But no. Doesn’t matter syntactically, but it’s much easier to read.

Yeah, it’s a matter of style, but style can be important for readability. Later, “in the real world”, you usually have a linter set up that will “enforce” a style to make it easier.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.