September 29, 2011 archive

How To Create Github-style “Fork Me” Ribbons Using Only CSS

Githubribbons

Can you create a “Fork Me On Github” ribbon using only CSS? And have it say some other message?

That was the question I asked myself while working on a new website (for the new job). You see, the new website is going to go online in a “preview” mode and I wanted some way to very clearly indicate to visitors that the site is still in development. I’ve seen the Github ribbons on many project sites and thought this might be a great way to do the kind of marking that I want to do.

The problem is that the “official” Github Ribbons are simply images that are overlaid on your site using absolute positioning in CSS.

With an image, of course, I can’t modify the text to have my own message. And while the PSD files are available for the ribbons, I didn’t want to get into modifying images.

I figured with the modern browsers we have I ought to somehow be able to do this using plain old text and Cascading Style Sheets.

Thankfully, I found out that Daniel Perez Alvarez had already done this with a wonderful walk-through:

He steps right through the process showing you exactly what you need to do in CSS to approximate the images.

John Balogh from Mozilla wrote a similar post a bit earlier with a slightly different recipe:

Both posts were helpful to me in learning more about how you can manipulate text using CSS.

Of course, the question is…

WILL THIS WORK IN MANY BROWSERS?

Daniel Perez Alvarez includes a table at the end of his post showing which browsers would support this technique as of when he wrote the post in October 2009. I’d like to hope that two years later more browsers will support these techniques… but then again, there are still people out there using IE6 so we can’t expect newer browsers to be widely deployed.

Still, for the target audience for my new website I’m going to expect many of the users will be using newer browsers – and I’m going to see what I can do to make it degrade gracefully (as in, not appear) for older browsers.

My ribbon looks great… and no, I can’t show it to you yet. 😉

Thanks to both Daniel Perez Alvarez and John Balogh for posting their tutorials online.

Did Amazon Just Fork The Android Operating System?

Kindlefire
Did Amazon just fork the Android operating system with their Kindle Fire? That's the question asked at Mashable today in a post "Amazon Kindle Fire Just Hijacked Android where it was noted that all the promotion around the Kindle Fire did not mention Android. The key piece to me is this:

Amazon is not the first company to use Android for its devices, only to customize the UI and add its own App Store...

Still, Amazon’s customization of Android goes above and beyond re-theming the interface. Amazon has created its own apps for email, video playback (using Amazon Instant Video), music and books...

Amazon is using Android 2.3 as its base, not the tablet-specific Honeycomb, and we expect that the company has taken the opportunity to optimize 2.3 specifically for the Kindle Fire’s hardware.

Likewise, instead of applying tweaks to the basic Android web browser, Amazon chose to build its own: Amazon Silk...

The tragedy here is that the Amazon Kindle Fire will undoubtedly be a very popular device. At $199, I can see many people picking these devices up.

And it could be a great opportunity to bolster the Android ecosystem.

To encourage and nurture a further competitive marketplace for apps.

But the challenge is stated well in the Mashable piece:

We expect Amazon to start courting Android developers to make customized Kindle Fire-specific versions of their apps.

It's not an Android device... it's an Amazon device. And though it may use Android as a base, it has a highly customized layer on top.

Do we now have effectively yet another application ecosystem?


If you found this post interesting or useful, please consider either: