0

Here is a nice trick by Mr. Bennett McElwee to print html content using css visibility attribute in @media print. But what if the content is styled using remote css files as in this example.

<div class="text-primary">
  Test Tesing Testing
  </div>

where text-primary class applied from remote bootstrap.css file.

2
  • what's the problem? Commented Jul 31, 2016 at 10:15
  • text-primary class should make the font color to blue. But in print it is black only Commented Jul 31, 2016 at 10:29

1 Answer 1

1

You have to override the Bootstrap @media print { }

@media print{
    .text-primary{
        color: #337ab7 !important;
    }
}

The problem is, that this are the Bootstrap specifications.
The second method is to remove the line from the bootstrap CSS file. (But I think that this is not possible because it is a remote file as you said).

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.