Transcript
More and more these days, CSS is being used to control the styling of things other than websites.
One type of media that CSS can apply styling to is paged media - things like digital magazines and ebooks or a website in the form of a print stylesheet.
There are some properties that only apply to this media type. The widows
and orphans
properties are two that allow us to control how lines of text flow around page breaks.
In this episode we’ll learn about:
- Paged media
widows
andorphans
Paged Media
When writing CSS, we are normally styling content that is destined for being displayed on a screen.
But there’s a whole range of properties specifically for paged media which describes how a document can be flowed into a series of pages.
It adds functionality for pagination, page margins, page size, orientation, and extends generated content to enable page numbering and page headers and footers.
The closest thing to working with the CSS Page spec that I’ve come across in real-world web development is creating print stylesheets. We touched on this in "Episode 13: Media Queries".
When dealing with this completely different medium of printed content, there are a couple of CSS properties available that don’t apply to screen media. Let’s have a look at two for controlling the flow of text between pages.
Continue reading %AtoZ CSS Screencast: Widows and Orphans%
by Guy Routledge via SitePoint
No comments:
Post a Comment