Mostly for speed reasons, all Sass parsing is actually done only once 
each time changes are made; it doesn't get parsed for every request. 
Thus, there's no way to know which browser is requesting the stylesheet. 
You can, however, do some clever tricks to get browser-specific 
behavior. If you detect the layout engine via Javascript (or 
server-side, although that's a bit harder), you can add it as a class to 
<body>. For example, if they're using Gecko, you could make it <body 
class="gecko">. If they're using IE, it might be <body class="ie">. Then 
using the new parent selectors in 1.7, you can add specific behavior for 
that browser:

#sidebar
  :float left
  :margin-left 2em
  .ie &
    1em

That's what I do on occasion.

- Nathan

Steve wrote:
> Is there any way to know what browser is requesting the stylesheet so
> that it could be custom generated as necessary for various browser
> differences? Like a browser "if" statement/block?
>
> Thanks,
> Steve
>
>
> >
>
>   


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Haml" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/haml?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to