CSS Tutorial in Hindi [Part 18] - CSS Important
In this video i will talk about important property in CSS. When an important rule is used on a style declaration, this declaration overrides any other declarations. Although technically !important has nothing to do with specificity, it interacts directly with it. Using !important, however, is bad practice and should be avoided because it makes debugging more difficult by breaking the natural cascading in your stylesheets. When two conflicting declarations with the !important rule are applied to the same element, the declaration with a greater specificity will be applied. Some rules of thumb: Always look for a way to use specificity before even considering !important Only use !important on page-specific CSS that overrides foreign CSS (from external libraries, like Bootstrap or normalize.css). Never use !important when you're writing a plugin/mashup. Never use !important on site-wide CSS.