Bootstrap Print CSS
Bootstrap 5 no longer includes custom CSS for printing - with the CSS in this project you can add it back.
Note: This should improve the experience when printing, but there are bugs and inconsistencies with the way that browsers handle printing so testing is recommended.
- Download the latest release
- Clone the repo
git clone https://github.com/coliff/bootstrap-print-css.git
- Install with npm
npm install bootstrap-print-css
- Install with yarn
yarn add bootstrap-print-css
You can include the CSS with one of the following:
bootstrap-print.cssto your main CSS. This will mean one less HTTP request compared to loading it separately.
Load it as a separate CSS file
<link rel="stylesheet" href="/css/bootstrap-print.min.css" media="print">
Credits & Thanks
All credit for the CSS work goes to the HTML5 Boilerplate and Bootstrap teams. I've just copied the Bootstrap 4 print styles and packaged them up for Bootstrap 5.