SVG Clip Path and Shapes. An interesting alternative

We’ll borrow a play from the SVG playbook for this post. We’ll use clip path to generate masks around an image to control what the user gets to see and what shapes the image takes without changing the image itself. We’ll look at the process and then we’ll build an e-book with examples to test if this works with iBooks (and whatever other reader you want to test with) and how can we better leverage the feature in our reflowable projects. CSS clip-path CSS clip-path attribute is the star of the show either in CSS, via SVG or a mix

Trimming the CSS fat

Trimming the CSS fat After reading India Amos Degristling the sausage: BBEdit 11 Edition I thought I’d share my tricks for making CSS files as small as possible. While I learned these tricks as a front end developer they apply equally to creating content for e-books. One thing that has always stopped me from fully embracing frameworks is that they use an insane amount of code and it’s really difficult to trim until I’m done with a project and, at that time, I usually don’t want to have to look at CSS for a few weeks. In researching front end

XML Workflows: Tools and Automation

Because we use XML we can’t just dump our code in the browser or the PDF viewer and expect it to appear just like HTML content. We need to prepare our content for conversion to PDF before we can view it. There are also front-end web development best practices to follow. This chapter will discuss tools to accomplish both tasks from one build file. What software we need For this to work you need the following software installed: Java (version 1.7 or later) Node.js (0.10.35 or later) Once you have java installed, you can install the following Java packages Saxon

XML Workflows: CSS Styles for Paged Media

This is the generated CSS from the SCSS style sheets (see the scss/ directory for the source material.) I’ve chosen to document the resulting stylesheet here and document the SCSS source in another document to make life simpler for people who don’t want to deal with SASS or who want to see what the style sheets look like. Typography derived from work done at this URL: The following scale (also using minor third progression) may also help: Feel free to play with these and use them as starting point for your own work 🙂 The project currently uses

XML Wokflows: From XML to PDF: Part 2: CSS

With the HTML ready, we can no look at the CSS stylesheet to process it into PDF. The extensions, pseudo elements and attributes we use are all part of the CSS Paged Media or Generated Content for Paged Media specifications. Where appropriate I’ve translated them to work on both PDF and HTML. Book defaults The first step in creating the default structure for the book using @page at-element. Our base definition does the following: Size the page to letter (8.5 by 11 inches), width first Use CSS notation for margins. In this case the top and bottom margin are 0.5