I found the following CSS as part of some code to control the display of an accordion menu. The menu works fine, but I do not understand the following statements [COLOR=”#FF0000″](highlighted in red with comments)
[code]
.ac-container label {
[COLOR=”#FF0000″] height: 30px !important; /* !important over-rides statements below? */
line-height: 21px !important;
font-size: 12px !important; [/COLOR]
font-family: ‘Open Sans’,’Arial Narrow’,Arial,sans-serif !important;
padding: 5px 20px;
position: relative;
z-index: 20;
display: block;
[COLOR=”#FF0000″] height: 30px; /* required ??? (see above and below) */
[/COLOR] cursor: pointer;
color: #777;
text-shadow: 1px 1px 1px rgba(255,255,255,0.8);
[COLOR=”#FF0000″]/*
line-height: 33px;
font-size: 19px;
*/[/COLOR]
background: #fff;
background: -moz-linear-gradient(top,#fff 1%,#aaeaea 100%); /* #eaeaea */
background: -webkit-gradient(linear,left top,left bottom,color-stop(1%,#fff),color-stop(100%,#aaeaea));
background: -webkit-linear-gradient(top,#fff 1%,#aaeaea 100%);
background: -o-linear-gradient(top,#fff 1%,#aaeaea 100%);
background: -ms-linear-gradient(top,#fff 1%,#aaeaea 100%);
background: linear-gradient(top,#fff 1%,#aaeaea 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=’#fff’,endColorstr=’#aeaea’,GradientType=0 );
box-shadow: 0 0 0 1px rgba(155,155,155,0.3),1px 0 0 rgba(255,255,255,0.9) inset,0 2px 2px rgba(0,0,0,0.1);
[COLOR=”#FF0000″]/* font-size: 12px; height: 30px; line-height: 20px; */[/COLOR]
}
Why do the height, line-height and font-size change three times from the start to the end of the block? Does the ‘!important’ addition to the 1st entries make the following statements moot and therefore unnecessary? Can the last two definiitons be deleted without ill effect?
Note, I can provide the entire code if necessary for the discussion.