Cargando Eventos

During the importance and origin calculation in step two of the cascade resolution process, the !important statement can be used to add weight to a declaration. A declaration appended with the ! operator followed immediately by the keyword important, is said to be an important declaration, rather than a normal declaration. An important declaration in an author style sheet has more weight than a normal declaration in an author style sheet, but an important declaration in a user style sheet will trump them both.

In CSS1, important declarations in an author style sheet had greater weight than important declarations in a user style sheet. In order to improve the accessibility of documents that use CSS for presentation, CSS2 reversed the ranking and gave important declarations in user style sheets the highest weight. This facility allows users with special needs to specify desired settings like a larger font size, and to be confident that those settings will be applied.

Ir a Arriba