<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,8 +1,8 @@
 == BrowserizedStyles ==
 
-Browserized Styles provides a dead simple way to create browser-specific CSS code for
-use in a Rails application. All you need to do is create a .css file targeted to
-a browser by appending an underscore and identifier to the end.
+Browserized Styles provides a dead simple way to create browser and operating sytem-specific 
+CSS code for use in a Rails application. All you need to do is create a .css file targeted to
+a browser by appending an underscore and identifiers to the end.
 
 === Installation ===
 
@@ -25,8 +25,10 @@ styles!
 
 === Identifiers ===
 
-Browsers are identified as following. You would create the CSS file as 
-&quot;yourcssfile_browsername.css&quot;
+Browsers and OS's are identified as following. You would create the CSS file as 
+&quot;yourcssfile_browsername.css&quot; or &quot;yourcssfile_osname&quot; or &quot;yourcssfile_browsername_osname&quot;
+
+==== Browsers ====
 
 IE6:       ie6
 IE7:       ie7
@@ -35,14 +37,25 @@ Firefox:   gecko
 Safari:    safari
 Konqueror: konqueror
 
-=== Limitations ===
+==== Operating Systems ====
+
+Mac OS (X or prior): mac
+Windows (any): win
+Linux: linux
+
+=== Limitations and Caveats ===
 
 At this time the plugin is only designed to work with .css files in your stylesheets 
 directory. It will not work at present with URL-based stylesheets or stylesheets not
 found in your stylesheets directory (or some subdirectory thereof).
 
+At the moment, stylesheets are included in this order: original, browser-specific, 
+os-specific, browser-and-os-specific. This is logically from least to most specific,
+but if you need a different order you will have to hack it manually.
+
 === Resources ===
 
+Blog Article: http://www.intridea.com/2007/12/9/announcing-browserized-styles
 Trac: http://trac.intridea.com/trac/public/
 SVN: script/plugin install http://svn.intridea.com/svn/public/browserized_styles
 </diff>
      <filename>README</filename>
    </modified>
    <modified>
      <diff>@@ -39,14 +39,39 @@ module BrowserizedStyles
     end
   end
   
+  def browser_os
+    @browser_od ||= begin
+      ua = request.env['HTTP_USER_AGENT']
+      return nil if ua.nil?
+      ua.downcase!
+      
+      if ua.include?('mac os x') or ua.include?('mac_powerpc')
+        'mac'
+      elsif ua.include?('windows')
+        'win'
+      elsif ua.include?('linux')
+        'linux'
+      else
+        nil
+      end
+    end
+  end
+  
   def stylesheet_link_tag_with_browserization(*sources)
     browserized_sources = Array.new
     sources.each do |source|
       subbed_source = source.to_s.gsub(&quot;.css&quot;,&quot;&quot;)
-      browserized_source = &quot;#{subbed_source.to_s}_#{browser_name}&quot;
-      path = File.join(ActionView::Helpers::AssetTagHelper::STYLESHEETS_DIR,&quot;#{browserized_source}.css&quot;)
+      
+      possible_sources = [&quot;#{subbed_source.to_s}_#{browser_name}&quot;, 
+                          &quot;#{subbed_source.to_s}_#{browser_os}&quot;, 
+                          &quot;#{subbed_source.to_s}_#{browser_name}_#{browser_os}&quot;]
+      
       browserized_sources &lt;&lt; source
-      browserized_sources &lt;&lt; browserized_source if File.exist?(path)
+      
+      for possible_source in possible_sources
+        path = File.join(ActionView::Helpers::AssetTagHelper::STYLESHEETS_DIR,&quot;#{possible_source}.css&quot;)
+        browserized_sources &lt;&lt; possible_source if File.exist?(path)
+      end
     end
   
     stylesheet_link_tag_without_browserization(*browserized_sources)</diff>
      <filename>lib/browserized_styles.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>9ab1a958dc5b34c4a7219e552b4534b53e5689f8</id>
    </parent>
  </parents>
  <author>
    <name>michael</name>
    <email>michael@0572c0d6-f9f1-4294-a55b-9f92c10757d9</email>
  </author>
  <url>http://github.com/mbleigh/browserized-styles/commit/9672819146efcefc5d9578563ac598d75be500b4</url>
  <id>9672819146efcefc5d9578563ac598d75be500b4</id>
  <committed-date>2007-12-10T08:18:08-08:00</committed-date>
  <authored-date>2007-12-10T08:18:08-08:00</authored-date>
  <message>Added os-specific detection to browserized styles.

git-svn-id: http://svn.intridea.com/svn/public/browserized_styles@37 0572c0d6-f9f1-4294-a55b-9f92c10757d9</message>
  <tree>dae07a421ee5933e131aa9df0ad60c55cb43e959</tree>
  <committer>
    <name>michael</name>
    <email>michael@0572c0d6-f9f1-4294-a55b-9f92c10757d9</email>
  </committer>
</commit>
