xy.css

Blog

Remove @media print styles from xy.css?

A post to hopefully get some feedback on the inclusion/exclusion of @media print styles currently included in the xy.css stylesheet.

As technology continues to evolve, it seems that there is increasingly less need for printing information from the Web. So based on this idea, I’m contemplating whether or not to remove the @meda print styles from xy.css.

Here are the currently included print styles:

/* 7. print media */

@media print {

	* {
		color: black            !important;
		background: transparent !important;
		text-shadow: none       !important;
		box-shadow: none        !important;
		border: none            !important;
		float: none             !important;
		clear: none             !important;
		}
	html, body, article, header, section, footer, aside, div { 
		width: 100% !important;
		}
	a, a:link, a:visited, a:hover, a:active, abbr, acronym {
		text-decoration: none;
		border-bottom: 0 none;
		}
	h1, h2, h3, h4, h5, h6, p, li {
		page-break-inside: avoid;
		orphans: 3; widows: 3;
		}
	h1, h2, h3, h4, h5, h6 { 
		page-break-after: avoid;
		}
	thead   { display: table-header-group; }
	tr, img { page-break-inside: avoid; }
	nav     { display: none; }

}

All this weighs about 2.7 KB as-included, or 548 bytes minified. The goal of this code is to format web pages for print devices by removing floats, borders, shadows, and so on. But is it necessary, or should it be removed and made available as an add-on? Please share any feedback or opinions with a comment or email. Thank you.

Comments

Comments are closed.