MDN: CSS Cascade and Inheritance

specificity (source order?) – rules later in source order generally override earlier rules – .classes/#ids have higher specificity than element selectors – #ids override .classes – specificity measures how specific each selector is – values given to each element selector: thousands, hundreds, ten, and ones !importance – overrides #ids – changes normal way cascade works […]