Namárië

Florian Letsch:

Who do I really have to tell why I wanted to go to Middle Earth New Zealand? I definately didn’t have to tell my friends from YOOtheme, which is why they handed me a voucher for one of the Lord Of The Rings tours when I left three months ago. Of course, now that I’m here, I have to check out the locations we all know and love from the movies.

That’s SO cool. It gave me goose-bumps looking at these photos from Florian, a good friend of mine, standing in spots where Lord of the Rings was filmed.

Coda 2 is released! Buy it today!

Panic:

A fresh approach to web code. Bursting with features but without bloat. Built to make your life better: Coda 2 is the editor you’ve always wanted.

As promised, Coda 2 is finally released. If you have the slightest urge to buy it, I recommend you do it now, because it’s for sale for only 39,99 € ($49). That’s 50% off, only today.
I bought it last night but only took a quick look. I’m so excited that I can’t wait to start working today. More about my experience with Coda 2 as the days continue and I really know how good it is. But I’ve no doubt this will be may editor of choice for a long time. So was the original Coda.

Diet Coda, the iPad counterpart is also out. I bought it but haven’t looked into it at this point. It’s 7,99€ ($9.99).

Using :before and :after to apply multiple background images

Ever wanted to apply more than one background image to an element? I rarely get in this situation, but nevertheless it happens from time to time. So since CSS3 we are able to do this a very simple:

.mydiv {
    background: url(img1.png) no-repeat 0 0, url(img2.png) no-repeat right bottom;
}

This works just fine for all mayor up-to-date browsers and even on mobile. But if you want to make this work in IE8 or just need more flexibility in positioning your images, there is another way to apply up to three background images. And let’s be honest, have you ever needed more?

The problem with positioning background images is that you can’t define the gap between your image and the right border of your element. You can only say that it should be all the way to the right or define a distance between the left border and your image. Same problem with positioning at the bottom. This can be very frustrating when working with flexible container.

Pseudo elements :before and :after

Ever heard of the pseudo elements :before :after? Both allow you to inject content into your HTML with CSS. Sounds weird, but it’s great. But be aware, it should only be used to inject style-like content. If you want to know more about those pseudo elements, I strongly recommend to watch this talk by Chris Coyier at Front End Design Conference 2011.

So in theory we have an element, which we can give a background image and two pseudo elements, whoch can be an image and therefore function as an background image. The downside is, those can’t be repeated.

Real world example

But let’s say you have a flexible element and you need an image on the left side and the other one 50px from the right side no matter how wide your element gets. (We could also apply a third, repeating image as a normal background image to .mydiv.)
We just use :before and :after, make them as big as the images are and position them where we want them to be. And everything without the need of additional markup.

.mydiv {
    position: relative; /* this is needed that the pseudo elements position themselves according to the dimensions of .mydiv instead of body */
    width: 70%; /* flexible width */
    height: 200px;
}

.mydiv:before,
.mydiv:after {
    content: ''; /* you have to define that to make the pseudo elements work */
    position: absolute;
    top: 0;
}

.mydiv:before {
    left: 0;
    width: 50px;
    height: 70px;
    background: url(img1.png);
}

.mydiv:after {
    right: 50px; /* positioning this image 50px from the right border of .mydiv wouldn't be possible with 'background' */
    width: 60px;
    height: 40px;
    background: url(img2.png);
}

So that’s it. In the example I used two separate image, but you can also use a sprite, which would be problematic when using the background.

By now I’m very often working with those pseudo elements, not only to apply background images. They are really powerful, but always keep in mind, that CSS is for styling, not massive content creation.
So both ways, classic background images and pseudo elements have pros and cons and you have to decide which way is the best solution for your problem.

If you want to play around with the numbers or just see this thing in action I made a jsfiddle for you.

Coda 2 Review by Andy Soell

Andy Soell:

Coda 2 is big. Really big. It’s been five years since the original version of Coda launched, and this new major release brings a lot of features that Coda users have been clamoring for

In-depth review of the upcoming Coda 2 by Andy Soell. I haven’t had time to read it but I don’t want to hold it back until I have. So here you go.

Interview with CSS wizard Harry Roberts

You can find the interview on TheAmazingWeb.net.

Responsive Images and Web Standards at the Turning Point

Mat Marquis:

It’s hard to imagine why there’s been such a vehement defense of the img set markup. The picture element provides a wider number of potential use cases, has two functional polyfills today (while an efficient polyfill may not even be possible with the img set pattern), and has seen an unprecedented level of support from the developer community.

Great piece by Mat Marquis about the current state of proposed solutions for responsive images markup. On the one hand there is the img set and on the other hand the, to me and many other developers, much better picture element.
Make sure to stay up to date and read the whole piece.

Coda 2 and Diet Coda will be available on May 24th

Panic:

We made Coda 2 better at everything.

So it can make you better at everything.

Finally.
There is a short video to get a first impression, but I really can’t say anything until I’ve tried it myself. There will also be Diet Coda – Coda for iPad.

I’m really excited about this update. I was waiting for it a long time and I really hope it will pay off.

Switching to English. One month later.

Four weeks ago I decided to try one month of blogging in English. It started out as an experiment and ended as the normality. I’ve to say, I really enjoyed it.
I know that my English is far from being perfect, but even after one month of writing and therefore thinking in English, I noticed that I got better.

Writing in English opened up so many more opportunities. I did an interview with Rinzi Ruiz and there will be an interview with Harry Roberts very very soon. Both were possible because of me switching to English. Because of the interview with Rinzi I got backlinks from outside of Germany and I saw tweets from English speaking people. It’s really nice to finally be able to reach a broader audience. Most of my visitors are still from Germany, but I got a foretaste how it could change in the future.
I think it’s really cool to know that everybody whom I write about and link to can read what I’ve to say and can respond to it. I hope this will happen more often in the future.

So you probably already got it: I will continue writing in English. I enjoy it and I’m very curious what can and will happen.

On thing left: I ask myself how important the domain is and if I should change it to martinwolf.org or something like visual-thoughts.com. (All the visualthought.* are already gone, I think.) But I will figure that out in the next few weeks or months.

So I hope you will continue to read what I have to say. And if not, just look at my photos.

SASS vs. LESS

Chris Coyier:

„Which CSS preprocessor language should I choose?“ is a hot topic lately. I’ve been asked in person several times and an online debate has been popping up every few days it seems. It’s nice that the conversation has largely turned from whether or not preprocessing is a good idea to which one language is best. Let’s do this thing.

Great piece by Chris Coyier. I started out and am currently using LESS, but in the last few weeks I suspected that SASS might be better in some ways. Chris confirms my hunch. So while I’m currently happy with LESS I think I’ll try switching to SASS. Although it’ll be some work to convert my LESS files, it seems to be the better alternative in the long run. I’ll keep you informed how it goes.

Designing in the browser

Edward O’Riordan:

For developers static comps provide a confusing, incomplete and often frustrating blueprint. It’s hard to get an overview of a site from images of a subset of its pages. A static comp does not describe well the purpose and potential re-usability of its contents. There is often confusion over what things should do and where they will be reused. Developers can also become frustrated with the assumptions contained in the comp.

I say Bullshit.
The trick is communication. Designers and developers have to talk with one another to get the best results. I strongly believe that you get the best product, regarding code and design, if designers works in Photoshop and developers work in the browsers and they communicate constantly about everything that comes up.
‚Designing in the browser‘ might have some advantages for the ‚client‘, but I think the ultimate goal crafting a website shouldn’t be to please the client, but dobthe best for the actual user.

But I have to agree with O’Riordan that you often should make final detail decisions while viewing the site in the browsers. Especially things like font-size or font-weight often render differently in Photoshop than in the browsers.