2

Lately I started getting complaints from Internet Explorer users that they couldn't print or print preview my website anymore. Doing so would crash Print Preview and would not print the page at all. I couldn't find any useful solutions, as most complaints are about not printing any website at all, though this just concerns specific websites.

Solution In the end it turned out to be the following part in my print media queries:

@media print {
  *,
  *:before,
  *:after,
  *:first-letter,
  *:first-line {
    background: transparent !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }
}

Removing that part in all websites fixed all the issues. Does anybody understand why?

1 Answers1

0

*:first-line crashes IE11.

I haven't tested *:first-letter.

The first 3 selectors don't cause any issues.

There is a similar issue (with a fix) here https://github.com/google/material-design-lite/issues/4129.