Add css to nodes of certain content type
The generic answer:

if (some condition) {
  $something['#attached']['library'][] = 'yourmodule/yourlibrary';
}


If you're in a module, do it in hook_node_view() and add it to $build. If you're in a theme, do it in hook_preprocess_node() and add it to $variables.

some_condition for your case would be $node-&gt;getType() == 'your_type', in case of preprocess, the node object is in $variables['node']

You can even do it directly within a template with attach_library(), see https://www.drupal.org/node/2456753.