2009年05月24日(日)
Style sheet designers can increase the weights of their declarations:
H1 { color: black ! important; background: white ! important }
P { font-size: 12pt ! important; font-style: italic }
In the example above, the first three declarations have increased weight, while the last declaration has normal weight.
A reader rule with an important declaration will override an author rule with a normal declaration. An author rule with an important declaration will override a reader rule with an important declaration.
http://www.w3.org/TR/REC-CSS1/#important
要するに、! importantがある属性は、後からのオーバーライドを無視します
といった内容だと。
syntaxhighlighterのCSSを変更しようと試みたときにふと気づきました。
!importantってなんじゃらほいと。
よくみるのですが、CSSをずいぶんおざなりにしていたせいでしょうか。
すっかり存じ上げませんでした。
Tags: !important, CSS, syntaxhighlighter
カテゴリ:CSS | No Comments »