Jiminy Panoz is a freelancer who has been helping French publishers make the transition to digital for the last five years. In addition to ebook conversion, he has conducted QA audits, managed interactive projects, built custom tools, and designed tailored workflows for his clients. He’s also the creator and maintainer of open-source projects dedicated to ebooks, including the blitz framework. Visit his website for more: chapalpanoz.com
As an e-production professional, you may have had your fair share of nasty rendering bugs, weird fixes, and clever tricks. We’ve all been there, making the most out of styles that have been there, like, forever to do some more complex layouts while still providing users with good interoperability.
Old habits die hard but, with the advent of web publications, the way we style publications will undoubtedly change: Some clever tricks are going to be replaced with one-liners; responsive design will become a must-have; and some specifications, like custom properties, are likely to become essential parts of our zen gardens.
In other words, we’ll have to take the great leap forwards into modern CSS. And CSS is evolving fast! So fast, as a matter of fact, that it might be difficult to keep up-to-date. But the good news is that it can help you overcome tough challenges you’ve had to deal with so far, and you may well save a lot of time, headaches, and Twitter rants.
In case you missed it, here are some of the radical changes CSS is currently going through.
Laying out has never been that simple
Do you remember that time you had to Google “how to center vertically in CSS?” It has been such a painful thing that it turned into a CSS joke.
After all these years of suffering, struggle, and misery, it looks like the CSS Working Group finally heard the complaints and has decided to press the TURBO button. As of today, not only can you vertically center with a few lines of CSS, you can also achieve more sophisticated layouts.
CSS grid, for instance, is awesomeness incarnate. It allows you to set up a grid system in a few lines of CSS and lay out the page elements in a magical way. If you didn’t take a look at this spec yet, I strongly encourage you to check out Rachel Andrew’s Grid by Example and Jen Simmons’ Experimental Layout Lab. Their work and evangelization have inspired thousands of people to give it a try, and there are very interesting things going on in responsive galleries, posters, covers, comics, magazine layouts, and more.
If text frames with smart reflow (a.k.a. CSS Regions) and exclusions look like a natural next step, designers must make some noise to make it clear to browser vendors that they want such layout modules. We indeed already tried and failed, but it doesn’t mean we can’t resurrect those specs in the CSS Grid context, in which they make a lot of sense.
CSS is not static anymore
Since the dawn of Cascading Style Sheets, authors have had to set their styles’ value once and for all. Every time they wanted to change the appearance of an element, styles had to be duplicated and changed.
Theming is one of the major use cases for custom properties, and it's actually becoming so easy that we decided to use them for Readium CSS, a styling library for EPUB Reading Systems.
Mike Riethmuller has done a lot of research and experiments on responsive and fluid typography. Thanks to the CSS calc() function, you can now use a modular scale to size elements automagically, adapt the font size and line height to the screen size, enforce vertical rhythm, etc.
Sure, the calc() function might not be the easiest CSS value to work with at first, but once you understand the math powering it, the possibilities are endless.
Typesetting that can adapt to its environment in order to improve readability. How cool is that?
Typography is becoming a first-class citizen of the web
Typography is the medium for the visual representation of language. It is the craft that brings harmony into documents, the aspect that can make or break the reading experience, and the heart of written communication. Now, the web is finally getting better at making that heart beat.
The first browsers supported online and embedded fonts. Then they started supporting OpenType features. Finally, they introduced variable fonts.
All in all, we’ll get a lot of flexibility: We’ll be able to use discretionary ligatures and alternate style sets, condense typefaces on narrow screens, adjust the weight whenever needed, and so on and so forth. Like CSS itself, (at least some) typefaces won’t be static anymore. Just take a look at the Spectral typeface and imagine the possibilities.
But it’s not just about fonts — it’s about text in general. Writing modes (vertical writing), text decoration, hyphenation, and justification will benefit from the latest specifications as well.
The future is now and you have a say
All those specifications are at least partly implemented in some web browsers. You don’t even have to wait!
What’s very important (and I can’t emphasize this enough) is that you take a look at them, experiment a little bit, and then offer your feedback to the CSS Working Group or W3C Publishing Group. Your expertise in those fields is invaluable. It can help spec editors get it right so that the entire web platform can benefit.
So start your browsers, try those new properties and values in your stylesheets, and be prepared to have your mind blown. CSS has come a long way; there’s never been a better time to learn and use it.
If you'd like to hear more from Jiminy Panoz, register for ebookcraft, March 21-22, 2018 in Toronto. You can find more details about the conference here, or sign up for our mailing list to get all of the conference updates.