When working on this website, we stumbled upon an unexpected problem: How should we create the text highlighting in our headers giving each line a larger padding to the right? It took us a while, but in the end we found a clever solution.
The problem resulted from a static mockup that looked quite simple. We wanted the markup to be simple as well and as semantic as possible, so we started with just a paragraph:
<p>
Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.
Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Donec id elit
non mi porta gravida at eget metus.
</p>
p {
padding: 5px 45px 0 9px;
}
But there was a problem.
Using display: block didn’t work: while it respects a given padding, it creates a single big box and doesn’t apply to lines.
Using display: inline didn’t work either, as it just creates a single line of text. So we thought: display: inline-block to the rescue! But that didn’t change the situation. We had to add additional markup for each line to get things working:
<p>
<span>Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis </span>
<span>vestibulum. Morbi leo risus, porta ac consectetur ac, vestibulum </span>
<span>at eros. Donec id elit non mi porta gravida at eget metus.</span>
</p>
p span {
padding: 5px 45px 0 9px;
display: inline-block;
margin: 4px 0 0; // needed to separate the lines
}
This finally worked perfectly.
Nevertheless, we had another requirement: our site knows two states – a wide and a narrow one, applied responsively based on the windows size (just give it a try and resize this window). So a line was no longer a line: what might be single line in the wide version could become one and a half lines in the smaller version. We needed to add more span elements to our highlighted paragraph. This led to a new problem: every few words, for each span, the padding - needed at the beginning of the line - was repeated. Sure enough this was not what we were after.
To get rid of the newly introduced gaps, we added a matching negative margin to the right of all spans, hence removing the left padding. This nearly made everything work as needed: no gaps between lines and everything wrapping nicely when resizing the window. But the left padding we just removed was now also missing at the beginning of the lines.
What saved us was a rather neat idea: we added a pseudo element before each span. By positioning this element absolutely without specifying the top but setting a left coordinate, it automatically aligned at the beginning of each line:
p span::before {
width: 9px;
height: 34px;
display: inline-block;
content: " ";
position: absolute;
left: 0;
margin-top: -5px;
}
Job done! And this is what the different layers look like when relocated by a few pixels:
A few quick responses on Twitter:
@nilshoerrmann <span>That</span><span>makes</span><span>very</span><span>ugly</span><span>code</span>. <span>Unmaintainable.</span>
This is true – the described method makes the markup harder to read. But in our case maintenance is not a big problem because we have a simple XSL template that generates the needed markup on the fly. I’ll post more on this later this month.
@nilshoerrmann @yatil I made something similar with display: inline: dabblet.com/gist/1753471 This way you don’t have to markup each line.
Really nice. But this gets extra bonus points as it also solves the problem of a larger right padding:
@nilshoerrmann dabblet.com/gist/1753540 /cc @yatil
Fancy!
In case you are using Symphony, you certainly know Subsection Manager and Date and Time, two extensions I have been developing over the last years. Both have moved to a new home at Github.
But maybe you have not used Symphony yet, or haven’t found an excuse to use it lately. If you have not already fallen in love with XSLT and the simplicity of the backend, you’ll have to check it out now in order to try these two extensions:
Symphony offers an easy way to create sections and model the fields the way you like. Nevertheless, from time to time you need to connect the content of two sections: you might have an articles section you’d like to link images to, or you are building a books section you’d like to connect with authors. With a default Symphony install, you can use select boxes or Selectbox Link Fields to create these connections, but you will not be able to see and manage all your content at once. Subsection Manager tries to solve this problem by providing an inline management of another section’s content. By adding the Subsection Manager field to your parent section, you can integrate another section as a subsection. The subsection’s entries can be managed through the inline interface as well as the regular Symphony section entry list. You can opt for inline editing only by simply hiding the specified section from the menu.
As of version 2.0, this extension bundles a second field type: Subsection Tab. It provides a tabbed interface of subsection entries that is well-suited to manage multilingual content. All tabs are static and have to be set up in the field settings.
Subsection Manager is now available under its new address at github.com/hananils/subsectionmanager.
Date and Time offers an easy interface providing a calendar widget that helps creating multiple dates and date ranges. The field respects the system settings and displays date and time accordingly. Nevertheless, it is capable to read and understand all relative date formats known to PHP 5.
It’s now available at github.com/hananils/datetime.
Both extension are released under MIT license and available for free. If you’d like to contribute, feel free to fork the source and send a pull request.
If you are using one of the two extensions as submodules in your projects, check out this excellent guide by Nils Werner over at symphonyextensions.com which also covers moved sources.
Last autumn, British newspaper The Guardian released its own iPad app. Quite late as one could say, but the developers took their time for a good reason: in my eyes, this is the first truly convincing daily newspaper app created for the iPad.
The iPad version came with a generous testing period that ended early this year, making it possible to really get an overview over a longer span of time. The app’s design is modern, fits the device and does not try to imitate the paper version. Nevertheless, the Guardian’s visual style is maintained by sticking to the well-known colour scheme and font selection. All articles reside on pages side by side, the content itself is scrollable - wonderful!
A detailed review of the app with screenshots and background information has been posted by the Ministry of Type. Aegir Hallmundur summarises it perfectly:
The simplicity and straightforwardness of the Guardian app is (like its iPhone version before it) going to stand for quite a while as the acme of how these things should be done.
The fine art of creating professional icons is only mastered by a handful of people. Drew Wilson is one of those few: he created Pictos, an icon set that has been very popular over the last years. Anyone surfing the web will have come across it to at least some extent. Now there is a new service available that provides the icons as personalised web fonts: Pictos Server.
Similar to web font hosters like Typekit or Fontdeck, the icon fonts will be included as short code snippets. The service also offers options to bundle only a selection of needed icons. This opens up new options for web designers, because icon fonts use less disk space: they load faster than static graphics and they can be scaled losslessly. In this matter, Jon Hicks published an article about using fonts to add icons to websites by making use of the new data attributes just before Christmas. Even if there are still a few problems to be solved as Eric Eggert pointed out in response to that article, things are moving into an interesting direction.
For me there is only one general question: who is Pictos Server aimed to? With $49 for the basic and $99 for the pro plan, subscriptions are still quite expensive in my eyes. How many icons need to be served to a common website? If you need to pay as much money for only a few icons as you would for the entire Typekit library, I guess many people will stick to customized pixel graphics. With its vector and pixel sets, Pictos is competing itself. Let’s see how prices will change over time.
Update, January 25th 2012: That was fast – there’s now an additional personal plan for $19.
TV hadn’t impressed me in a while and so it was pure luck that I discovered German broadcaster Das Erste would air the “acclaimed BBC series” Sherlock that one evening. Lucky me!
Until then, I hadn’t heard of this new adaptation of Sir Arthur Conan Doyle’s classic stories, but my silent love for British humour and British crime series made me curious. It was a fascinating experience: not only does the BBC bring Arthur Conan Doyles stories to the present, they also impress with a special kind of story-telling that combines visual and textual language.
All modernisations are done casually. I don’t know how hardcore fans of Sherlock Holmes might feel about it, but for me, the series is a real break with the clichee of Holmes as we know him. Nicotine patches instead of pipes, taxis and busses instaed of historic, Victorian London. City lights, a metropolis’ glass fronts – all this is a step forward: now, it seems to be just a crime series like any other - besides the fact that no one is amused that there is a Sherlock Holmes and a Doctor Watson.
What makes Sherlock special, is the introduction of an additional layer: deductions, text messages and websites overlay the acting as accompaning story.1 As if it was the most normal thing in the world, the audience is expected to make a connection between text messages appearing on the wall behind John Watson or weather broadcasts Sherlock is browsing with gestures on his smartphone. Text and image form a unit, no annoying counter-cuts with close-ups of mobile phones or computers needed.2 This combination of textual and visual layers creates very close and special television aesthetics, keeping the narrative pace high.3 This way, action and thought of the main characters coincide for the audience.4
Even if the audio commentary of the DVD suggests something else, this has been done before. MK12 used this method in Hollywood movie “Stranger than fiction” to visualise Harold Crick’s world of facts and figures:
Nevertheless, the way Sherlock makes use of this technique is felicitous as it’s not just a purely visual effect but an essential part of the story.
There is an interesting detail regarding the German version of the series: the fonts used for text overlays have been replaced and unified. While the original series makes use of AF Generation Z and P22 London Underground,5 the German version uses FF Officina nearly exclusively. An exception are translations of blog entries that are shown directly on laptops on screen in the original version.
Personally, I have to admit that I prefer the typography of the German version – it looks more precise and balanced. But it changes the content’s connotation. Not in the sense that the German translations are wrong, no, but regarding the associations around the fonts in use.
The original makes two statements: on the one hand, AF Generation Z connects to the internet generation with its mobile phones and devices, on the other hand P22 London Underground sets a clearly British exclamation mark. Both fonts fit the series because they underline the aspects of modernisation as well as the affiliation of the main characters to the City of London.
The German version excludes the British aspects completely and chooses a font that connects to the times before mass distribution of mobile phones and the internet. In different context, Erik Spiekermann, designer of FF Officina, wrote on his blog:
After all, when Officina was designed in the late 80s, it was meant to be used in correspondence, to replace typewriter type. It subsequently shares quite a few of those characteristics.
It would be interesting to know for which reasons fonts have been replaced in the German adaption. Coincidence or concept? I can only guess.
These days, the second series started in the UK – German TV will broadcast it this summer. Meanwhile, you can have a look at Sherlockology, a fan site adicted to Sherlock, gathering facts and figures around the world’s only “consulting detective”.
Sadly the BBC doesn’t offer stills of the series containing the overlays, so I can only link to the official trailer for the German DVD by Polyband showing at least a few overlays. ↩
As refreshing the text overlays may look, as shocking are the computer interfaces shown on screen. Their designs look like from the year dot. You get the references: Mephone instead of Mobile Me - but why didn’t they take visual inspiration as well? ↩
The continuous cutting with its fadings and insertions supports the story’s tempo. And the very modern, cinematic music gives it an additional drive. ↩
It must have been a long, creative process to create the series’ styles as you can see when watching the unaired pilot that comes with the first series’ DVD: it give a surprisigly open and honest insight on how things evolved. ↩
It has been quiet here for the last months as we’ve been silently working on improvements to this site, to make things more maintainable and extensible for us.
Some old articles and functions all still missing, but we will add them back step by step. The goal is to develop this site more continuously, speaking of both design and content. Johanna’s site has been restyled as well.
I’m a little late for a review of the year’s events. But a lot has happened that justifies my delay. So, what was that remarkable in 2011?
Since the end of 2010 it has been clear that something would change in my working life. Finally, early 2011, Johanna and I founded our own design studio hana+nils. We now work full time designing websites and texts with an eye on typography. We were lucky to start with a few very interesting projects that we will show on our website over time. A big thank you to all our clients.
We have been using Symphony as our content management system for all web related projects for years and we have been very happy that the second Symposium took place in Cologne in autumn. Many thanks to Jonas and Michael who organised the event with us. It was fun to meet a lot of Symphony developers and users again and to get to know others in real life for the first time. Thanks all for coming!
The most important moment of the year has been a private one: on August 4th 2011 our little son Max was born. His smiles and laughter make me forget the screaming. Although the nights have become shorter, I can’t imagine life without him anymore. Right now he’s sleeping peacefully: that’s my writing time, thanks boy!
There are always themes that go along with the year. For me, this has been a short British TV series we thoroughly enjoyed: Sherlock. It seems like I’m developing a passion for British detective stories. These days, the second series started in the UK – I’m curious to see how the story will evolve.
And now I’m off for 2012 …
Since the release of the first versions of Symphony 2 I have been confused about the version numbering. New features have been added in minor point releases for a while and now we are jumping right from Symphony 2 to Symphony 3. Something feels strange about that.
Nevertheless, I have to admit that it really makes sense to me that Symphony 3 is Symphony 3. There are too many fundamental changes under the hood for it to be released as Symphony 2.1: new file structures, new interfaces. The real problem is the way version numbers have been given to the 2.0 releases.
Craig commented on my review of the Symphony Symposium by saying:
Once 3.0 is final, we really do hope to get a better handle on the release cycle and version numbers. Small bug fixes and trivial changes will go into minor point releases (e.g. 3.0.*), hopefully on a fairly predictable schedule. Anytime there’s a significant change, like a new feature, that will go into a moderate point release (3.1, for instance).
What does this mean if we look at the Symphony 2 branch in retrospect? By looking through the release history, I came up with the following diagram that corrects version numbers based on feature additions:
While we cannot change the given version numbers anymore, we should think about renaming Symphony 2.0.8RC3 which is yet to be released. It is a highly improved version of the system. For me, it’s the most stable Symphony release I’ve ever worked with.
I think it should be released as Symphony 2.1.
As we see, there will always pop up small new bugs in this Symphony branch. Most of these could be fixed easily by the community and then released as pure bug fix and minor point releases. I mailed the Symphony team about this idea today. So we’ll see what happens.
From June 12th to 13th 2010, the first Symphony developer conference took place in London, UK. Coming from all over the world, we met to get to know each other, to talk about Symphony and to see the core team’s plans for the future. Time for a review.
It was an exciting weekend for various reasons. Exciting to meet the people behind the forum nicknames. Faces, voices, persons. Exciting to see this charming online community called Symphony in real. I was impressed by the spiritedness, the cheerfulness and the fun. For me the words Symphony and sympathy have been linked together in real life.
The weekend started early on Friday when Johanna and I left for the airport at 3:15 am in the morning. The first meeting with Michael in the lobby of the hotel followed by Stephen, Jonas, Nils (the other one) and Ruth in the evening. Eating pizza and pasta, having a pint of beer, mixing up languages all the time. The official programme followed the next day while meeting the other Symphony members: Marco and Maurizio form Italy, John, Fazal, Nick, Carl from the London area and of course Allen, Craig and Joe as the hosts of the event.
The warm welcome and introduction by Allen and Craig was followed by a number of presentations highlighting Symphony’s capabilities and showing what we may expect to see in the future.
Leading up to the Symposium, it became silent on GitHub. The core team’s working repositories for Symphony 2.1 vanished so we could expect something to happen, a beta release during the weekend which - by all means - would be accompanied by the final release of Symphony 2.0.8.
Things worked out differently.
Symphony 2.1’s new name is Symphony 3 which will introduce a more file based system structure and the usage of DOMDocument throughout the core. I’m still not entirely sure if I consider the step reasonable to directly jump from 2.0 to 3.0. On the one hand I think the new features have been overdue for a while, but the version numbers become more and more illogical and the release cycle becomes confusing and unsteady. We have to expect a clear break between version 2 and 3 which is problematic as it was when switching between Symphony 1.7 and 2.0: as both systems will not be compatible to each other, it will become hard for developers to maintain two separate branches of their extensions in the long run. It’s an ambivalent step for the documentation as well: we now have a corner stone we should build on in a solid way. But will this still be done now that most of the core concepts have to be redefined? I’m torn apart but it will be exciting to see things evolving.
The first Symposium offered a fascinating weekend with little sleep but lots of talk. I hope that the ideas to create international development networks will push the collaboration to a new level.
When shall we meet again?
A Symposium in Germany?
How about that?
Durchgedreht 24 is a very special kind of film festival, as all screened movies are created during the very first 24 hours of the festival weekend. To make this task even more challenging, a few rules are to be kept in mind: The movie may not exceed five minutes in length, it must include three words or phrases selected from a yearly changing list, it must be filmed with one single camera and it may not be cut.
The festival started as a student project of ten in 2003 and was quickly established as a yearly event in Braunschweig, Germany. After having worked behind the scenes on the cinematic trailers, the website and the organisation of the award ceremony for the first three years, I presented the final evening together with Verena Hoffmann in 2007.
More Information can be found on the festival website durchgedreht24.de.