The problem There is a tricky issue when working with CDN during development. CDN requires an active Internet connection to actually load the script referenced as the source. If you are not online then jQuery will not load the first time you access the page or application and all other scripts will fail as they depend on jQuery which couldn't load from the CDN and had not local backup I first came across this issue when building a site that used carousels and jQuery based animations. I started working on the project while on the train and using the standard...
This is the first pass at a script to generate a basic package.opf file for epub3 ebooks using Python 2.X. What it does When you run it from the root of your ebook, the script will create a package.opf file, populate it with basic metadata as required by the epub3 specification, it will also create metadata and spine sections based on the content of the OEBPS directory. How does the script do it The script only uses modules from the default library. I want the a portable script and I don't want to worry whether a module is compatible with...
Rather than adopt a paged media model for printing HTML5/CSS pages let's look at how to move our content to make for a better printing experience. The idea for this stylesheet came from Evernote's simplified article capture mode. This will be very dependent on the layout of your page but there are some common rules we can use everywhere, both css3 and HTML. > NOTE: I wrote all the material below using SASS SCSS syntax. This will allow me to use them with other SASS-based projects and stylesheets while remaining compatible with CSS. Also note that this is by no...
I'm sad to see the potential of exclusions not being used. No browser vendor supports the complete exclusion specification. IE 10+ is the one that comes the closes but doesn't support the full set of exclusion features. This is the best we have and yes, it still feels weird to say that IE is the best we have in terms of a web feature The idea of exclusions is complementary to that of shapes. As a matter of fact, there was only one specification addressing both shapes and exclusions but they were split in 2012, I guess to ease development...
One of the things that I find infuriating about multi device development is that people can't seem to agree on a resolution or a device aspect ratio. This has become even more complicated with the advent of retina devices both hand-held, laptops and desktop devices. Trying to keep an identical layout in different screen sizes is impossible. Even if we could create identical experiences, the amount of image replacement we have to do to accommodate the different resolutions so our images will not look like crap just is more than I'd like to deal with. A compromise solution is to...
The landscape for CSS regionshttp://dev.w3.org/csswg/css-regions/ has changed drastically since the last time I visited the technology. Since the last posthttps://publishing-project.rivendellweb.net/css-regions-exclusions-shapes-and-new-publishing-paradigms/ about the technology published in October, 2013 the following events took place: - Google, citing concerns about performance, withdrew region support from the Blink rendering engine Cnet posted an article about thishttp://www.cnet.com/news/reversing-course-google-rejects-adobe-web-publishing-tech/ - Mozilla split some aspects of the CSS regions specification into another specificationhttp://dev.w3.org/csswg/css-overflow/ which they believe satisfies the use cases put forward by CSS Regions in a way that our team can support in a much more secure, reliable, and performant manner. - L. Dave Baron opposed regions...
CSS Shapes spechttp://dev.w3.org/csswg/css-shapes/ allow you a finer grained control of how you flow the text around shapes and images. Only Chrome and Opera both using the Blink rendering engine and the beta version of Safari iOS 8 and OS X 10.10 support css shapes. To illustrate the idea of shapes, look at the following image, taken from Sara Souedan's A List Apart article: !Examples of CSS Shapes//alistapart.com/d/394/shape-outside-example.jpg Look at the way the list of ingredients on the second and third recipes. That effect is achieved with shapes. The HTML is fairly simple, we create the shape by placing the element...
In creating ebooks we need to pay attention to files size... Modern fonts have many more characters than we use in normal books. Subsetting the fonts will allow us to decrease the size of the font by decreasing the number of glyphs and the the number of languages supported by the font in question. Although for me the primary reason for subseting my fonts is reducing the overall book size, there are other reasons for doing so. Some foundry's require subsetting and font obfuscation as part of their license for eBook embedding. This makes the font less appealing for would-be...
There are two new @rules in CSS well, they may not be new but they are new to me that open an awesome set of possibilities for CSS development with or without a pre-processor. @namespace CSS namespaceshttps://developer.mozilla.org/en-US/docs/Web/CSS/@namespace are the CSS implementation of XML namespaceshttp://www.w3.org/TR/xml-names11/; the technology that allows elements from different XML vocabularies to live in the same document. In the case of CSS, namespaces allow us to style elements with the same name from different vocabularies differently. For example, let's look at the a from both XHTML and SVG vocabularies css @namespace urlhttp://www.w3.org/1999/xhtml; @namespace svg urlhttp://www.w3.org/2000/svg; / This matches...
After creating all the content for an ebook there is still more work to do and I can't always remember the exact commands to run to finish the book. I do remember that I have to do the following: - Delete the existing version of the book if any to make sure that changes are picked up in the final product - Delete all .DS\Store directories created in my Mac. This may not always be necessary but avoids epubcheck errors if you forget to remove the directory from one of the files being compressed - Zip all files to the...