Re: [WSG] A simple IE and JS detection method?

2010-10-30 Thread David Hucklesby

On 10/29/10 3:22 PM, G.Sørtun wrote:

On 29.10.2010 23:33, David Hucklesby wrote:

Perhaps you know of a browser-safe filter for IE8?


Don't know about safe, but maybe you can find what you need here...
http://www.gunlaug.no/contents/styles/target-browser.css



Thank you, Georg. Your valuable comments in that file actually convinced
me to stay with the Paul Irish CCs method. It just seems safer, as
well as relatively easy to understand. After all, this:

  .ie8 .hacked-element {...}

seems to me clearer than

  @media all {
html:lang(en) body .hacked-element {...}
  }

:)

Cordially,
David
--


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: memberh...@webstandardsgroup.org
***



Re: [WSG] A simple IE and JS detection method?

2010-10-30 Thread Al Sparber

On 10/30/2010 11:58 AM, David Hucklesby wrote:

On 10/29/10 3:22 PM, G.Sørtun wrote:

On 29.10.2010 23:33, David Hucklesby wrote:

Perhaps you know of a browser-safe filter for IE8?


Don't know about safe, but maybe you can find what you need here...
http://www.gunlaug.no/contents/styles/target-browser.css



Thank you, Georg. Your valuable comments in that file actually convinced
me to stay with the Paul Irish CCs method. It just seems safer, as
well as relatively easy to understand. After all, this:

.ie8 .hacked-element {...}

seems to me clearer than

@media all {
html:lang(en) body .hacked-element {...}
}

:)


Indeed it is. There is nothing wrong about using CCs - absolutely 
nothing. They have been a marvelous solution medium for handling 
Microsoft browser bugs for years. People who obsess against their use 
are usually just grappling to find another obtuse way to add more 
complexity to CSS. Perhaps it's therapeutic :-)


--
Al Sparber - PVII
http://www.projectseven.com
Dreamweaver Menus | Galleries | Widgets
http://www.projectseven.com/go/hgm
The Ultimate Web 2.0 Carousel


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: memberh...@webstandardsgroup.org
***



RE: [WSG] A simple IE and JS detection method?

2010-10-30 Thread Thierry Koblentz
  Thank you, Georg. Your valuable comments in that file actually
 convinced
  me to stay with the Paul Irish CCs method. It just seems safer, as
  well as relatively easy to understand. After all, this:
 
  .ie8 .hacked-element {...}
 
  seems to me clearer than
 
  @media all {
  html:lang(en) body .hacked-element {...}
  }
 
  :)
 
 Indeed it is. There is nothing wrong about using CCs - absolutely
 nothing. They have been a marvelous solution medium for handling
 Microsoft browser bugs for years. People who obsess against their use
 are usually just grappling to find another obtuse way to add more
 complexity to CSS. Perhaps it's therapeutic :-)


Add more complexity? Really? I can always remember the syntax for the two or
three CSS filters I use, while I'm never 100% sure how to properly write
CCs.

But let's take a concrete example. http://projectseven.com contains this:
!--[if IE 6]
style
.p7TTMcnt {zoom: 1;}
.p7TTMcall {display: none !important;}
/style
![endif]--

Instead of this CC, the styles sheet could include these two simple
declarations in the appropriate rules:
_zoom:1;
and 
_display: none !important;

I'd say this approach is less bytes and better for maintenance. Imho, it's a
no brainer unless you are the kind who obsess about validation :)

On the second pahe I've checked
(http://www.projectseven.com/products/menusystems/pmm2/index.htm), I found
these:
!--[if IE 7]
link href=/06_includes/ie7.css rel=stylesheet type=text/css
![endif]--
!--[if IE 6]
link href=/06_includes/ie6.css rel=stylesheet type=text/css
![endif]--
!--[if IE 5]
link href=/06_includes/ie5.css rel=stylesheet type=text/css
![endif]--

These are three extra HTTP requests. Even if these files contain no more
than two rules each (sic):
--
div.prewrap {overflow-x:scroll;overflow-y:visible;}
pre {font-size: .9em;}
--
#mainbox, #mainbox #maincontent #datatable a {height: 1%;}
div.prewrap {overflow: auto !important;}
pre {font-size: .9em;}
--
body {text-align: center;}
#masthead, #layoutwrapper, #footer {text-align: left;}
--

Since they target IE 5, 6, and 7. Everything could be taken care of via CSS
filters. Keeping everything in the styles sheet rather than spreading rules
across four different files and adding expensive HTTP requests. 

David's use of a CC for IE8 is legitimate, because there is not much better
solution; but imho, using CCs as the primary tool for styling across
browsers is plain wrong. 

I think using CCs for styling is like using table for layout. We should use
such techniques when we have no other/better choice.

--
Regards,
Thierry
www.tjkdesign.com | www.ez-css.org | @thierrykoblentz






 







***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: memberh...@webstandardsgroup.org
***



Re: [WSG] A simple IE and JS detection method?

2010-10-30 Thread Al Sparber


On 10/30/2010 3:29 PM, Thierry Koblentz wrote:


Add more complexity? Really? I can always remember the syntax for the two or
three CSS filters I use, while I'm never 100% sure how to properly write
CCs.


I simply expressed an opinion, as you did. Readers can choose to agree 
or disagree with either, as hundreds have done before us :-)


That's what makes the field democratic, rather than dictatorial.

--
Al Sparber - PVII
http://www.projectseven.com
Dreamweaver Menus | Galleries | Widgets
http://www.projectseven.com/go/hgm
The Ultimate Web 2.0 Carousel


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: memberh...@webstandardsgroup.org
***