0

I would like to have a url for an angular project which has no CSS inherited from the main CSS file. I have looked into it but when I try I keep getting the inherited CSS.

I only want to use the CSS provided on the component itself.

2

1 Answer 1

1

This is not related to Angular, that's just normal browser behavior.

You can use shadow DOM where supported

@Component({
  selector: '...',
  viewEncapsulation: ViewEncapsulation.Native,
})
export class MyComponent {}

I don't know which browsers already support that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.