-1

In my shared folder . Auth folder. components are there in auth .we write some css in 'auth.component.scss',it is like parent to all components it will affect all component scss, but i don't wont effect 'y' component means all pages effecting max width :'35rem' but i want seperate for this page width:100% ; if i use /deep/ concept . when 'y' component loads width :100% effecting ,after returning to another component it will not change to actual max width 35 rem

1 Answers1

0

You can just add a specific class to children where you want/don't want the child to be applied.

::ng-deep container .page
{
    max-width: 35rem; /* Max width for all page elements */
}

::ng-deep container .apply .page
{
    /* Max width for all page elements which have a parent with 
    max-width: 35rem; 'apply' class*/
}

::ng-deep container :not(.dont-apply) .page
{
  /* Max width for all page elements except these which have a parent with 'dont-apply' class*/
    max-width: 35rem; 
}
David
  • 33,444
  • 11
  • 80
  • 118