[thelist] star-hacks vs conditional comments

Barney Carroll barney.carroll at gmail.com
Mon Jan 19 05:47:47 CST 2009


Practice is important to consider — especially during elaborate debugging,
where you'll want to know what 'mechanic' is affecting things differently
without remembering specifically everything you've written that's currently
in the CSS that might be affecting whatever inconsistencies you have. For
this reason, I use * (IE) and _ (IE7 only - useful for overriding) hacks to
keep all factors in the same CSS file (or the CSS file you would expect — if
you're using multiple stylesheets). You can also extend this philosophy for
any other browser-based hacks.

With this method, you can see at a glance what is affecting your element
without rethinking your CSS writing method. It also helps that IE8 (and by
extension IE7) web inspector will announce these hacks when they're in use,
and Firebug will infer it by indicating a skipped line number in the style
viewer (the skipped line being a non-computable hack).



Regards,
Barney Carroll
Web designer & front-end developer

t: +44 (0) 7594 506 381


2009/1/19 Jack Timmons <jorachim at gmail.com>

> On Sun, Jan 18, 2009 at 12:22 PM, Erika Meyer <ekm at seastorm.com> wrote:
>
> > > Just checking on something:
> > >
> > > If I need to do a special style for IE6 and/or IE7, am I correct in
> > > thinking that the FIRST order of attack should be conditional comments,
> > > and not star hacks?
> > >
> > > thx
> > >
> > > Erika
> >
>
> I stick with comments since I think I looks neater.
>
> But just don't do, for example, IE 6 and older, always go IE * and down.
> I've seen people forget that, and they might cause problems in later
> (hopefully more correct) versions of IE.
>
> --
> -Jack Timmons
> http://www.trotlc.com
> Twitter: @jorachim
> --
>
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
>
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt !
>



More information about the thelist mailing list