“[ !IE]” conditional comments in Haml

后端 未结 4 1722
忘掉有多难
忘掉有多难 2020-12-05 02:53

In a HAML doc, I have:

/[if IE]
  This is IE
/[if !IE]
  This is not IE

The first conditional evaluates properly in IE (and presumably in F

4条回答
  •  隐瞒了意图╮
    2020-12-05 03:19

    It's been answered, but for those looking for the TL;DR version:

    /[if IE]
      This will only be rendered in IE
    
    /[if lte IE 8]
      This will only be rendered in IE 8 or less
    
    = surround ''.html_safe, ''.html_safe do
      This will only be rendered in NON-IE browsers.
    

提交回复
热议问题