Roots Discourse

How to add a scss file to a single template

Hii,
I am building a theme for my website using sage. I am looking for a way that how to add a scss file to a single template?
I am not sure how to do this.

This is a very broad question, so I’m not sure how it applies to Sage specifically. We try to keep things in this forum focused on the Roots stack rather than general WordPress questions.

If you want a specific stylesheet on a specific template, you can just enqueue it conditionally, i.e.:

if (is_template_you_want()) {
  wp_enqueue_style( 'stylesheet-handle', \Roots\asset('styles/sheet-name.css'), ['any-dependencies'] );
}