Tiny CSS Library For Happy Printing – Paper CSS

Category: CSS & CSS3 , Recommended | August 2, 2018
Author: cognitom
Views Total: 5,245
Official Page: Go to website
Last Update: August 2, 2018
License: MIT

Preview:

Tiny CSS Library For Happy Printing – Paper CSS

Description:

Paper CSS is an extremely light-weight CSS library for happy printing. Currently supports A3, A4 and A5 paper sizes.

More examples:

How to use it:

Add the paper.css stylesheet into the head section of your webpage.

<link rel="stylesheet" href="paper.css">

Set page size and landscape.

<style>@page { size: A4 }</style>

Add page size class to body tag as follow. Set also “landscape” if you need

<body class="A4">

Each sheet element should have the class “sheet”. padding-**mm" is optional: you can set 10, 15, 20 or 25.

<section class="sheet padding-10mm">
  <article>This is an A4 document.</article>
</section>

Changelog:

v0.4.1 (08/02/2018)

Added letter and legal paper sizes

You Might Be Interested In:


Leave a Reply