-
Notifications
You must be signed in to change notification settings - Fork 1
Coding Standards—CSS
Reuben L. Lillie edited this page Jul 5, 2019
·
1 revision
CSS is the standard language for styling web pages. Together with Hypertext Markup Language (HTML) and JavaScript (JS), it forms the core of the web.
Learn more about CSS from the Mozilla Developer Network.
Write modular, descriptive, utility-first CSS.
As much as possible, list rules in DOM order.
Avoid using multiple selectors for single rule. If you must use multiple selectors, however, then place selectors on separate lines and list them alphabetically according to specifity (i.e., type, then class, then id).
Indent property: value;
declarations with four spaces, not tabs.
Put a colon followed by a single space between property
and value
, followed by a semicolon.
element,
.class-selector,
#id_selector {
property: value;
}
Copyright © 2019 by Pittsburgh District Church of the Nazarene