Tuesday, October 7, 2014

Smashing Newsletter #119: Monkeys And A Sprinkle Of SVG

Smart front-end tips and tricks. Issue #119 • Tuesday, October 7th 2014 • 181,997 readers • View in the browser

The Smashing Email Newsletter

Dear Friends,

Ah, the good ol' <select> drop-down menu. Whether it's an endless country selector, a lengthy list of available product items or just a quick overview of projects in a portfolio, filling them in is no fun at all. And the experience of scrolling through the drop-down menu that occupies half of the available viewport is quite annoying, too.

But it doesn't have to be this way. We could use an auto-complete field to let users type in the country's first characters and identify the country on the fly (with a <select> drop-down being a default, and JavaScript enhancing the experience). Alternatively, we could turn a drop-down into a stack of rich content layers. Also, if you search for a cross-browser <select> drop-down, you can use CSS only custom-styled select menu by Todd Parker, which works pretty well across all browsers.

So maybe there's no reason to stick to those select-menus after all. And perhaps, just perhaps, there is a better, and a bit smarter way to make user input a bit more comfortable.

– Vitaly (@smashingmag)


Table of Contents

1. Scalable Vector Maps, In One Font
2. Animated Background Headers? Yes, Please!
3. Font Family Reunion: Compatibility Tables For Default Local Fonts
4. Selling Tickets, With A Sprinkle Of Canvas And SVG
5. App Design Workflow
6. Six Monkeys That Might Make You Love Email Again
7. Tools For Picking Colors And Gradients
8. Get Better And Smarter: Upcoming Smashing Workshops
9. New on Smashing Job Board
10. Smashing Highlights (From Our Archive)
11. Recent Articles On Smashing Magazine

1. Scalable Vector Maps, In One Font

You might have run into this problem before: some regions or countries where the client's business is present need to be visualized, yet you're missing a consistent style for all of the map icons. Fortunately, with Map Glyphs by Ted Grajeda, you've got this problem pretty much covered.

Scalable Vector Maps, In One Font

The CSS icon font contains over 300 scalable vector map icons of the world, continents, countries and states. Also, since the entire set is based on SVG, you can easily adjust the style of the icons and its integral parts, be it the thickness or color of lines, or even animation. A reference cheat sheet with icon font classes is provided as well. Please note that the project is still a work in progress, but most icons are very useful already! The font is available as SVG, TTF, WOFF and EOT. An attribution is required unless you purchase the bundle with a few extras. Bookmarked. (vf)


2. Animated Background Headers? Yes, Please!

So you want to create a prominent background image header and perhaps add a bit of animation to add more visual interest to it? Well, you could just use a background video, or a simple SVG transition, but you could also play around with it a bit more, and if you know your way around JavaScript, you could create some quite nifty animated visual effects, like Rachel Smith did — and explained her process in her recent article.

Animated Background Headers? Yes, Please!

Rachel's animated background header examples were created with JavaScript and Canvas, including an animation loop using requestAnimationFrame and shapes that are being modified to create different effects. The animations follow mouse movements or use tweens from a predefined library. The result? Subtle visual effects that help the header to get just a bit fancier. (ml)


3. Font Family Reunion: Compatibility Tables For Default Local Fonts

Fonts aren't what you'd want leave to chance, but to which default font does a browser really fall back upon? Unfortunately, fallbacks are handled quite inconsistently among different systems which makes it difficult to make predictions on what will happen if you define a font-family with a keyword fallback — let's say for example font-family: fantasy. Until recently, there was no easy way to look up the default fonts for different operating systems, but then (lucky us!) Zack Leatherman decided to change this by building Font Family Reunion, a "caniuse" for default local fonts.

Font Family Reunion: Compatibility Tables For Default Local Fonts

The tool tells you what the five standard CSS keyword font-families are aliased to within each operating system, but you can also run font-family stacks through it to see what will happen on different systems. You might be surprised, something as simple as font-family: Helvetica, Arial and font-family: Arial, Helvetica for example will already lead to very different results. A handy tool that makes your font choices less of a game of luck. Definitely worth having in your bookmarks. (cm)


Advertisement
Ad


4. Selling Tickets, With A Sprinkle Of Canvas And SVG

Imagine that you're selling tickets for large concerts or sport events. For every single location, you have a map, and each map has rows and columns with seats, and you want visitors to be able to select an area, and a row and an actual seat on this map. Obviously, you'll have to enable panning and zooming, but how would the interactions look like, and how would you build it to make the solution scalable — both in terms of the available screen size and performance?

Selling Tickets, With A Sprinkle Of Canvas And SVG

SeatGeek developers struggled with just that problem. Their solution? Well, you could use three different layers for every map: an image tile layer (the actual stadium), an SVG layer (the blue section outline), and a marker layer (e.g. with Leaflet, the green dot). However, juggling around thousands of DOM elements drawn in SVG is likely to cause performance issues. In order to improve performance, you can draw the markers to tiled canvas elements instead and move these tiles instead of DOM elements. Drawing to canvas is fast, and you can still use SVG polygons and marker layers to achieve the level of interaction that you are aiming for. An interesting case study for an interesting real-life problem, and thus definitely worth reading! (vf)


5. App Design Workflow

When you design an app for a variety of resolutions, how do you prepare your graphics? Well, you most probably start at a high DPI 2x or 3x the document size and then scale down. But why not start at 1x and then scale up? This may not sound like the most effective way, but might as well be a great strategy for scalable assets. In fact, that's exactly what Marc Edwards does — and explains — in his App design workflow article.

App Design Workflow

If you have to deal with apps on a daily basis, you'll be sure to find a good number of nifty gems in this particular article, including a guide to designing iOS, Android and Mac apps. You can also use the Photoshop Actions to easily switch between multiple document sizes and apply a few techniques that will allow your elements to appear crisp and nicely rendered for all sizes. Everybody has their own workflow, and it's great to see designers sharing how they do their magic! (ea)


6. Six Monkeys That Might Make You Love Email Again

Most of us have a rather ambiguous relationship with email. We curse them when we are struggling to keep our inboxes from overflowing, or each time we get notified for new spam. On the other hand, our inboxes also treasure messages from dear friends, memories, exciting opportunities. So, what if we could change the context of how we interact with email? What if email was more than just a relentless notification behind the cold glass of our screens? Could we learn to love it, or at least appreciate it, again? Well, we could, as Brendan Dawes project Six Monkeys shows.

Six Monkeys That Might Make You Love Email Again

Six Monkeys is a series of six physical objects, each one of them named after a famous Chimpanzee (the project is a commission work for Mailchimp, in case you were wondering), that are connected to the Internet and react to email in their own, unique way. Nim, for example, is a light switch that you can switch off to prevent email from coming in, Ham a little box that stores your most treasured emails and prints them out when you unlock the box with a (physical) key. An exceptional mix of analog and digital that gives email back some of its magic from the early days. Beautiful! (cm)


Advertisement
Ad


7. Tools For Picking Colors And Gradients

Everybody loves a good gradient, but picking just the right one may be a tedious (and potentially annoying) task. As it turns out, you can use Spectral, a little tool that lets you pick a basic color and adjust the hue, saturation and lightness until you've reached the perfect color gradient. And that's not it: you can add different shades, too!

Tools For Picking Colors And Gradients

Another tool, DraGGradients, is also a simple tool that generates and customizes multiple CSS3 radial gradients for you. Just select a main color and "stopping" points, drag each point to the right direction, adjust deepness to create a gradient and... voilà! You're done! You can also generate a random gradient or use an existing preset. Once you're happy with you creation, simply export the CSS. Happy gradients, everyone! (ml)


8. Get Better And Smarter: Upcoming Smashing Workshops

With so many techniques, tools, libraries, design patterns, strategies, abstractions, frameworks and boilerplates available nowadays, what do you really need to know to keep your workflow fast, smart and efficient? That's exactly what our front-end and RWD workshops are all about: practical front-end + RWD workshops that will help you become better front-end developers and designers, today.

Get Better And Smarter: Upcoming Smashing Workshops

Half-Day Workshops In Bath, UK (Oct. 27):

4-Hour Online Workshops (Nov. 18/19):

Full-Day Workshops In Whistler, Canada (Dec. 9/12):

Or, if you'd like to run an in-house workshop at your office, feel free to get in touch with Vitaly at vitaly@smashingconf.com and briefly describe what problems you're facing and would like to solve. Don't worry about the costs — we'll find a fair price for sure. Get in touch — it's that easy!


New on Smashing Job Board

Here are the recent job openings published on our Smashing Job Board:

  • UI Developer at ZenPayroll (San Francisco, CA)
    We're looking for a talented UI Developer who lives and breathes HTML, CSS, and Javascript. The best code is something that is highly extensible and modular.

  • Front-End Developer (m/f) at Westwing Group GmbH (Munich, DE)
    We're looking for a front-end developer who will work closely with our product managers and designers to turn static PSD designs into amazing user interfaces, and turn our websites into a beautiful and unique shopping experience for our customers.

  • Full-Time Senior Designer at SPINX Digital (Los Angeles, CA)
    We're looking for a UX designer who can manage our Junior Designers, create wireframes, and coordinate frequently with Project Managers (and occasionally with clients).


Smashing Highlights (From Our Archive)

  • Taming The Email Beast
    In the 1950s, when consumer electronics such as vacuum cleaners and washing machines emerged, there was a belief that household chores would be done in a fraction of the time.

  • How To Benefit From CSS Generated Content And Counters
    Generated content was first introduced in the CSS2 specification. For several years, the feature was used by relatively few Web authors due to inconsistent browser support.

  • The Ultimate Guide To Cloning In Photoshop
    Photoshop's wide array of cloning tools is the cause of many of the absolute best and worst works created with the application. In a skilled and experienced hand, these tools lead to phenomenal results.


Recent Articles On Smashing Magazine


Workshop image credits: Elisabeth Irgens

Sent to truly smashing readers via Mailchimp.
We sincerely appreciate your kind support. You rock.

Email: newsletter@smashingmagazine.com
Follow us on Twitter • Join us on Facebook

The authors are: Melanie Lang (ml), Cosima Mielke (cm), Esther Arends (ea), Iris Lješnjanin (il), Vitaly Friedman (vf), Christiane Rosenberger (research), Elja Friedman (tools).

unsubscribe • update preferences • view in your browser


Tuesday, September 30, 2014

Meet the new Smashing Book: "Mobile Web Handbook" by Peter-Paul Koch

The waiting is over. PPK's new book on mobile
is ready, now shipping worldwide.

There're more bugs on mobile than particles in the universe!

Meet "Mobile Web Handbook", our new practical guide for dealing with front-end challenges on mobile.

Mobile Web Handbook, by PPK, available as printed hardcover and eBook.

$ 39

Get the book.Print + eBook. Shipping worldwide now.
Ah, use the code BUGS to save 15% today.


About The Book

Mobile is a difficult, unpredictable beast. Whether you're developing a responsive site, a mobile app or dealing with WebViews, you end up running into annoying technical issues in mobile browsers. Weird bugs, inconsistent CSS/JS support, performance issues, device fragmentation and complicated nuances such as device pixels, viewports, zooming, touch events, pointer/click events and the 300ms delay. Oh my!

Illustrations for the book were created by Stephen Hay.

The Mobile Web Handbook will help you make sense of it all. It's a brand new practical book to help you deal with technical issues on mobile effectively. Featuring recent research and testing, it shows the intricacies of mobile, with its common problems and workarounds, and delivers what it promises: real-world guidelines for mobile—unique and extremely useful. Jump to the table of contents. Also, you can look inside the book and download a sample chapter first (PDF, 0.2 Mb).

Sample PDF

232 pages. Written by Peter-Paul Koch. Reviewed by Brian and Stephanie Rieger. Designed by Stephen Hay.
Available as print and eBook.


Why This Book Is For You

Developing websites for mobile is pretty much the same as it has always been, but it does require you to learn a few new things, and some of them are quite confusing. In Mobile Web Handbook, you’ll learn:

  1. Mobile value chain of operators and device/OS vendors,
  2. Mobile/proxy browsers and browser developments,
  3. The complex browser situation on Android,
  4. Understand CSS pixels, physical pixels, device pixels,
  5. Make sense of layout viewport, visual viewport and ideal viewport,
  6. How zooming works and why page zoom is different than pinch zoom,
  7. The intricacies of the meta viewport and related CSS/JS properties,
  8. How to deal with technical issues of touch events in JS,
  9. Understand the touch event cascade and its bugs,
  10. Handle 300ms delay, pointer events and the click event,
  11. Fix common bugs caused by position: fixed, overflow: auto and background-attachment,
  12. Set up a device testing lab and test on mobile,
  13. Reconsider outdated development practices,
  14. Adjust expectations for mobile networks and latency.

Good enough? Alright then! You can get the book right away — it won't take more than 60 seconds.

Still not convinced? →



Tuesday, September 23, 2014

Smashing Newsletter #118: RWD Emails and Transparent JPEGs

Vertical media queries, off-canvas menu and type. Issue #118 • Tuesday, Sept. 23rd 2014 • 182,056 readers • View in the browser

The Smashing Email Newsletter

Dear Friends,

Have you ever thought about how the reading experience of email newsletters could be improved? Tidying up the design and making it responsive (unless it is already, that is) may be a good start. Well, that's what we did last week; we adjusted the header area and removed clutter, increased the font-size and spacing within the body copy. You may have already noticed that you're able to read much more of today's editorial without having to scroll down first.

Furthermore, the table of contents is now an actual table with larger clickable areas supported by more padding that should be easier to click on. Also, the content of our newsletter issues will be highlighted both in the subject line as well as in short taglines that allow a quick preview of the topics across popular mail clients.

If you just started experimenting with responsive newsletters, you could look into responsive email layouts, patterns, resources, transactional email templates and potentially even email signatures to make the HTML email just right.

Happy responsive emailing!
– Vitaly (@smashingmag)


Table of Contents

1. Getting To Grips With The Bézier Curve
2. Get More Out Of Your Photoshop
3. Applying Alpha Channels To JPGs
4. (Good) Typography Is A Practice!
5. Design Patterns To The Rescue
6. The Forgotten Vertical Media Queries
7. Unusual Off-Canvas Menu Effects
8. Get Better And Smarter: Upcoming Smashing Workshops

1. Getting To Grips With The Bézier Curve

Mastering the pen tool can be quite challenging, even for experienced designers. So if your skills need some brushing up or if you finally want to get to grips with the bézier curve, The Bézier Game, created by Mark McKay for the education startup Method of Action, is a playful way to improve your skills.

Getting To Grips With The Bézier Curve

The concept of the game is simple. You get an object and you have to trace its outline by bending curves around it — with as few nodes as possible. But be warned, what sounds easy in theory is quite tricky in practice indeed. Just remember: practice does makes perfect, so don't give up too easily! (cm)


2. Get More Out Of Your Photoshop

Smart Photoshop extensions can speed up your design workflow immensely. So, how about giving these two a try: LayerCraft is a plugin to automatically export UI assets from layers to all iOS and Android sizes (@1x to @3x and mdpi to xxxhdpi). It does not only allow you to scale assets, but also trim down transparent pixels and cut out selected layers. You can download LayerCraft for free, however, if you find it useful, its creator Ray appreciates if you buy him a coffee in return.

Get More Out Of Your Photoshop

Another addition to your Photoshop toolbox that is bound to save you a lot of time is Page Layers, a Mac app that captures entire webpages and converts them to layered Photoshop files. Simply open up a site in the embedded browser and select to save it as a PSD file. Every page element (be it images, links or blocks) will be rendered as a separate, named layer that you can work with. This app is great if you need to switch from the browser to Photoshop quite often, or you just feel more comfortable adjusting design in Photoshop. But if you're working on a redesign, then this particular app could prove to be most handy. (cm)


3. Applying Alpha Channels To JPGs

You've had this problem before: you have a prominent large photo that requires a heavy transparent drop shadow on a solid background. Well, you could save the image as a PNG but then the file size will be pretty large, or you could save it as JPEG, but then transparency won't work because the transparent shadow will look washed out. So what to do? Well, you can create two files, a regular non-transparent JPG and an 8-bit PNG (alpha mask), and you can embed both of them inside an SVG container and actually apply the PNG mask to the JPEG image.

Applying Alpha Channels To JPGs

The JPEG/PNG compression with SVG is a simple technique, but due to SVG it isn't supported in IE8. However, for cross-browser support, you could embed both PNG and JPEG as data URIs inline inside the SVG and then display the images using img src or background. You can automate the process with an online generator, too. The result? Significant savings in file sizes for images that otherwise would have been obese. One for the bookmarks! (vf)


Advertisement
Ad


4. (Good) Typography Is A Practice!

Here's a million dollar question: What goes often unnoticed just because it makes sense? Well, the correct answer is: Good typography. Repeat, good typography! Good typography is what most people never really think about, and that's because it's simply appropriate. Good typography tends to simply convey just the right feeling; it's neither overwhelming nor distracting. If you consider that web design is 95% typography, then why not hone your skills?

(Good) Typography Is A Practice!

For example, you could bite off a little bit of your time and learn how to select typefaces for body text. Or, you could let yourself get inspired by a pro like Donny Truong and check out his demos of typographic web design using CSS, such as hanging punctuation, multi-columns, drop cap and the good old ampersand. If that's still not enough, why not pimp up your expertise on subheads and learn how you can achieve some interesting effects with a pinch of CSS, too? Also, sometimes it even helps to remind ourselves what typography is and why it's so valuable. (ea)


5. Design Patterns To The Rescue

Nothing beats a nice overview of common design solutions to a problem that you've just stumbled upon. You might not find just the solution to use right away, but seeing what might work before starting to design or code right away definitely saves a great amount of your time.

Design Patterns To The Rescue

CodePen guys 'n' gals have collected and categorized a few code snippets and presented them all in a nice Design Patterns overview. You'll find common solutions (and clever design techniques) for charts, graphs, tabs, buttons, dialogs, drop-down menus, log-in forms, loaders, pagination, calendars, tables, maps and emails. A handy resource to keep in mind, so you don't have to lose too much time searching around next time. (vf)


6. The Forgotten Vertical Media Queries

When we discuss media queries in responsive design, we tend to focus primarily on screen width and screen density. However, the good ol' device-agnostic design approach for RWD prompts us to add breakpoints when things, well, break, e.g. when font size is becoming too small, or the line-length is becoming suboptimal, or there isn't enough space to show the entire navigation menu any more. However, things don't only tend to break just across the horizontal axis. Portrait and landscape media queries, just like vertical media queries (min-height/max-height) can be extremely useful to fit in just the right amount of content within the available viewport area.

The Forgotten Vertical Media Queries

Well, what can you do with them? ToDoGroup adjusts padding for the content area and navigation bar based on the available vertical space to fit in more content in the narrower space. On Trent Walton's website, the main idea is to show more-or-less the same amount of content — adjusting font-size and padding based on both horizontal and vertical media queries. In his recent talk, Antoine Butler advocates to embrace the vertical and covers a few cases when vertical MQs would make sense, e.g. using accordion pattern when the vertical space is sparse and building adaptive sticky vertical navigation. Perhaps vertical media queries are worth considering in your next project, too. (vf)


Advertisement
Ad


7. Unusual Off-Canvas Menu Effects

Who says that off-canvas menus have to always just slide in from the left or right to reveal side menus and controls? If you are eager to try out something different for a change, you might find a wonderful source of inspiration in Codrops's collection of off-canvas menu effects. The effects are quite surprising, but in no way obtrusive.

Unusual Off-Canvas Menu Effects

Created with CSS transitions, CSS animations and animated SVGs, the code snippets give common interaction patterns an unusual twist and allow you to play with organic shapes — think waves flowing in from the bottom, for example. The collection comes with a nice demo, and if you want to dig in further, you can also find the project on GitHub. (cm)


8. Get Better And Smarter: Upcoming Smashing Workshops

With so many techniques, tools, libraries, design patterns, strategies, abstractions, frameworks and boilerplates available nowadays, what do you really need to know to keep your workflow fast, smart and efficient? That's exactly what our front-end and RWD workshops are all about: practical front-end + RWD workshops that will help you become better front-end developers and designers, today.

Get Better And Smarter: Upcoming Smashing Workshops

Two-Hour Online Workshops (Sept. 30–Oct. 1):

Full-Day Workshops In Zürich, CH (Oct. 14–15):

Half-Day Workshops In Bath, UK (Oct. 27):

Or, if you'd like to run an in-house workshop at your office, feel free to get in touch with Vitaly at vitaly@smashingconf.com and briefly describe what problems you're facing and would like to solve. Don't worry about the costs — we'll find a fair price for sure. Get in touch — it's that easy!


New on Smashing Job Board

Here are the recent job openings published on our Smashing Job Board:

  • Senior UX Architect at Krossover (New York, NY)
    We're looking for a Senior UX Architect to help us design, manage and improve our suite of Intelligence products, including web, iOS and Android apps.

  • Front-End Developer at Unify Square (Bellevue, WA)
    We're looking for a front-end developer who will design and implement enterprise-grade and robust UX for our high-performance products, as well as drive uniform UX across all the products and services.

  • UX Designer at BombBomb (Colorado Springs, CO)
    We're looking for a UX designer who has a passion for usability, an eye for visual consistency, and a knack for reducing the complex to the bare essentials.


Smashing Highlights (From Our Archive)

  • An Introduction To DOM Events
    Click, touch, load, drag, change, input, error, resize — the list of possible DOM events is lengthy. Events can be triggered on any part of a document, whether by a user's interaction or by the browser.

  • Smart Transitions In User Experience Design
    Some websites outperform others, whether in their content, usability, design, features, etc. Details of interaction design and animation make a fundamental difference on modern websites.

  • The Ultimate Free Web Designer's Icon Set
    There are thousands of free icon sets out there, and every other day we see new sets being released by the design community. In fact, Smashing Magazine has been releasing icon sets for years now, too.


Recent Articles On Smashing Magazine


Workshop image credits: Elisabeth Irgens

Sent to truly smashing readers via Mailchimp.
We sincerely appreciate your kind support. You rock.

Email: newsletter@smashingmagazine.com
Follow us on Twitter • Join us on Facebook

The authors are: Cosima Mielke (cm), Esther Arends (ea), Iris Lješnjanin (il), Vitaly Friedman (vf), Christiane Rosenberger (research), Elja Friedman (tools).

unsubscribe • update preferences • view in your browser