Notes and news, insights and inspiration from the autonomous collective mind of GS.

Posts in Development

Typographical Orphans Begone!

Steve Schrab by on November 1, 2012

Not long ago, I wrote my first jQuery plug-in called deOrphan. It's a plug-in for removing typographical orphans in text elements you specify. What are orphans? An orphan is a single word that appears by itself at the end of a paragraph. There’s more info on Wikipedia if you're interested.

This script goes through a list of elements, looks through their text, and finds the last two words of the elements and joins them together with a non-breaking space. The result can be seen below.

deOrphan - before and after example

There are other options for server-side plug-ins that can do this, but I'm not aware of too many client-side scripts that do this. This can helpful when you don't have control over the server envorinment you're building on.

It's an extremely small detail, but since it doesn't take much effort to implement it, why not do it? I'm not even asking you to go the extra mile, I'm just asking for a few steps.

Enjoy.

https://github.com/megasmack/jquery.deorphan.js

Categories: 
Share:
1

Advice From a Successful App Developer

Chris Krasovich by on August 23, 2012

At GS we’re lucky to have employees with wide and varied personal interests. For example, did you know that we have a beekeeper on staff? Or a major golf aficionado? We do! And sometimes those personal interests intersect beautifully with the work we do at GS, serving to amplify our client offerings in new and exciting ways. Kirill Edelman is a perfect example of the kind of employee with interests that improve our work. He has a passion for apps and has developed several of his own: Super Durak, Overdub, and Artifact, now selling through the Apple App Store. We thought it would be interesting to pick Kirill’s brain and get his input on some of the trials, tribulations, opportunites, and pitfalls associated with app development. Here are the results. If you have any additional questions for Kirill, please leave them in the comments.

Kirill's Apps

What made you get into iPhone app development?

I think the point where I decided to start learning about making apps was Apple’s announcement that they weren’t going to support Flash on their mobile devices. As a seasoned Flash developer I was outraged and headed to AT&T to get an iPhone right away to see what they were all about. I was hooked from there.

For me, the most appealing aspect of app development is the quick production pipeline – you can submit an app and have it in the store within a week, making money. There are some hoops to jump through, but Apple keeps making it more and more accessible and easier to work with.

How did you come up with the idea(s) for your apps?

I find inspiration in frustration: when I want to do something with my phone but can’t find an app for it. For instance, like any other aspiring bathroom singer I also sing in the car. Sometimes original beats or ideas for a melody come to me, and I have no way to capture them apart from recording the sound of my voice with my phone. I couldn’t find an app that would also let me overlay voice “drums” and voice “base” on top of my recording. That’s how the idea for Overdub was born.

How long did it take for you to get your first app from idea to the App Store?

My first app took a few months to build and had a pretty steep learning curve for me. I brainstormed my user interface on paper and made a lot of mistakes, but apparently the app itself fills a particular niche of amateur musicians, as it became pretty popular with practically no marketing effort on my part. I even made it to the “DJ and Producer Apps” featured list in the App Store.

What was it like when you sold your first app?

I couldn’t believe that someone would actually pay for something I made, but apparently there are a bunch of people out there who find my app useful enough to give me money! Mind blown.

What advice would you give to a new app developer?

Save money on books; there are plenty of free tutorials online.

If an app you’re making isn’t an original idea, you’d better have one hell of a marketing department to promote it.

Users have no interest in reading your instructions. Ideally, your app shouldn’t require much in the way of explanation; people should just “get it” right away.

It’s really hard for a small developer to get an app critiqued on app review sites. If you have some connections, or marketing muscle, use them. If not, use Twitter, make YouTube videos, make Facebook pages, lean on friends and relatives to spread the word, make a Website to go along with your product. The App Store alone doesn’t drive sales very well at all. The basic advice is: Plug your apps every way you can because it doesn’t matter how awesomely fantastic your app is if nobody knows about it.

To get featured in the App Store, implement a new feature from the next release of the iOS. For example: We’ll see a lot of PassKit apps featured when iOS 6 rolls out.

No more fart apps. Please. Make cool, smart, innovative stuff.

Design matters big time.

What are are the challenges of developing for the iPhone?

The nature of the device. An iPhone or iPad tends to introduce some interesting challenges into development. One of the recurring problems I’ve run into is the device’s lack of RAM. Unlike programming for the desktop, or for the Web, you have to be very conservative and careful with how much memory you’re using. iOS will unceremoniously crash your app after a single warning if you use up too much.

Another challenge is collecting crash reports. Typically when your app crashes on someone’s device (and it will crash all the time, trust me on this), you won’t get any error logs or anything to help you debug. Luckily now there are some third party services that help you collect this information.

What advice would you give to companies looking for the right app development agency?

Look for a company with diverse digital talent. Making an app is a bit like making a Website – you'll need designers, application developers, managers, and copywriters. A good-looking Web portfolio will probably translate well into a good-looking app.

Share:

People in Advertising Are Not Normal

Chris Krasovich by on July 19, 2012

A smart designer I know sent this infographic around a couple of weeks ago, and I keep coming back to it. In addition to breaking down how agency parties are different from parties in the mainstream business sector, it provides a helpful reminder to all agency types that goes a little something like this: You are not the norm.

It can be easy to think that our familiarity with new tools and emerging technologies and platforms should extend to the audiences we serve, but the fact is that Joe Average just doesn’t want or need to be as engaged in those topics as the creatives, technophiles, and account folk that populate agencies. It’s a mistake – and a dangerous one – to assume that we accurately represent the interest level of non-agency audiences when considering how best to serve them, as the infographic below from the good folks at Heat makes all too clear.

Share:
2

Responsive vs Adaptive

Eric Dyken by on June 14, 2012

As we hurtle at light speed toward mobile overtaking desktop devices, some new philosophies in Web design have surfaced – philosophies that redefine how we approach our clients’ needs.

At GS Design, we’re exploring a new approach to Web design and development called “Mobile First.” Directly related to this strategy are two Web terms to digest: “responsive” and “adaptive.” What do they mean? Aren’t they the same thing? It seems there are as many opinions on the correct definition of these two terms as there are Web developers.

Let’s break it down.

Both terms can refer to allowing a Website to provide the best possible experience on a variety of devices, whether it be mobile, tablet, or desktop.

Responsive

The term responsive design can be credited to Ethan Marcote, who coined the term in his book Responsive Web Design to describe using “fluid grids, fluid images/media & media queries.” This basically speaks to the layout’s ability to respond to the user’s technology (browser or device) to best meet the user’s needs.

Although Marcote is credited with the term, he’s really only describing the most modern incarnation of this Web design strategy. The idea of tailoring a Website based on the user’s technology has been around for quite a while, as developers have always been programming to accommodate different experiences (like our old friend Internet Explorer). After Marcote’s book was published, his publisher later clarified their stance on responsive design to mean any technique used to achieve this end, not just fluid grids and media queries. For example, if we use jQuery or other javascripts to adjust the layout along with CSS media queries, that’s also part of a responsive strategy.

Resolution Independence: 2012.dconstruct.org responsive layout. A “fluid” grid allows the layout to “respond” to its respective device (or browser window) width.

Adaptive

Aaron Gustafson is the author of the book Adaptive Web Design. According to Gustafson, adaptive Web design “is about creating interfaces that adapt to the user’s capabilities (in terms of both form and function).” He also states that “adaptive web design is just another term for ‘progressive enhancement’ of which responsive web design can (and often should) be an integral part, but is a more holistic approach to web design in that it also takes into account varying levels of markup, CSS, JavaScript and assistive technology support.” By these descriptions we can come to the conclusion that adaptive Websites are those that adapt their design, structure, and content to best meet the needs of their user, with responsive design being a subset of adaptive.

Some examples of an adaptive strategy:

  • Programming touch event functionality, such as swiping through a gallery, for devices that understand touch events.
  • Adding geolocation functionality for devices that can track the user’s location (e.g., “Use my current location”).
  • Programming a canvas element to replace an image if the user’s browser supports HTML5.

Basically, responsive and adaptive aren’t mutually exclusive concepts. They go hand in hand. Adaptive is an overall approach, and responsive is sort of a bullet point within that approach. It could be argued that responsive is more about the layout, and adaptive is more about enhancing the experience, but I’ll leave that for you to decide. Combined, they’re part of a strategy to provide the best experience based on the technology being used. It’s all about exploiting the capabilities of the user’s environment to create a more authentic and personalized experience.

Share:

The Museum That Roars

by Scott Kurtz on May 31, 2012

QUICK – What do you picture when you hear the words, “motorcycle museum”?

Do you think of a dusty warehouse somewhere with a bunch of bikes lined up like dominoes, just waiting for someone like Pee Wee Herman or perhaps an actual 7-year-old to tip one over and start a slow-motion chain reaction?

Or do you picture a gorgeous riverfront campus and a beautiful world-class facility – featuring interesting, informative, and interactive exhibits – that rivals some of the most famous museums in the world?

H-D Museum

If you’re not familiar with the Harley-Davidson Museum in Milwaukee, you might tend toward the former image. And that’s too bad. Because if you’ve ever seen it for yourself … well, you know what I’m talkin’ about!

Closing that “perception gap” was one of the challenges put in front of GS Design when we were asked to build a new Website for the Harley-Davidson Museum. The old one just didn’t quite convey what a magnificent place the Museum is. It didn’t give site visitors a good sense of the depth and richness of Harley-Davidson history; the overall quality of the Museum visitor experience; or how much the facility has to offer in terms of group tours, special activities, event venues, and more.

I like to think we met that challenge very well – and then some. The new site is beautiful, easy to navigate, and looks great on tablets. The quality of the imagery we had access to helped make sure of that. 

We also incorporated modern best-practice programming to ensure the site was as flexible, efficient, and easy to maintain as possible. Everything from minimal http requests to the use of Web fonts throughout the site was designed to keep the tech low-weight and the pages quick to load.

The reactions to the Website, like the H-D brand itself, have been legendary. I think our client Lucy Burke, H-D Museum’s eMarketing project manager, put it best:

“The new site is a work of art. What a great source of pride to be able to showcase our Museum in such a dramatic, artful, and functional way. The new site expands the Museum visitor experience to riders and non-riders, and serves as an enticing gateway to accessing and experiencing the H-D brand and the H-D Museum campus experience.”

But don’t take my – or Lucy’s – word for it. Check it out at h-d.com/museum. While you’re there, be sure to check out the “Visit” section … so you can plan your trip to the H-D Museum. And see for yourself why GS Design feels so honored to be associated with this amazing place.

Share:

Wille G Davidson: Honoring a Legend

Chris Krasovich by on May 17, 2012

Thanks Willie!We’re always thrilled to be asked to work on the interesting projects that come to us from long-time client Harley-Davidson, but when a project is also an opportunity to pay tribute to a man of legendary status who has inspired legions and changed lives – even lives right here at GS – the project becomes something even bigger.

The Willie G. Davidson microsite was such a project.

Willie’s name is synonymous with the Motor Company, and as his role shifted and his incredible career in Styling ended, Harley-Davidson wanted to give riders around the globe a chance to express their appreciation to Willie G. directly. That’s where we came in. We were called on to create a microsite that would accept and display UGC and messages to Willie. The team worked efficiently and in a close, iterative fashion with the client, and created a site that allows users to engage with Willie G. in a truly special way. Messages from near and far have been coming in – and by far we’re talking locales like Bahrain, Brazil, Australia, Thailand, and more – with expressions of appreciation that are truly memorable.

We’ve had opportunity to add thank-you messages of our own, but really, for us, the whole project was one big thank you to the man and the client who has played such a large role in GS’s success.

Share:

The Journey of an HTML Email

Aaron Konkol by on May 3, 2012

You know how different browsers display Web pages differently? From a development standpoint, it takes some massaging and understanding the shortfalls of various browsers to get a page to display the way you would like. When it comes to HTML email, getting your message to display as you would like is a bit more complicated. Web browsers (IE, Firefox, Safari, and Chrome) all use the code you write to display a page verbatim. Email clients, on the other hand (Outlook, Hotmail, Apple Mail, Yahoo Mail, Gmail, etc.), insert, update, and neglect code that the developer writes. Litmus has a great infographic that explains the convoluted process an HTML email takes from designing and coding to the recipient’s inbox.

The Road to Rendering an HTML Email
Share:

The Ability to Make A Difference

Amie Abendroth by on April 26, 2012

My very first blog post, I suppose it’s appropriate that it marks a significant point in my career. For the past six months or so I’ve had the pleasure of working on a project that has been truly fulfilling. I’m pretty passionate about my projects in general. I consider myself a “dedicated” project manager – but this, this project was different. I felt like I was doing something for the greater good. And I know that my fellow GS team members felt the same way.

Once you meet Damian Buchman you’ll be drawn into his story and his vision. You won’t be able to help it – everyone I’ve worked with on this project has stated, “As soon as I met Damian, I knew I had to be involved.” We are no exception.

Damian is a childhood cancer survivor, a one-in-a-billion survivor to be more specific. But that’s just a small piece of his story. He’s a visionary, whose passion for life and making a difference in the lives of others drives him.

Damian’s vision is “The Ability Center” (TAC), where everyone has the opportunity to play. Imagine a facility. Where no one is left on the sidelines. Where people with disabilities and the able-bodied public feel equally comfortable. Where “accessibility” is a part of the natural landscape. Where sport chairs share equal status with running shoes. Where the only stares are those of wonder and amazement. The Ability Center is just such a place.

Sounds incredible, right? We thought so. GS Design was approached by mutual friend and colleague Clay Feller. Damian and Clay explained that they were looking for GS to create a Website. The Website would need to tell the story, it would need to be authentic, and, of course, be highly accessible. It should be professional and beautiful, and set the foundation for what would likely be a multi-phased approach.

We jumped at the chance to work on this project. Our core team met and developed personas for each of our potential audiences – helping us define the best way to architect the site. User Experience Architect Jim Broennimann lead the charge as we identified the goals of the Website for phase one, before TAC is a reality, and then the goals for phase two, once TAC is built.

We worked very diligently to research not only the standards on accessibility but also strove to exceed those standards, similar to the way TAC will exceed the standards of accessibility once it’s built. The website features large type, high-contrast colors, and large clickable areas. Our designers, Nick Krueger and Andrea Zehnder, led by Creative Director Sean Donnelly, found the perfect balance of beauty and function.

It was developed on Drupal CMS as a low-cost and user-friendly solution for Damian to easily update his site going forward. We also were diligent not to include any “hidden text” and used Web fonts versus graphical fonts further ensuring accessibility. Developers Steven Schrab, Jeffrey Schrab, and Kirill Edelman are known at GS for their attention to detail and innovative technology solutions, and it shows.

We were also happy to have our Social Media Strategist Chris Krasovich help make some recommendations so that Damian could streamline his social media presence and drive traffic to his new site.

In addition, our design team also defined the photography style and GS photographer Mark Brautiguam took many of the photos of the board of directors, the story photos, and the photos of Damian right here in our GS studio.

Damian was by far one of the most prepared clients I’ve worked with. He had much of his content, articles, thoughts, and business information ready for us to work with. Mike, our writer, masterfully crafted those thoughts and content into engaging copy that tells a wonderful story on the Website.

The Ability Center Website was launched at an incredible event at the Hyatt in downtown Milwaukee on March 22, 2012. It was attended by more than 200 people who all share Damian’s vision and are working toward making TAC a reality. The GS team, including Jeff Prochnow, Sean Donnelly, Andrea Zehnder, Jim Broennimann, Mike Zimmerman, Jeffrey Schrab, Steven Schrab, and I, all attended. It was incredibly rewarding to hear the genuine gratitude from all of our new friends involved with TAC and to meet so many good, kind people. And, our very own graphic designer Andrea Zehnder volunteered her time outside of her busy work schedule to design a printed brochure that, similar to the Website, is an educational and inspirational piece that was handed out at the event.

I could go on and on about the project, the people, and the vision for The Ability Center, but instead it’s my great pleasure to invite you to check out The Ability Center Website. As a GSer, as a parent, as a person – I will tell you that this has been such an incredible learning experience and one that I’m really proud to have been involved in. I’m confident that once you read about Damian and TAC you’re going to understand exactly what I’m talking about. And maybe, hopefully, you’ll help to make it a reality too.

Share:

Make a Fast Website or Lose Your Eyeballs!

Jeffrey Schrab by on March 29, 2012

I may sound like a “Get off my lawn!” old-timer, but my first Web access was through dial-up phone connection. Ah, my loyal USRobotics 9600-baud MODEM.

T’was a piece of crap.

My current iPhone has Web access speeds at least 40 times faster than that. My cable modem connection is about 80 times faster than that. And it’s still not enough. The New York Times ran an eye opening article citing the fact that while Web browsing we have gotten use to speed. And we want more. The one-line summary of the article is that studies by Google and Microsoft suggest that the goal for Web page loading should be sub-second and that a difference of as little as 250 milliseconds can be enough to turn site visitors away. This is down from the 2-second goal that use to float around a few years ago. Compare this with the thinking held back in 2007 that suggested a 4-second rule – and an 8-second rule back in the ’90s – and you see where expectations are going!

In terms of the industry of Web development, this affects EVERYBODY:

  • Graphic designers need to produce artwork that can rely on CSS-defined styles (vs. graphic images) as much as possible.
  • Front-end developers need to squeeze every byte they can – optimize PNGs, don’t use redundant asset references, don’t make CSS references to graphics you don’t need.
  • Application developers needs are about server-side code performance; whenever possible cache, cache, cache!
  • System administrators need to tweak Apache and MySQL configurations for performance (because default settings just don’t cut it) and look into CDN services along with AppDevs.
  • Project managers need to make sure the above people are doing their jobs! And share industry thinking with clients to communicate the value their agencies are providing them.

This is all a lot of work up front and requires eternal vigilance to assure that page delivery times stay consistently fast. But in order to give our clients the edge over their competitors, we have to do it!

 

What’s in the Future? WHAT? The future is ALREADY HERE!?

The need for speed is colliding with a new development – the New iPad and its Retina Display. Very high resolution displays are coming. First it was the iPhone 4, then to the 2012 edition of the iPad, soon to notebook computers and then to desktops. Oh, and your HDTV may start looking bad, too, with 4K HD standards coming. So at the very same time that Websites need to deliver pages faster than ever, those pages will have larger than ever file-size images attached to them.

Ouch!

 

What to do?! Get SPDY!

Some help is on the way. The venerable HTTP protocol that is used to deliver Web pages has not been changed much in 12 years. Google is looking to change that. SPDY is a revision to the HTTP protocol that seeks to reduce the overhead of page delivery. SPDY requires that both the Web browser a site visitor is using AND the Web server serving the requested page support the SPDY protocol. Google Chrome has supported SPDY for awhile now. Firefox supports SPDY, but only recently and only if one enables it. Simply put, this is an evolving technology that isn’t pervasive – yet. Furthermore, Microsoft also recognizes the need for a faster Web and working to take the goals of SPDY even further. This will hopefully lead to specifications that ALL software products can use to make a faster Web for all of us, regardless of the browser or device we use.

Categories: 
Share:

New iPad: the Human Eye Meets its Match

Steve Schrab by on March 22, 2012

The New iPadFor those of you not watching Apple’s product announcements like a hawk, just recently they unveiled the new iPad. One of the big, new features is the Retina Display. For iPhone folks, this is nothing new. We’ve had Retina Displays in our phones for a couple of years now. However, we’ve never seen a retina-quality display at this size. It squashes more pixels into a 9.7-inch space than your 1080i HD TV.

Daring Fireball has a pretty thorough review of the The New iPad (3). What jumped out at me was this:

“All of Apple’s software has been updated to retina-caliber graphics. (If they missed anything, I didn’t spot it.) Most third-party apps, of course, have not yet been updated. Just like with the iPhone 4, these up-scaled graphics are passable, but annoying. They stick out like sore thumbs after using true retina-display-optimized apps. Websites, too – most graphics and images on the web are behind the curve, as of today. Text looks great in Safari, but non-retina images look slightly blurry. The iPad display is so good that it shows, like no device before it, just how crummy most images on the web are.”

Web imagery takes a leap with this device. So what’s the best way to take advantage of it? GS has already been moving toward this space of high-res displays in a couple of areas. For example, we’re big proponents of using HTML Text and Web Fonts. New iPad users of sites using web fonts (for example, this one) will be treated to crisp, sharp text! We’ve dabbled with SVG graphics. Again, sites with these elements (for example, this one) will remain sharp and glorious. Another technique to take advantage of is to use more CSS-created elements vs. graphics. For example, using CSS-created rounded corners on elements instead of creating this effect using graphical files. So sites using a lot of CSS-created “chrome” (for example, this one) should scale up nicely on the new iPad. The great thing about these three techniques is that they’re actually more efficient than their graphical variants. They use less bandwidth to deliver and, therefore, download faster and speed up the user’s experience. But where does this leave photographs?

Photographs really have only one way to be properly delivered on the Web. That’s the JPEG format. While this format has done a noble job of compressing large photographs without losing a ton of quality, we’re starting to hit a bit of a bandwidth wall. The obvious solution is just increase the resolution on photos used on the Web. Maybe even do a little client-side sniffing and only deliver those images to users of high-density displays. Problem is, are we really going to ask mobile users who have limited speed or limited bandwidth (or, in most cases, both) to download an image that could be four times the file size? I want my photos to look great, too, but I also don’t want to go over my bandwidth limit each month.

So what’s the solution? I’m afraid there isn’t an easy answer at the moment. While there are solutions, it’s hard to know what the user will want and when. Someone without a high-res display has no use for high-res images. Users of high-res displays may appreciate those slick graphics when they’re on their personal WiFi connection, but they may hate you when they’re on a 3G network waiting forever for images to download and watching their bandwidth get chewed up.

It’s an interesting problem to solve. I, for one, can’t wait to see what it looks like when we strike that balance.

“The Retina Display’s overall effect is like that of high-end glossy magazine print — except that it updates live. It’s living breathing print.” —John Gruber

GSDesign.com on a Retina Display iPad

Update: July 23, 2012

Want more? Check out this article I wrote for the BizTimes on improving your website to accommodate retina displays.

Share:
9

Practical SVG Usage

Steve Schrab by on December 21, 2011

Scalable Vector Graphic (SVG) files are nothing new; they’ve been around for years. Despite this, we still haven’t seen them used as broadly as they could be. Given that the goal today is to build increasingly responsive and adaptive sites that look great not only on high-res desktop displays but also in the palm of your hand on mobile devices, bypassing SVG is a huge oversight. SVG files shine in this area as they’re completely resolution independent and (typically) have a smaller file size than their bitmapped brethren. If you’re targeting an iPhone with a Retina display, do you really want to make 3G users download a bigger file just to take advantage of that screen? Why not scale a single SVG file without wasting additional bandwidth?

Comparison of PNG scaling versus SVG scaling

Comparison of PNG scaling versus SVG scaling.

Of course, SVG files aren’t appropriate for every image type. Photography is still in the realm of the JPEG, and many sites use photography as their main graphic elements. Where you don’t need photography, CSS3 is able to fill in a lot of gaps as far as design elements are concerned. So, then, where is SVG appropriate? How about one of the first elements to generally appear on a web page – the logo.

The logo

Many logos are already created in vector drawing programs, like Adobe Illustrator. Yet they’re often rasterized and placed on the page as a PNG or GIF file. Why not preserve their original precision?

Consider the following:

  • A brand logo is an ever-present element on your site and one that is found on every page. Spending time optimizing global elements is always time well spent.
  • A logo isn’t simply some random bit of chrome or graphical glitz. To some extent, it can be considered “content.”
  • If you’re into print style sheets, an SVG file’s resolution independence can make your site’s printouts look as good as your company stationary.
  • A logo is a key part of your website. It’s your brand. Your identity. Certainly it’s worth a little extra time and effort.

How do I do it?

In Adobe Illustrator you can save SVG files out directly. In the dialog box, choose the profile SVG Tiny 1.2., which is meant for devices with reduced computational and display capabilities. Sounds perfect for mobile devices, doesn’t it? Uncheck the "Include XMP" box (You have to click “More Options” first). Including the XMP data will add a lot of unnecessary metadata making your file size much bigger. Since this data is irrelevant on the web and we really just want the vector info, we can get rid of it.

Once you have your SVG file, you can link to it using image tags or CSS background images. Previously you needed to link them via object tags, but since we’re not looking to add any scripting or interactivity to our SVG files, linking them via a static image method should be appropriate. However, be sure to tell your server admin to set up a mime type for ‘image/svg+xml’ for your SVG files. It may not be set by default.

In your image tags, you can even set a width as a percentage to make your logo perfectly scalable with your responsive layout. You’ll find your logo looks great at all resolutions, with no multiple image swapping and still just a tiny file. Many of the logo files I've used in SVG format have ended up being as small as 2KB with gzipping. For example, the GS logo on the corner of this site.

What about browser support?

All modern browsers have good SVG support. Many have had it for quite some time. Internet Explorer has support as of version 9. Using a JavaScript library called Modernizr, we can easily test for SVG support and swap a vector file for a well-supported bitmap file. Just put Modernizr on your site, and it takes care of most of the work for you. You'll need to create a fallback PNG file, but by using these methods you can avoid the browser downloading both files.

For example, in CSS just use .no-inlinesvg and .inlinesvg before the selector with your background image.

.no-inlinesvg #logo {
	background: url('logo.png');
}

.inlinesvg #logo {
	background: url('logo.svg');
}

For image tags, you can use JavaScript to swap your files.

<script>
$(document).ready(function() {
	if (Modernizr.inlinesvg) {
		//SVG.
		$('#logo').html('<img src="logo.svg" alt="Your Company" />');

	} else {
		//No SVG.
		$('#logo').html('<img src="logo.png" alt="Your Company" />');
	}
});
</script>

<a href="/" id="#">Your Company</a>

While many browsers support SVG files, they don’t all support SVG use in IMG tags or in CSS backgrounds. For example, using SVG inline has only been supported in Firefox since version 4.0. So the venerable Firefox 3.6 would receive the PNG fallback in this case.

What is the payoff?

The mobile space continues to grow. Android and iOS both have devices with scalable high-res displays. Instead of making bigger high-res bitmaps that will inevitably have a larger file size, simply use a single small SVG file that will look great regardless of how large or small displays become.

On the desktop when you use browser zoom, your SVG files will scale just as flawlessly as your HTML text. What’s more, the latest version of Safari allows you to double tap with two fingers (assuming a laptop trackpad or Magic Trackpad) and zoom your viewport much like you do on the iPhone. Again, your SVG files will scale beautifully.

Speaking of Mac OS X Lion, there’s evidence that future versions of OS X will take advantage of high-res displays. You can scale the display up without changing your resolution. There's similar development within Windows 8 as well. While display resolutions are still not high enough to really justify this, you can see a day where we’ll have a Retina caliber display for our desktop machine.

With a combination of web fonts (for greater use of HTML-rendered text), CSS-rendered graphics (rounded corners, gradients, drop shadows, etc.), and SVG files, we can future-proof (or at least future-friendly) our websites by making them more resolution independent. Sure there are a number of steps beyond just linking to a file, but we can start with one of the single most important graphical elements on our site. The logo. It’s an element that will help you dip your toe into the manner in which we may be making websites in the future.

Share:
1

You know you’ve got a rockstar developer when ...

Aaron Konkol by on December 8, 2011

he’s featured on Engadget for a little something he dreamed up and built in his spare time. Our very own GS funnyman Kirill Edelman has got some wicked skillz when it comes to developing applications. Two years ago our company identified development of mobile service offerings as an area of focus for. Kirill took it upon himself to shift from Flash Actionscript developer to iOS App developer.

After working on the first GS iPhone app, he has created two on his own (Overdub and Artifact). And another GS app is in the works.

Check out the Artifact app review on Engadget. Keep on rockin', Kirill.

Artifact in use

Share:

FED Stuff - November Edition

Steve Schrab by on November 30, 2011

FED Stuff is a collection of the little CSS and Front-End Developer tricks that I’ve learned each month. There is a lot to learn. Some may be new to you. Some may be what you assumed is common knowledge. But we can't know for sure unless we share. This is my attempt to share them. Little tricks add up to big things.

Rich Snippets Testing Tool

This is a great tool by Google for testing rich snippets of microdata, microformats, or RDFa information. This type of information is being used a lot more in search services. Include rich snippets for shopping, recipes, reviews, video, and events, and music. By using this testing tool, you can make sure your rich snippet data is formatted correctly.

CHECK IT OUT: http://www.google.com/webmasters/tools/richsnippets


Media Queries and Meta Viewport tags

I've been messing doing a lot of work with mobile web apps this past month and found a lot of pain points. For example, setting the viewport to the same size as the device width...

<meta name="viewport" content="width=device-width">

...doesn't necessarily give you the exact pixel resolution width of your device. Many devices give a pixel display much smaller than their screen resolution. The iPhone 4 has a resolution of 960 x 640. Yet if you query it's width, it returns 320px. The manufacturer mostly likely found this the best way to display a web site that wasn't specifically designed for mobile (which most are not). Either way, it can make fitting your design to different sized screens a real pain. Using a combination meta viewport tag and width media queries are the best way to insure your site looks as intended at the target resolution. Though it can require a bit of tinkering to get it right. Read this article at quicksmode.org for the full scoop.

READ MORE: http://www.quirksmode.org/blog/archives/2010/09/combining_meta.html


Portrait and Landscape Media Queries

Speaking of media queries, detecting Portrait versus Landscape is nothing new. What I didn’t know is that media query isn’t set by the hardware telling the browser what orientation the device is being held at. What it’s doing is testing whether the browser window is taller than it is wide. So if you make your browser window skinny, it’ll swap to portrait mode.

/* Portrait */
@media screen and (orientation:portrait) {
    /* Portrait styles */
}
/* Landscape */
@media screen and (orientation:landscape) {
    /* Landscape styles */
}

This is not only cool for detecting the orientation of a device, but you could even re-layout the page for desktop browser windows that are longer than wide. It’s also a great way to do some quick testing.

One more note, older versions of Internet Explorer (8 and less) will not recognize the media query tags within your CSS documents and just render the styles within. So make sure you put the default styles after the changed values so they get overwritten properly. If landscape is your default style, set the portrait styles first, then override them with the landscape ones. Which leads to our next topic …


“Mobile First” CSS and working with legacy Internet Explorer

Nicolas Gallagher wrote great article on some techniques of writing your CSS Mobile First (building your styles up from mobile to desktop) and still working around IE 6/7/8 (which don’t understand Media Queries). He also talks about using Sass (A CSS Pre-processor) can help, but you can still use these techniques without it. Definitely worth a read.

READ MORE: http://nicolasgallagher.com/mobile-first-css-sass-and-ie/


Handy Tools - cubic-bezier.com

A tool that helps you work with the easing functions of CSS3 transitions and animations. It’s pretty pimp.

CHECK IT OUT: http://cubic-bezier.com/


jQuery 1.7 Released

Probably old news by now as this happened early in the month, but there's a new version of jQuery. This new version features new event APIs of .on() and .off(). From the examples on the press release, it looks like these are unified way of attaching events.

MORE INFO: http://blog.jquery.com/2011/11/03/jquery-1-7-released/

Share:

Refresh Your Cache Yo!

Steve Schrab by on November 10, 2011

refresh buttonHow many times have your heard that? You ask a developer to make a change to your website, they tell you it’s done, you go to check it out, and it appears nothing has been done. They speak the phrase they’ve probably said so many times in their life, “It must be cached. Just force refresh.”

For those who don’t know, your cache is temporarily stored files on your computer so future requests for those files can be served faster, rather than re-downloading, say, an image file that likely doesn’t change. Cache can get in your way when it’s caching assets on your computer that have been updated on the server. Most of the time, this isn’t an issue.

While I’m guessing the majority of readers are already familar with cache issues, you may not be aware of quick keyboard commands for your browser to bypass your cache. As a developer, I use these so often that I often bypass my cache every time I hit the refresh button, whether I need to or not.

So without further ado, here’s a handy-dandy list of keyboard commands for bypassing and refreshing your cache:

  • Internet Explorer
    Hold the Ctrl key and press the F5 key.
    Hold the Ctrl key while clicking the refresh button in the toolbar.
     
  • Firefox
    Hold down both the Ctrl and Shift keys and then press R. (Alternatively, hold down the Ctrl key and then press F5.) On a Mac, use the Cmd key instead of Ctrl.
    Hold down the Shift key and click the Reload button on the navigation toolbar.
     
  • Safari
    Hold down the Shift key and click the Reload toolbar button.
     
  • Chrome
    Hold the Ctrl key and press F5.
    Hold the Shift key and press F5.
    Hold the Ctrl key and click Reload button.

Check out this Wikipedia entry for an exhaustive list of ways to refresh your cache in just about any web browser:
http://en.wikipedia.org/wiki/Wikipedia:Bypass_your_cache

Categories: 
Share:

FED Stuff - October Edition

Steve Schrab by on October 31, 2011

FED Stuff is a collection of the little CSS and Front-End Developer tricks that I’ve learned each month. There is a lot to learn. Some may be new to you. Some may be what you assumed is common knowledge. But we can't know for sure unless we share. This is my attempt to share them. Little tricks add up to big things.

Using ems

Want to use em units instead of px for a more flexible layout? There’s a little math to it, but it’s pretty simple. Most browsers have a default font size of 16px. The em unit is based on the size of the relative font. So if the page’s font is 16px, that would equal a size of 1em. Simple enough. What if you want a font size of 12px though? That's where this handy formula comes in. This is from Ethan Marcotte's Responsive Web Design. A book I think all Front-End Developers should read (link below).

target / context = result

In this case, 12 divided by 16 = 0.75. So a font size of 0.75em is equivalent to a font size of 12px. You can use this for font sizes, but also any other measurement. Padding, widths, margins, etc. This really helps a layout maintain it’s integrity when a user increases or decreases their font size.

MORE INFO: http://www.abookapart.com/products/responsive-web-design


-prefix-free

The gist of this JavaScript is that it allows you to write standards based CSS and not worry about vendor prefixes. The script itself runs through your CSS and adds the vendor prefixes that your users’ browser needs. So instead of writing:

-webkit-transition: all 0.5s ease;
-moz-transition: all 0.5s ease;
-ms-transition: all 0.5s ease;
-o-transition: all 0.5s ease;
transition: all 0.5s ease;

You could just write:

transition: all 0.5s ease;

And prefix-free will take care of everything for you. The only issue I've come across is where you need to target older versions of webkit that make use of the “old style” of creating CSS gradients. Other than that, it’s brilliant.

MORE INFO: http://leaverou.github.com/prefixfree/

Categories: 
Share:

FED Stuff - September Edition

Steve Schrab by on September 30, 2011

FED Stuff is a collection of the little CSS and Front-End Developer tricks that I’ve learned each month. There is a lot to learn. Some may be new to you. Some may be what you assumed is common knowledge. But we can't know for sure unless we share. This is my attempt to share them. Little tricks add up to big things.

-webkit-font-smoothing

Get a little fine tuning on fonts in webkit browsers. Using ‘antialiased’ seems to clean up fonts that are looking a little heavy. I used this on the GS site when the Museo font was looking thicker than it did in Photoshop.

	-webkit-font-smoothing: none;
	-webkit-font-smoothing: subpixel-antialiased;
	-webkit-font-smoothing: antialiased;

MORE INFO: http://www.usabilitypost.com/2010/08/26/font-smoothing/


:target pseudo class

You can style in-page anchor targets depending on the whether the target was used in the URL or not. For example:

<style>
	#supercool {
		font-size: 1em;
	}
	#supercool:target {
		font-size: 1.5em;
	}
</style>

<div id="supercool">This is sweet!</div>

So, if you go to the URL of http://super.com/index.html, you’ll see the div with a regular font size. If you go to http://super.com/index.html#supercool, it’ll have a larger font size. Or you could use some kind of CSS animation to bring attention to the section you just anchor linked too. Kinda sexy in my opinion.


Changing the “Tap” Color on Mobile WebKit

Allows you to change color of the tap highlight that occurs in mobile WebKit browsers. The default is an opaque black.

html {
	-webkit-tap-highlight-color: rgba(201, 224, 253, 0.8);
}

MORE INFO: http://davidwalsh.name/mobile-highlight-color


Border-radius and IE9

The CSS3 property border-radius is fully supported in IE9. You can even use it without a vendor prefix. However, you need to specify the radius of all four corners of the box even if all those values are the same. While the spec allows you to use something like border-radius: 8px and have all four corners be the same, IE9 requires you to list those values separately. So you need to use border-radius: 8px 8px 8px 8px to get it working.

Thanks a lot IE9.


Rules about styling headings within Section tags

While this is an interesting article about styling heading tags with Section tags, what interested me most was further definition of the often misunderstood section tag.

GIVE IT A READ: http://www.stubbornella.org/content/2011/09/06/style-headings-using-html5-sections/

Categories: 
Share:
4

What’s your favicon strategy?

Steve Schrab by on September 29, 2011

faviconI’ve always joked with my team that the favicon is the most important part of a website. When we start creating a website, the first thing I do is create the favicon. Then I send the dev address around to the rest of the team and proclaim “we’re half done already!” But seriously, I love favicons. They’re just one part of a ton of little details you can add to a site to make it that much cooler. And I really dig putting little fit and finish details on a website.

ICO Favicon

I always start by making a favicon ICO file using Dynamic Drive’s FavIcon Generator. Not sure if there are better tools out there, but it’s worked so far without any issues. This is the file I place in the root of the directory. Some browsers will actually delivery a 404 error if they don’t find it. That could add a lot unnecessary crap to your server log files. So it's a good idea to put it in there and not just for style sake.

PNG Favicon

Next make a 16 x 16 PNG version of the icon. I like to use PNGs because I can take advantage of a full 8-bit alpha channel (it’s still a really small file). The full transparency looks great on tabs in browsers like Firefox where the backgrounds can change. Then, we link to this icon in the head of our HTML document. This link overrides the favicon in the root for browsers that know how to read the PNG file as a favicon. Others will default back to ICO file.

Base64 Favicon

Lately I’ve taken to converting these files into base64 data and putting that into the LINK tag. Google recommends that you avoid making tons of http requests in order to speed up your page. Converting images to base64 converts the image into a text string that you can just include on your document without linking to an image file. The browser then interprets the text string into an image. For example:

<link rel="icon" type="image/png" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAcxJREFUeNp80t8r3XEcx/Hv8SM/IhdL6UzRUGTHj3NWqBEJR201NwvHBeUPsNoFN1smkhtKWhQXxG4ou9glSrK2aaE1P7O7JS5YGykcnu96fXV241OPvp/v9/P5vj/vz+f98QQCgZDjOL2IwzZmMYm/zv8tBk1ohg9RGIz2er1zdB4hCb+QgHb9tKlnEEN4iBuUIBl+i3qtSUd4jjNkoxvlOMQTvMU3zd1AAS4tjVV9tMge9ffRahPwBq8ifnb03dpPC/BBL6koVt+LNSyiE8so05htN6D+jJ2B7btCA3/wFSs41TaWEIt0ZZuhDBbw3kMVHB3KR63WhjzkKOC9LUrPL6hGnbKxrPwqbbxWTZOMiLO6C2CtBo22LzzDjipklRrQHTnAGPLdIG6AQvTjXOU6xm9c4R+mkKLvE5jHCzeARytYunMq4Wu80+FZa9B5BLWNLPTYpbP0KlHrlkXPRa1iZ/NAF6weWwjjQtt4aRmE9NNJxGX5jlyUYlyLfNbYns7CWosFeKoXN7J7qfqQiRF0KW13Xlh9n20hUS+W6jR28Rif0KExq86wVk/SuLUEu4l2q4pUATvQdVViKaLEP3TR7A5UqbQ2f/RWgAEA6xlnphy+IP4AAAAASUVORK5CYII=" />

To convert files to base64 data, I use the online base64 encoder/decoder at motobit.com.

iOS touch icon

Finally I make a iOS touch icon. I make a 129 x 129 PNG for this. Might seem like a weird size, but that’s what Apple uses so I figure it must be good. You could just name your file “apple-touch-icon.png” and stick it in the root of your site just like a favicon.ico file and iOS will find it. Now you can make multiple sizes and point to each of them depending on whether you're using an iPhone, an iPhone with a retina display, an iPad, or even an Android device. But I think creating one larger icon and allowing it to scale is the most efficient approach.

I don’t know about you, but I like keeping my directories as clean as possible. Especially the root. So I link to them in head:

<link rel="apple-touch-icon" href="/_images/common/favicon-mobile.png" />

You can also use the rel attribute of “apple-touch-icon-precomposed” if you don't want iOS to add “teh glossy” to your icon.

Is this a lot to process? Granted it might seem like small flourish, but this is just that added touch of branding to your site. This is what makes your site jump out in that long list of bookmarks you keep. It’s just one of the many details we put into our site that is probably under-appreciated.

So, what’s your favicon strategy?

Note: This is reposted from an article I posted on Forrst.com.

Share:
3

Content Versus Container

Jeffrey Schrab by on June 30, 2011

Content Strategy.  For web communications, it's on the forefront of the mind of every industry professional these days.  Or it should be. As an industry we've been focusing on the container not the content for years now.  To be fair, it's only recently that the technology developed to a point where we didn't have to work so hard to coax code and graphic design to do what we wanted it to do and could think of concentrating on other things. Like the reason we make websites in the first place. Content Strategy reminds us that we've been putting the cart before the horse for quite some time now.  And as an industry we are waking up to that fact and making changes to the very production process of web communications.  Recently I read an interview with Karen McGrange, an upcoming speaker at the Do It With Drupal conference.  Karen is a Content Strategist at Bond Art + Science. In this interview while discussing the importance of content, she nailed it:

I think so much of web design and development is approached as just that: design and development. What does it look like and feel like? What are the technologies we'll use? How will we code this? There's been this third leg of the stool, the content, that we've never really talked about, or we've treated as somebody else's problem. We say, "Oh, that's the client's problem!" or, "We're going to come in, and we'll do a redesign and put in a CMS, and that will solve everyone's web problems!"

One commenter of the above article extended what Karen had to say by saying:

Content is rarely the focus of web redesigns and this often leads to massive budgets being used to create incredibly attractive "containers" (and of late, attractive and 'responsive' containers).

Really good stuff.  Everyone must read this. (via Kristina Halvorson)

Share:

It’s 2011 - we have FONTS! or Graphic Text Kills.

Aaron Konkol by on March 10, 2011

This is the year we stop using graphics instead of HTML text for fonts on the web. Here’s the how and the why.

How? Why go graphic when there’s a plethora of alternatives. Smashing Magazine has a good comparison of web font embedding services. Be sure to see the comments at the end of the article for additional font services.

Additionally, @font-face Face Off has a handy-dandy chart that summarizes features and options of several font services.

Why? We’ve got 11 reasons … and counting.

  1. Translations. Unlike graphics, text can be translated via Google Translate. For a little perspective, the Google Translate widget on one client site gets 52,400 visits per month out of 400,000 total visits. Text is dynamically translated to 50 different languages.
  2. Usability. Users can only search for text on a page that isn’t in graphics.
  3. Accessibility. 508 compliance and screen readers. For a scary real life example, consider that Target lost a $6 million lawsuit related to compliance issues.
  4. SEO. More Googlejuice - and you want Googlejuice.
  5. Dynamic content. Obviously graphical text isn’t an option for sites that pull in dynamically updated content such as blogs and CMS- driven sites. And more and more sites are being built this way.
  6. Abandoning graphics for text is the more accepted general practice for sites that have been built over the past 1-5 years. Graphics for text is so 10 years ago. Even using graphics for headlines is a sign that your site is antiquated.
  7. You can save a shit-ton of time when text needs to be modified.
  8. Quality. Vector-based type looks better on devices with sharp resolution, like iPhone 4. Plus, they can be re-sized via your browser.
  9. Load time. If your page has just text to load vs. graphics, load time will be greatly reduced, thereby decreasing the appearance of large blank areas in your page during initial load.
  10. Bandwidth. This goes along with #9, but using text decreases bandwidth being used.
  11. Because we can. It is 2011. There are new options available. Using download-able fonts can give you more interesting fonts and still provide a lot of the flexibility of typical web fonts.
Categories: 
Share: