Blog Post

Semi-Forgetful Colons

The Zombie: Forget a CSS semicolon

Always a Zombie? No

Severity: Varies from none to high depending on where semicolon is missing.

Why is it a Zombie: If properties and values come after it in the declaration block, they will be ignored. If it’s the only or last declaration in the declaration block, the semicolon is not necessary.

Cure the Zombie by: Add a semicolon to the end of the property/value pair. Note: you can head off this issue by adding a semicolon to all properties whether they are at the end of the declaration block or not. This has removed hours of debugging from my life.