[css-d] Browser hacks

2014-03-10 Thread Chris Rockwell
Has JS hacks as well, but it's a nice reference of all the hacks that are
out there: http://browserhacks.com/

-- 
Chris Rockwell
__
css-discuss [css-d@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


[css-d] Browser hacks vs PHP vs JS for browser detection

2011-01-06 Thread Dougie McGilvray
Hi people, I just wondered if people had an opinion about the
alternative of using hacks/conditional statements, php or js to
account for browser variation?
Obviously, if you dont need php, there's no point using php for
browser variations. But checking the user agent header in php doesn't
seem to be as popular as I would have thought (although my idea of how
popular it is is based on nothing more than I havent found as much on
the web about it compared to the millions of pages on css hacks).

Is it just a case of using the right tool for the job? It would seem
logical to me - if you are using PHP anyway of course - to check the
user-agent header and add a class to the body tag? I realise people
can change the header sent by their browser, but how many people
actually do that?

PS - I realise this could get slightly off-road and head into php/js
and what have you, but it's still relevant.

Doug
__
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] Browser hacks vs PHP vs JS for browser detection

2011-01-06 Thread Chetan Crasta
On Thu, Jan 6, 2011 at 10:18 PM, Dougie McGilvray
dougie.mcgilv...@googlemail.com wrote:
 Hi people, I just wondered if people had an opinion about the
 alternative of using hacks/conditional statements, php or js to
 account for browser variation?

Whenever I need to target only IE, I use Conditional Comments. I have
found that to be the most convenient method and it keeps my main CSS
files valid and clear of hacks.
It is extremely rare for me to need to target a specific non-IE
browser. In those rare cases, I used Javascript object detection.


~Chetan
__
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] Browser hacks vs PHP vs JS for browser detection

2011-01-06 Thread Thierry Koblentz
 Is it just a case of using the right tool for the job? It would seem
 logical to me - if you are using PHP anyway of course - to check the
 user-agent header and add a class to the body tag? I realise people
 can change the header sent by their browser, but how many people
 actually do that?

fwiw, I do not use Conditional Comments and I do not do UA sniffing either. 
I use CSS filters in my styles sheets. Imho, that's where styling belong.

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




__
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] Browser hacks vs PHP vs JS for browser detection

2011-01-06 Thread David Laakso

On 1/6/11 12:23 PM, Thierry Koblentz wrote:

Is it just a case of using the right tool for the job? It would seem
logical to me - if you are using PHP anyway of course - to check the
user-agent header and add a class to the body tag? I realise people
can change the header sent by their browser, but how many people
actually do that?

fwiw, I do not use Conditional Comments and I do not do UA sniffing either.
I use CSS filters in my styles sheets. Imho, that's where styling belong.

--
Regards,
Thierry




+1
Or, cut from the chase, and be done with it :-) .
|html body {display: none;}|

Best,
Jeronimo Lopez Ramirez
Oaxaca, Mexico




--
http://chelseacreekstudio.com/
http://chelseacreekstudio.com/fa/

__
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] Browser hacks vs PHP vs JS for browser detection

2011-01-06 Thread G.Sørtun

 Hi people, I just wondered if people had an opinion about the
 alternative of using hacks/conditional statements, php or js to
 account for browser variation?


My opinion is that browser variations have to be fairly large to bother, 
but of course: designers often do, so we need methods for making 
/designers/ happy :-)


Targeting browser *versions* to account for minute variations can be a 
time consuming and never-ending task, as new browser versions add in new 
variations (of the kind that may throw some designers into a spin) all 
the time. So better draw a line somewhere in the past - a couple of 
years back -and leave the new browsers alone - apart from sending 
bug-reports.



In most cases it is browsers variations in, and lack of, support for 
parts of the CSS we use that cause (mostly visual) variations. So to me 
it becomes logical to *handle all CSS related variations in CSS*.


- Old browser versions are static - nothing changes, so we can target, 
hack or ignore them at will, as long as we make sure our methods can't 
affect new browsers - ever.


- New browser versions should be given a fair chance to grow, so they 
should never be version-targeted, hacked or ignored. Instead they should 
be served the correct styles for what they're supposed to support and 
act upon, preceded by any intermediate styles we are sure they may 
respond positively to while waiting for their proper and complete 
support of the correct styles.
Correct styles can be a somewhat moving target if we want to make use 
of the latest and greatest, so may be a good idea not to throw too 
much of that into regular production for clients. The latest and 
greatest is better reserved for personal and/or test sites, while 
waiting for standards and browsers to stabilize.



Note that browsers can spoof or hide User Agent etc., and that this 
may be done for a lot of reasons not related to your site. So targeting 
them through browser/version detection is highly unreliable at best.
Browsers can not spoof or hide their degree of CSS support - at most 
support can be turned off or in part overridden by user styles - so all 
points to that it is always best to *handle all CSS related variations 
in CSS*.


regards
Georg
__
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/