I have an angular v20 project.
I have implemented a class "redborder" in "src/styles.scss" file and I am trying to @use the "redborder" class from a component style file but Angular can't find the global styles.scss file to import.
Example code below. I tried again on a newly created project. I can extend to "blackborder" class in the app.scss file and it is working okay. But when I try to extend to "redborder" class, I am getting this error. "Can't find stylesheet to import."
app.html
<div class="test">hello</div>
app.scss
@use "src/styles";
.blackborder {
border: 1px solid red;
}
.test {
@extend .redborder;
@extend .blackborder;
}
src/styles.scss
.redborder {
border: 1px solid red;
}