javascript – Format landscape print format via SCSS in Angular-ThrowExceptions

Exception or error:

I am trying to apply given styles to a page only if the user selects to print in landscape mode (selected at print prompt). I have tried the following, which does not work:

@media print and (orientation: landscape){
  .container {
    color: purple;
  }
}

I have also tried the following, which works but isn’t consistent:

@media print and (min-width: 600px) {
  .container {
    color: purple;
  }
};
How to solve:

Leave a Reply

Your email address will not be published. Required fields are marked *