Home > Enterprise >  Angular How can i redefine global body styles in other module?
Angular How can i redefine global body styles in other module?

Time:06-04

I have an index.scss in app module. There are styles

html,
body {
        max-width: 1400px;
        margin: auto;
}

Also i have other module, module2, i don't need styles above here, how can i "turn-off" this? I tried redeclare this styles in main component in module2, but it doesn't help:

max-width: unset !important;
margin: 0 !important;

CodePudding user response:

Write your css selectors in second module main component style file. Then Set ViewEncapsulation to None in the main component in second module

  • Related