css disaster
-
I inherited a website project from another agency who got sacked for being very slow. I was going through the nasty table layout site and found this gem in the site css.
.pbot10 TR TD TABLE.floatl TR TD TABLE TR TD TABLE TR TD TABLE TR TD.darkRed { BORDER-RIGHT: red 0px solid; BORDER-TOP: red 0px solid; VERTICAL-ALIGN: top; BORDER-LEFT: red 0px solid; BORDER-BOTTOM: red 0px solid; HEIGHT: 37px } .pbot10 TR TD TABLE.floatl TR TD TABLE TR TD TABLE TR TD TABLE TR TD.imgHorse { BORDER-RIGHT: red 0px solid; BORDER-TOP: red 0px solid; VERTICAL-ALIGN: top; BORDER-LEFT: red 0px solid; BORDER-BOTTOM: red 0px solid; HEIGHT: 77px }
and.mleft5 { MARGIN-LEFT: 5px } .mleft10 { MARGIN-LEFT: 10px } .mleft15 { MARGIN-LEFT: 15px } .mleft20 { MARGIN-LEFT: 20px } .mleft25 { MARGIN-LEFT: 25px } .mleft30 { MARGIN-LEFT: 30px } .mleft35 { MARGIN-LEFT: 35px } .mright5 { MARGIN-RIGHT: 5px } .mright10 { MARGIN-RIGHT: 10px } .mright15 { MARGIN-RIGHT: 15px } .mright20 { MARGIN-RIGHT: 20px } .mright25 { MARGIN-RIGHT: 25px } .mright30 { MARGIN-RIGHT: 30px } .mright35 { MARGIN-RIGHT: 35px }
It had entries exactly the same as above for all possible options - mleft, mtop, mbottom, pright, pleft, ptop, pbottom etc as well as verdana9, verdana10, verdana11 etc. I think they missed the point of css somewhat. This is just the surface at first glance, I dread to think whats to come :sigh: -
I inherited a website project from another agency who got sacked for being very slow. I was going through the nasty table layout site and found this gem in the site css.
.pbot10 TR TD TABLE.floatl TR TD TABLE TR TD TABLE TR TD TABLE TR TD.darkRed { BORDER-RIGHT: red 0px solid; BORDER-TOP: red 0px solid; VERTICAL-ALIGN: top; BORDER-LEFT: red 0px solid; BORDER-BOTTOM: red 0px solid; HEIGHT: 37px } .pbot10 TR TD TABLE.floatl TR TD TABLE TR TD TABLE TR TD TABLE TR TD.imgHorse { BORDER-RIGHT: red 0px solid; BORDER-TOP: red 0px solid; VERTICAL-ALIGN: top; BORDER-LEFT: red 0px solid; BORDER-BOTTOM: red 0px solid; HEIGHT: 77px }
and.mleft5 { MARGIN-LEFT: 5px } .mleft10 { MARGIN-LEFT: 10px } .mleft15 { MARGIN-LEFT: 15px } .mleft20 { MARGIN-LEFT: 20px } .mleft25 { MARGIN-LEFT: 25px } .mleft30 { MARGIN-LEFT: 30px } .mleft35 { MARGIN-LEFT: 35px } .mright5 { MARGIN-RIGHT: 5px } .mright10 { MARGIN-RIGHT: 10px } .mright15 { MARGIN-RIGHT: 15px } .mright20 { MARGIN-RIGHT: 20px } .mright25 { MARGIN-RIGHT: 25px } .mright30 { MARGIN-RIGHT: 30px } .mright35 { MARGIN-RIGHT: 35px }
It had entries exactly the same as above for all possible options - mleft, mtop, mbottom, pright, pleft, ptop, pbottom etc as well as verdana9, verdana10, verdana11 etc. I think they missed the point of css somewhat. This is just the surface at first glance, I dread to think whats to come :sigh:Talk about inelegance… There are much better ways of accomplishing the above.
ROFLOLMFAO
-
I inherited a website project from another agency who got sacked for being very slow. I was going through the nasty table layout site and found this gem in the site css.
.pbot10 TR TD TABLE.floatl TR TD TABLE TR TD TABLE TR TD TABLE TR TD.darkRed { BORDER-RIGHT: red 0px solid; BORDER-TOP: red 0px solid; VERTICAL-ALIGN: top; BORDER-LEFT: red 0px solid; BORDER-BOTTOM: red 0px solid; HEIGHT: 37px } .pbot10 TR TD TABLE.floatl TR TD TABLE TR TD TABLE TR TD TABLE TR TD.imgHorse { BORDER-RIGHT: red 0px solid; BORDER-TOP: red 0px solid; VERTICAL-ALIGN: top; BORDER-LEFT: red 0px solid; BORDER-BOTTOM: red 0px solid; HEIGHT: 77px }
and.mleft5 { MARGIN-LEFT: 5px } .mleft10 { MARGIN-LEFT: 10px } .mleft15 { MARGIN-LEFT: 15px } .mleft20 { MARGIN-LEFT: 20px } .mleft25 { MARGIN-LEFT: 25px } .mleft30 { MARGIN-LEFT: 30px } .mleft35 { MARGIN-LEFT: 35px } .mright5 { MARGIN-RIGHT: 5px } .mright10 { MARGIN-RIGHT: 10px } .mright15 { MARGIN-RIGHT: 15px } .mright20 { MARGIN-RIGHT: 20px } .mright25 { MARGIN-RIGHT: 25px } .mright30 { MARGIN-RIGHT: 30px } .mright35 { MARGIN-RIGHT: 35px }
It had entries exactly the same as above for all possible options - mleft, mtop, mbottom, pright, pleft, ptop, pbottom etc as well as verdana9, verdana10, verdana11 etc. I think they missed the point of css somewhat. This is just the surface at first glance, I dread to think whats to come :sigh:hehe, I think they just invented the 'defactoring' programming style :)
xacc.ide
IronScheme a R5RS-compliant Scheme on the DLR
The rule of three: "The first time you notice something that might repeat, don't generalize it. The second time the situation occurs, develop in a similar fashion -- possibly even copy/paste -- but don't generalize yet. On the third time, look to generalize the approach." -
I inherited a website project from another agency who got sacked for being very slow. I was going through the nasty table layout site and found this gem in the site css.
.pbot10 TR TD TABLE.floatl TR TD TABLE TR TD TABLE TR TD TABLE TR TD.darkRed { BORDER-RIGHT: red 0px solid; BORDER-TOP: red 0px solid; VERTICAL-ALIGN: top; BORDER-LEFT: red 0px solid; BORDER-BOTTOM: red 0px solid; HEIGHT: 37px } .pbot10 TR TD TABLE.floatl TR TD TABLE TR TD TABLE TR TD TABLE TR TD.imgHorse { BORDER-RIGHT: red 0px solid; BORDER-TOP: red 0px solid; VERTICAL-ALIGN: top; BORDER-LEFT: red 0px solid; BORDER-BOTTOM: red 0px solid; HEIGHT: 77px }
and.mleft5 { MARGIN-LEFT: 5px } .mleft10 { MARGIN-LEFT: 10px } .mleft15 { MARGIN-LEFT: 15px } .mleft20 { MARGIN-LEFT: 20px } .mleft25 { MARGIN-LEFT: 25px } .mleft30 { MARGIN-LEFT: 30px } .mleft35 { MARGIN-LEFT: 35px } .mright5 { MARGIN-RIGHT: 5px } .mright10 { MARGIN-RIGHT: 10px } .mright15 { MARGIN-RIGHT: 15px } .mright20 { MARGIN-RIGHT: 20px } .mright25 { MARGIN-RIGHT: 25px } .mright30 { MARGIN-RIGHT: 30px } .mright35 { MARGIN-RIGHT: 35px }
It had entries exactly the same as above for all possible options - mleft, mtop, mbottom, pright, pleft, ptop, pbottom etc as well as verdana9, verdana10, verdana11 etc. I think they missed the point of css somewhat. This is just the surface at first glance, I dread to think whats to come :sigh:I'm really not sure which is the worst bit - the fact they're using tables or the really dodgy right margin versions. Where's the IE hack version?
sdix wrote:
I inherited a website project from another agency who got sacked for being very slow
They weren't slow. They produced 600MB of CSS file.
Deja View - the feeling that you've seen this post before.