View Single Post
Old 10-20-2011, 03:09 AM   #1
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
how are nested+contradictory CSS dealt with ?

a line from a calibre conversion with an overkill of styles
Code:
<h1 class="calibre11" id="calibre_pb_34"><span class="calibre12 bold"><strong class="calibre13"><span class="calibre14 calibre15">16</span> KARMIC KILTER</strong></span></h1>

in the css, calibre11 thru 15 each have different font size settings. which ones actually get applied to the text ?

or to put it another way - how much of that code could be deleted with no side effects ?

and do strong and font-weight: bold both do the same thing ?
.calibre11 {
display: block;
font-size: 1.2em;
font-weight: bold;
line-height: 1.2;
margin-bottom: 0.67em;
margin-left: 0;
margin-right: 0;
margin-top: 0.67em;
text-align: right
}
.calibre12 {
font-size: 0.8m;
line-height: 1.2
}
.calibre13 {
font-weight: bolder;
line-height: 1.2
}
.calibre14 {
line-height: 1.2
}
.calibre15 {
color: #BDBDBD;
font-size: 1.2em;
line-height: 1.2
}

final challenge question - a regex which would remove all the unnecessary stuff from that line & from all similar <h1 lines ?

Last edited by cybmole; 10-20-2011 at 03:13 AM.
cybmole is offline   Reply With Quote