<p>I'm wondering if there's any way to write CSS specifically for Safari using only CSS. I know there has to be something out there, but I haven't found it yet.</p>

[{'answer_id': 69446, 'author': 'dawnerd', 'author_id': 69503, 'author_profile': 'https://Stackoverflow.com/users/69503', 'pm_score': 2, 'selected': False, 'text': '<p>So wait, you want to write CSS for Safari using only CSS? I think you answered your own question. Webkit has really good CSS support. If you are looking for webkit only styles, try <a href="http://qooxdoo.org/documentation/general/webkit_css_styles" rel="nofollow noreferrer">here</a>.</p>\n'}, {'answer_id': 69485, 'author': 'John Calsbeek', 'author_id': 5696, 'author_profile': 'https://Stackoverflow.com/users/5696', 'pm_score': 0, 'selected': False, 'text': "<p>You'd have to use JavaScript or your server to do user-agent sniffing in order to send CSS specifically to Safari/WebKit.</p>\n"}, {'answer_id': 70827, 'author': 'Rich Adams', 'author_id': 10018, 'author_profile': 'https://Stackoverflow.com/users/10018', 'pm_score': 3, 'selected': False, 'text': '<p>There are some hacks you can use in the CSS to target only Safari, such as putting a hash/pound (#) after the semi-colon, which causes Safari to ignore it. For example</p>\n\n<pre class="lang-css prettyprint-override"><code>.blah { color: #fff; }\n.blah { color: #000;# }\n</code></pre>\n\n<p>In Safari the colour will be white, in everything else it will be black. </p>\n\n<p>However, you shouldn\'t use hacks, as it could cause problems with browsers in the future, and it may have undesired effects in older browsers. The safest way is to either use a server side language (such as PHP) which detects the browser and then serves up a different CSS file depending upon the browser the user is using, or you can use JavaScript to do the same, and switch to a different CSS file.</p>\n\n<p>The server-side language is the better option here, as not everyone has JavaScript enabled in their browser, which means they wouldn\'t see the correct style. Also JavaScript adds an overhead to the amount of information which needs to load before the page is properly displayed.</p>\n\n<p>Safari uses WebKit, which is very good with rendering CSS. I\'ve never come across anything which doesn\'t work in Safari, but does in other modern browsers (not counting IE, which has it\'s own issues all together). I would suggest making sure your CSS is <a href="http://jigsaw.w3.org/css-validator/" rel="nofollow noreferrer">standards compliant</a>, as the issue may lie in the CSS, and not in Safari.</p>\n'}, {'answer_id': 71750, 'author': 'Bryan M.', 'author_id': 4636, 'author_profile': 'https://Stackoverflow.com/users/4636', 'pm_score': 6, 'selected': True, 'text': "<p>I think the question is valid. I agree with the other responses, but it doesn't mean it's a terrible question. I've only ever had to use a Safari CSS hack once as a temporary solution and later got rid of it. I agree that you shouldn't have to target just Safari, but no harm in knowing how to do it.</p>\n\n<p>FYI, this hack only targets Safari 3, and also targets Opera 9.</p>\n\n<pre><code>@media screen and (-webkit-min-device-pixel-ratio:0) {\n   /* Safari 3.0 and Opera 9 rules here */\n}\n</code></pre>\n"}, {'answer_id': 71892, 'author': 'Matt Farina', 'author_id': 11910, 'author_profile': 'https://Stackoverflow.com/users/11910', 'pm_score': -1, 'selected': False, 'text': '<p>This really depends on what you are trying to do. Are you trying to do something special just in safari using some of the CSS3 features included or are you trying to make a site cross browser compliant?</p>\n\n<p>If you are trying to make a site cross browser compliant I\'d recommend writing the site to look good in safari/firefox/opera using correct CSS and then making changes for IE using conditional CSS includes in IE. This should (hopefully) give you compatibility for the future of browsers, which are getting better at following the CSS rules, and provide cross browser compatibility. <a href="http://creativebits.org/webdev/ie_conditional_css" rel="nofollow noreferrer">This is an example.</a></p>\n\n<p>By using conditional stylesheets you can avoid hacks all together and target browsers.</p>\n\n<p>If you are looking to do something special in safari check out <a href="http://trac.webkit.org/wiki/WebDevelopers" rel="nofollow noreferrer">this</a>.</p>\n'}, {'answer_id': 18700779, 'author': 'Kald', 'author_id': 1726044, 'author_profile': 'https://Stackoverflow.com/users/1726044', 'pm_score': 0, 'selected': False, 'text': '<blockquote>\n  <p>@media screen and (-webkit-min-device-pixel-ratio:0) {}</p>\n</blockquote>\n\n<p>This seems to target webkit(including Chrome)... or is this truly Safari-only?</p>\n'}]
['https://Stackoverflow.com/questions/69440', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/8970/']