@Import rule erroring out while using CSS Isolation

Viewed 48
@import url('https://fonts.googleapis.com/css?family=Playfair+Display:400,400i,700,700i,900,900i');

@import url('https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i,800,800i');

I am trying to get the to render CSS styles using CSS Isolation in .NET Core 6.0 and I get the error below. Is there a way around this?

Error RZ5000 @import rules are not supported within scoped CSS files because the loading order would be undefined. @import may only be placed in non-scoped CSS files.

1 Answers

When we look at the documentation, we seem to have overlooked the following sentence.

enter image description here

And this thread also mentioned this issue and have no answer. You can check Razor class library (RCL) support, hope it can help you. If not, you'd better find another way to do it. This issue is not worth spending any more time on it.

Related