How to attach browser-specific stylesheets in D8? In D7 it's possible to attach a css file based on browser sniffing, like this:

drupal_add_css(
  $path_to_css,
  array(
    'browsers' =&gt; array(
      'IE' =&gt; 'lte IE 9',
      '!IE' =&gt; FALSE
    )
  )
);


Drupal 8 does away with drupal_add_css in favour of #attached =&gt; array('css' =&gt; array( $path_to_css )) but how, in that situation, can you achieve the same thing.

(Nb. I'm not actually using D8 yet, but where things can be done the D8 way in D7, I'm adopting them to ease the learning curve to come!)
I think this'll do it in Drupal 7, it should be the same for Drupal 8:

$build['#attached']['css'][] = array(
  'type' =&gt; 'file',
  'data' =&gt; $path_to_css,
  'options' =&gt; array(
    'browsers' =&gt; array(
      'IE' =&gt; 'lte IE 9',
      '!IE' =&gt; FALSE,
    ),
  ),
 );