Skip to content

Latest commit

 

History

History
38 lines (28 loc) · 563 Bytes

css.md

File metadata and controls

38 lines (28 loc) · 563 Bytes

CSS coding conventions

Tabs should be used for indentation.

Property ordering

In general, properties further towards the top should affect layout, while properties towards the bottom should affect appearance.

Specifically, the most common properties should be in this order:

.class {
	position
	display

	flex /* etc. */

	top
	bottom
	left
	right
	z-index

	width  /* also min-, max- */
	height /* also min-, max- */

	padding
	border
	margin

	font /* etc. */
	text-align
	background /* etc. */
	color
}