Fluid Responsive Typography With CSS Poly Fluid Sizing

Omaha Web Design






 



 


Fluid layouts have been a normal part of front-end development for years. The idea of fluid typography, however, is relatively new and has yet to be fully explored. Up until now, most developers’ idea of fluid typography is simply using Viewport units maybe with some minimum and maximum sizes.

Fluid Responsive Typography With CSS Poly Fluid Sizing

In this article, we are going to take it to another level. We are going to examine how to create scalable, fluid typography across multiple breakpoints and predefined font sizes using well-supported browser features and some basic algebra. The best part is that you can automate it all by using Sass.

The post Fluid Responsive Typography With CSS Poly Fluid Sizing appeared first on Smashing Magazine.

Source link

Omaha’s Local Web Design Agency

Branding | Digital Marketing | Advertising Agency | Graphic Design
Web Design | Search Engine Optimization | Mobile Application Development



92 West | Branding + Strategy + Web Design

92 West is a branding, digital marketing, web design and advertising agency focused on helping brands discover their true voice and sense of purpose; genuinely inspiring audiences.

Have a project or new idea? Let's Talk.

branding + omaha advertising agency + digital marketing + graphic design
omaha web design + search engine optimization + mobile apps

Intrusive Interstitials: Guidelines To Avoiding Google’s Penalty

Omaha Web Design






 



 


In 2015, Google announced that mobile searches surpassed desktop searches in at least 10 countries. 56% of mobile traffic on major websites comes from mobile. In light of this, Google’s decision to improve the mobile user experience by various means, such as AMP pages and a dedicated mobile index, comes across as a sound business move.

Intrusive Interstitials: Guidelines To Avoiding Google's Penalty

More than half of the 2 trillion searches Google processes each year come from mobile devices. Mobile devices have changed the way we approach search, ushering in new types of habits such as local search, voice search and more. These consumer habits have greatly affected the way search engine providers think about user search intent.

The post Intrusive Interstitials: Guidelines To Avoiding Google’s Penalty appeared first on Smashing Magazine.

Source link

Omaha’s Local Web Design Agency

Branding | Digital Marketing | Advertising Agency | Graphic Design
Web Design | Search Engine Optimization | Mobile Application Development



92 West | Branding + Strategy + Web Design

92 West is a branding, digital marketing, web design and advertising agency focused on helping brands discover their true voice and sense of purpose; genuinely inspiring audiences.

Have a project or new idea? Let's Talk.

branding + omaha advertising agency + digital marketing + graphic design
omaha web design + search engine optimization + mobile apps

A Brief Overview On Responsive Navigation Patterns

Omaha Web Design






 



 


To say that responsive web design has changed our industry would be an understatement at best. We used to ask our clients which resolutions and devices they wanted us to support, but we now know the answer is “as many as possible.” To answer a challenge like this and to handle our increasingly complex world, our industry has exploded with new thinking, patterns and approaches.

A Brief Overview On Responsive Navigation Patterns

In this article, I want to look specifically at the issue of responsive navigation. We will first talk about information architecture, then the purpose of navigation, and finally we will look at three responsive navigation patterns that have served well over time.

The post A Brief Overview On Responsive Navigation Patterns appeared first on Smashing Magazine.

Source link

Omaha’s Local Web Design Agency

Branding | Digital Marketing | Advertising Agency | Graphic Design
Web Design | Search Engine Optimization | Mobile Application Development



92 West | Branding + Strategy + Web Design

92 West is a branding, digital marketing, web design and advertising agency focused on helping brands discover their true voice and sense of purpose; genuinely inspiring audiences.

Have a project or new idea? Let's Talk.

branding + omaha advertising agency + digital marketing + graphic design
omaha web design + search engine optimization + mobile apps

Which Responsive Design Framework Is Best? Of Course, It Depends.

Omaha Web Design






 



 


In 2017, the question is not whether we should use a responsive design framework. Increasingly, we are using them. The question is which framework should we be using, and why, and whether we should use the whole framework or just parts of it.

Which Responsive Design Framework Is Best? Of Course, It Depends.

With dozens of responsive design frameworks available to download, many web developers appear to be unaware of any except for Bootstrap. Like most of web development, responsive design frameworks are not one-size-fits-all. Let’s compare the latest versions of Bootstrap, Foundation and UIkit for their similarities and differences.

The post Which Responsive Design Framework Is Best? Of Course, It Depends. appeared first on Smashing Magazine.

Source link

Omaha’s Local Web Design Agency

Branding | Digital Marketing | Advertising Agency | Graphic Design
Web Design | Search Engine Optimization | Mobile Application Development



92 West | Branding + Strategy + Web Design

92 West is a branding, digital marketing, web design and advertising agency focused on helping brands discover their true voice and sense of purpose; genuinely inspiring audiences.

Have a project or new idea? Let's Talk.

branding + omaha advertising agency + digital marketing + graphic design
omaha web design + search engine optimization + mobile apps

A Little Surprise Is Waiting For You Here.

Omaha Web Design






 



 


Smashing Magazine is changing: a new design, a new layout, a new technical stack, a new printed magazine, a new Smashing Membership, and the same good ol’ obsession with quality content. Here’s a sneak preview of what’s coming up.

A Little Surprise Is Waiting For You Here — Meet The Next Smashing Magazine

Today marks an important milestone in Smashing Magazine’s life, and this very page is an early preview of what’s coming up next: many experiments, new challenges, but still a good ol’ obsession with quality content. A complete overhaul, both visually and technically, a fine new printed magazine, and a shiny new Smashing Membership, with nifty features and goodies for you, our lovely community. Curious? Well, fasten your seatbelt and browse around — it’s going to be quite a journey!

The post A Little Surprise Is Waiting For You Here. appeared first on Smashing Magazine.

Source link

Omaha’s Local Web Design Agency

Branding | Digital Marketing | Advertising Agency | Graphic Design
Web Design | Search Engine Optimization | Mobile Application Development



92 West | Branding + Strategy + Web Design

92 West is a branding, digital marketing, web design and advertising agency focused on helping brands discover their true voice and sense of purpose; genuinely inspiring audiences.

Have a project or new idea? Let's Talk.

branding + omaha advertising agency + digital marketing + graphic design
omaha web design + search engine optimization + mobile apps

World Wide Web, Not Wealthy Western Web (Part 2)

Omaha Web Design






 



 


In part 1 of this article, we looked at where in the world the new entrants to the World Wide Web are, and some of the new technologies the standards community has worked on to address some of the challenges that the next 4 billion people are facing when accessing the web. In short, we’ve tried to make some supply-side improvements to web standards so that websites can be made to better serve the whole world, not just the wealthy West.

World Wide Web, Not Wealthy Western Web (Part 2)

But there are other challenges to surmount, such as ways to get over creaky infrastructure in developing markets (which can be done with stopgap technological solutions, such as proxy browsers), and we’ll also look at some of the reasons why some of the offline billions remain offline, and what can be done to address this.

The post World Wide Web, Not Wealthy Western Web (Part 2) appeared first on Smashing Magazine.

Source link

Omaha’s Local Web Design Agency

Branding | Digital Marketing | Advertising Agency | Graphic Design
Web Design | Search Engine Optimization | Mobile Application Development



92 West | Branding + Strategy + Web Design

92 West is a branding, digital marketing, web design and advertising agency focused on helping brands discover their true voice and sense of purpose; genuinely inspiring audiences.

Have a project or new idea? Let's Talk.

branding + omaha advertising agency + digital marketing + graphic design
omaha web design + search engine optimization + mobile apps

World Wide Web, Not Wealthy Western Web (Part 1)

Omaha Web Design






 



 


“There are more things in heaven and earth, Horatio, than are dreamt of in your philosophy,” said Shakespeare’s Hamlet, in the famous scene in which Hamlet teaches Horatio to be a web designer.

World Wide Web, Not Wealthy Western Web (Part 1)

Horatio, as every schoolchild knows, is a designer from Berlin (or sometimes London or Silicon Valley) who has a top-of-the-line MacBook, the latest iPhone and an unlimited data plan over the fastest, most reliable network. But, as Hamlet points out to him, this is not the experience of most of the world’s web visitors.

The post World Wide Web, Not Wealthy Western Web (Part 1) appeared first on Smashing Magazine.

Source link

Omaha’s Local Web Design Agency

Branding | Digital Marketing | Advertising Agency | Graphic Design
Web Design | Search Engine Optimization | Mobile Application Development



92 West | Branding + Strategy + Web Design

92 West is a branding, digital marketing, web design and advertising agency focused on helping brands discover their true voice and sense of purpose; genuinely inspiring audiences.

Have a project or new idea? Let's Talk.

branding + omaha advertising agency + digital marketing + graphic design
omaha web design + search engine optimization + mobile apps

Mobile-First Is Just Not Good Enough: Meet Journey-Driven Design

Omaha Web Design






 



 


In a recent sales meeting for a prospective healthcare client, our team at Mad*Pow found ourselves answering an all-too-familiar question. We had covered the fundamental approach of user-centered design, agreed on leading with research and strategy, and everything was going smoothly. Just as we were wrapping up, the head of their team suddenly asked, “Oh, you guys design mobile-first, right?”

Mobile First Is Just Not Good Enough: Meet Journey-Driven Design

Well, that’s a difficult question to answer. While the concept of mobile-first began as a philosophy to help prioritize content and ensure positive, device-agnostic experiences, budgetary and scheduling constraints often result in mobile-first meaning mobile-only.

The post Mobile-First Is Just Not Good Enough: Meet Journey-Driven Design appeared first on Smashing Magazine.

Source link

Omaha’s Local Web Design Agency

Branding | Digital Marketing | Advertising Agency | Graphic Design
Web Design | Search Engine Optimization | Mobile Application Development



92 West | Branding + Strategy + Web Design

92 West is a branding, digital marketing, web design and advertising agency focused on helping brands discover their true voice and sense of purpose; genuinely inspiring audiences.

Have a project or new idea? Let's Talk.

branding + omaha advertising agency + digital marketing + graphic design
omaha web design + search engine optimization + mobile apps

Responsive Upscaling: Large-Screen E-Commerce Design

Omaha Web Design


  

The responsive design revolution is truly upon us (if it hasn’t already happened!), and even though e-commerce websites haven’t picked up responsive design quite as aggressively as in other industries, it’s becoming increasingly popular.

Responsive Upscaling In E-Commerce

So far, most of the responsive design thinking has revolved around covering the range of experiences from mobile to desktop. Yet little attention has been paid to the opportunities for expanding that range beyond the standard desktop screen, to create an experience optimized for modern large-scale displays.

The post Responsive Upscaling: Large-Screen E-Commerce Design appeared first on Smashing Magazine.

Source link

Omaha’s Local Web Design Agency

Beyond The Boring: The Hunt For The Web’s Lost Soul

Omaha Web Design

Has web design lost its soul? And is responsive design to blame? These questions, posed by my friend and colleague Noah Stokes1, are provocative to say the least. After all, the responsive web has made browsing on our ever increasing collection of Internet-connected screens not only possible, but enjoyable.

Our priority as designers must be to solve problems; perhaps more than anything else, this is what we do. Responsive web design is a fantastic solution to the problem of creating virtual experiences that adapt to different devices. There are other problems out there that we’re called on to solve, though, not least of which is to make content of all kinds appear interesting and engaging. A page of plain text becomes a beautiful blog post, a mess of unconnected JPGs becomes a professional portfolio.

The question, then, becomes: can we succeed at solving both of these problems?

What We’ve Gained

There’s no doubt about it, the web has become an aesthetically beautiful place. Simple, attractive sites that are built on solid grid layouts have become the standard. The wild west of the web has been tamed. Law and order in the form of frameworks and fluid grids have taken over and peace reigns throughout the land.

All of this is a good thing. The benefits of simple, attractive sites are both clear and plentiful:

  1. Familiar and easy for users to navigate (when done correctly).
  2. Prototyping is (relatively) fast and easy.
  3. Heavy standardization of site-building techniques (assembly lines have replaced artisans).
  4. Fast layout leads to big cost savings (which may or may not be passed down to the customer).
  5. Strict grid layouts lend themselves to responsive design (the minimal layout trend is driven heavily by this need).
2
A stroll through a web design gallery like Awwwards3 reveals hundreds of fantastic sites that fit the criteria of simple and attractive sites. (View large version4)

It can’t be overstated that there is immense value in standardization and associated techniques. Countless individuals and small businesses benefit from having simple, attractive (and not at all unique) sites to share their brand with the world. However, that’s just one side of the story.

What We’ve Lost

Taken in individual doses, the average professional website today looks great. Compare even a lowly designer’s portfolio site today to the best design agency sites ten years ago, and you’ll have to concede that we’ve gotten a lot better at this web design thing. However, as you look around, it’s easy to come to the conclusion that everything is starting to look the same.

Have designers lost that pioneer spirit? Has creativity been sacrificed on the altar of convenience? Before answering these questions, let’s take a look at what’s causing the lack of variation in web design today.

Reasons Why Sites All Look The Same

What’s the driving force behind the feeling of sameness that we get as we look around the web today? What’s to blame? As it turns out, it’s not as simple as pinning it all on one tool or method. RWD might contribute, but it’s just one item in a long list. Here are a few of the likely suspects.

Layout

Limited layout ideas are one of the most prominent and obvious reasons for a lack of variation on the web. Strip out colors, animations, parallax scrolling effects and the like, and you start to see that a few basic layouts rule the web. How many sites can you name that use only slight variations of these five layouts?

Five common web layouts.5
Five common web layouts. (View large version6)

This is what Noah meant when he lamented that all he saw were “boxes and grids everywhere.” We seem to have reached a stagnation point where unique layouts are a lost art.

Responsive Web Design

Once upon a time, you could guarantee that everyone visiting your website would be doing so on a low-resolution desktop computer screen. These days, websites that look great on almost any viewport at any resolution aren’t a luxury, they’re a necessity. Basic, fluid-width, collapsing grids make responsive web design a much simpler process than more organic layouts.

Frameworks

Web design frameworks have the potential to rapidly speed up both design and development workflows. For many, they’re the safest, most straightforward route to a responsive, cross-browser website. As a bonus, they also take care of simple styling for all manner of common elements, from buttons to forms. The incredible popularity of tools like Bootstrap and Foundation leads to thousands of web designers using the exact same codebase, layouts, and even aesthetic style on every project they take on.

Prototyping Tools And Processes

Even our blank-canvas design process has intentionally reduced creativity from the design process. Most prototyping tools encourage and perhaps even force you to use standardized, boxy elements that conform to strict grid layouts.

Many prototyping tools encourage common grid layout structures.7
Many prototyping tools encourage common grid layout structures. (View large version8)

High-Quality Free Photos And Graphics

Never before have beautiful, free design assets been so readily available. Again, convenience and affordability reign supreme, so we see designers flocking to free photo sites, pulling from the same small (but growing) pool of resources.

Two free stock photographs.9
Two free stock photographs. (View large version10)

In the last two years, how many sites have you seen using one (or both) of the two photos above? If you browse the web regularly, I’d wager the number is in the dozens.

The same photographs used on different sites.11
The Village Style12 and Jigglist13; College Essay Guy14 and Get Busy Make Money15 (View large version16)

This goes way beyond photos, extending to icons, fonts, patterns, and so on. The upside here is that designers with zero budget can still make great looking sites; the downside is that every other designer is doing the same thing with the same resources.

Design Trends

To some designers, “trend” is a dirty word. It shouldn’t be though. Pick a decade in the 20th century and examine its design trends. What you find is fascinating. It gives that time period its own distinct style and personality, and is often a reflection of the entire culture. Even if you can’t see it, it’s happening right now in your work. Everything you see and experience is affecting what you do, and the web amplifies this like never before. The result is a lot of designers gaining inspiration from the same sources and pursuing the same trends.

You And Me

Every tool and resource listed above is incredibly valuable. These things make our jobs easier, open up web design and development to more people, and save clients money. I didn’t choose them arbitrarily, I use them. If we’re looking for someone to blame for a lack of variation in web design, I’ll raise my hand. It’s me. And while I don’t think every project merits a unique design, I’d like to tip my hat to the designers out there who are trying to do something more interesting.

It’s also important to note that you can use any or all of the above and still create a unique design. It’s all in how you wield the tools that are available to you.

How To Challenge The Status Quo

At this point, you’ve already decided whether or not you care if your site designs are unique. Maybe that’s not your thing — that’s completely acceptable. If you find yourself wanting to break out of your typical workflow, though, here are a few ideas to get you going and some sites that serve as great examples.

Get Weird With Layout

Close your prototyping app, take out a pen and some paper, and think about how you can make an interesting, usable layout that’s not something you’ve ever done before.

Phases Magazine

Phases Magazine1917 is a good example of a site doing something unexpected with layout. It’s boxy — there is a grid at play here — and yet somehow they made it feel totally outside the typical web design experience (the screenshot doesn’t really give you a good feel for it; be sure to visit the site). If you see this and think, “Whoa, that’s weird,” good! That’s what they’re going for. Some will love it, some will hate it, but I really like that they’re trying something different.

Phases Magazine uses an unconventional grid.18
Phases Magazine1917 uses an unconventional grid. (View large version2220)

Unfortunately, the site’s overall experience is quite poor. There’s some unnecessary scrolljacking, and the seemingly responsive layout breaks massively in certain viewports.

Phases Magazine's layout breaks on smaller screens.21
Phases Magazine’s layout breaks on smaller screens. (View large version2220)
Curious Space

A better implementation of a similar idea is Curious Space282523.

The layout of Curious Space.24
The layout of Curious Space282523. (View large version26)

Here the grid still has a more organic feel, but scrolling functionality is normal and the breakpoints are perfectly functional.

Curious Space adapts well to different devices.27
Curious Space282523 adapts well to different devices. (View large version29)

There are a lot of nice little design touches that you notice as you interact with the site. For instance, the image stack order changes on hover:

Hovering with a mouse brings content to the foreground.30
Hovering with a mouse brings content to the foreground. (View large version31)

Also, they have a bit of fun with scrolling, but it’s not disrupting in the least, and it fits with the haphazard visual theme of the site. The logo starts off as a jumble of letters, but as you scroll, they fall into place and form “Curious Space” in the navigation bar.

The letters of the logo fall into place as you scroll.32
The letters of the logo fall into place as you scroll. (View large version33)
Le Temps D’un Trajet

Another interesting example is Le Temps d’un trajet3634. Once again, we see a non-standard grid, but instead of being sporadic, the layout is more intentional and clustered.

The homepage layout of Le Temps d'un trajet.35
The homepage layout of Le Temps d’un trajet3634. (View large version37)

Each block in the arrangement is a static image that turns into a short video on hover. The coolest part, though, is how the grid shifts fluidly to accommodate focusing on different nodes.

Don’t Be A Square

One easy way to give your site a different atmosphere is to think outside the box. As cringeworthy as that sounds, when you open yourself up to different geometry, things can get really interesting.

Built By Buffalo
Hexagonal layout.38
Built By Buffalo4139 uses hexagons for layout. (View large version40)

Check out the hexagon hive that Built By Buffalo4139 has going on. This gallery design doesn’t translate nicely to mobile, so they simply switch to rectangles at one of their breakpoints. This is a great example of doing something unique where appropriate, but realizing where the boundary should be drawn to give your users the best possible experience.

The layout switches to rectangles on narrower viewports.42
The layout switches to rectangles on narrower viewports. (View large version43)
Anakin Design Studio

One of my favorite sites in this vein that I’ve seen recently is Anakin Design Studio4644. Not only is the layout beautiful and unpredictable, the shapes at play here are all far outside what you’d expect scrolling through today’s websites.

Homepage of Anakin Design Studio.45
Anakin Design Studio4644‘s homepage. (View large version47)

As you can see, the huge, masked typography makes a bold impression. Beyond that though, if you move down the page you see a display of recent work. Most designers would put a simple rectangular thumbnail grid here and call it a day, but Anakin has played with the shapes to make it a lot more interesting. They’re still rectangular images, but they’ve used white backgrounds to create the illusion of varying shapes.

Anakin Design Studio's portfolio of work.48
Anakin Design Studio’s portfolio. (View large version49)
Avex Designs; Mathilde Jacon

Here are some other sites doing unexpected experiments with interesting shapes.

Examples of interesting shapes from Avex Designs and Mathilde Jacon.50
Avex Designs51 and Mathilde Jacon52 use unconventional shapes to create unique experiences. (View large version53)

Go Organic

Fixate; For Better Coffee

Sites like Fixate5754 and For Better Coffee5855 combine illustration with organic, crazy-busy layouts that make for powerful and memorable experiences.

Complex illustrated layouts.56
Fixate5754 and For Better Coffee5855 use highly illustrated layouts to help them stand out.(View large version59)

The layouts above only seem complex because of the artwork; in reality, they can be pulled off fairly easily. Custom illustration work is a fantastic way to communicate a unique brand personality in a world lost in minimal thumbnail grids that all look the same.

For Better Coffee uses entertaining animations to track the coffee bean through the coffee creation process as you scroll. The experience is smooth, and it doesn’t jump the page to predefined points, so scrolling becomes a story-telling feature.

Coffee bean story.60
A coffee bean falls toward a grinder as the page is scrolled. (View large version61)
Pouring coffee.62
Further down the page, scrolling pours fresh coffee into a cup. (View large version63)
HappyFunCorp

While we’re on the topic of beautifully illustrated sites, you should check out HappyFunCorp64.

At first, it seems like a fairly normal site with some fun little animations. The cool part happens when you start to navigate. The scene on the homepage serves as the basis for the rest of the site, so when you follow a link, instead of loading a brand-new page it zooms in to a detail of the whole scene.

A zoomed-in section of the HappyFunCorp site.65
Following a link zooms in to a detail. (View large version66)

It’s quirky, but I love the original thinking that went into it. Also, because the navigation is still presented in a standard way means that there’s no learning curve for users. The whole experience in delightfully unexpected, but in a way that doesn’t contradict how you normally interact with a site.

Vary The Experience

One basic expectation that users have is that everyone who lands on the same site will receive the same experience; a fun way to do something different is to toss that out the window. Vasilis van Gemert’s site6967 not only uses a unique, overlapping box layout, it also changes its entire color scheme for every visit.

Three different color schemes.68
Three different color schemes from Vasilis van Gemert’s site6967. (View large version70)

This creative feature extends beyond the homepage to all of the major subpages.

Subpages also change their color schemes.71
Subpages also change their color schemes. (View large version72)

Create A Unique Visual Theme

Another way to make your site design unique is to decide on an entertaining or interesting theme that you can use as the basis of all your design decisions. This provides a nice framework for everything you do and encourages you to explore beyond traditional UI.

While not appropriate for all sites (a government website, for instance), for things like event announcements or small company pages it can be refreshing. The new site for dConstruct 20157573 is a great example of this idea.

Part of the retro-futuristic design for dConstruct 2015.74
Part of the retro-futuristic design of the dConstruct 20157573 site. (View large version76)

As you can see, they went for a retro-futuristic vibe, heavily reminiscent of The Jetsons77. The result is a site that’s flat out fun to scroll through as you discover the how they present each new section.

A detail from the dConstruct design.78
A detail from the dConstruct design. (View large version79)

There are a couple of really great things to note about this site. First of all, the headline treatments are wonderfully retro, using a combination of Lamplighter Script and Andes.

The best part, though, is that these are live web fonts with the diagonal direction implemented via a simple CSS skew. The repetition of diagonal lines throughout the site helps the design feel both consistent and creative.

Styled web fonts mean selectable text.80
With creative use of styled web fonts, all the text is selectable. (View large version81)

This site is a great example of how responsive design doesn’t have to be boring. The layout doesn’t feel boxy or typical, and yet it manages to reflow nicely to any viewport size. In fact, I really love how creative they were with transforming elements for smaller screens. For instance, as your viewport shrinks, the ticket graphic shown below jumps into an animated transform that shifts from horizontal to vertical orientation. It’s a tiny detail, but it’s clever and shows how much thought was put into every aspect of the layout.

26-dconstruct-opt-small82
For narrow viewports, the ticket flips from horizontal to vertical. (View large version83)

Hats off to Clearleft84 for the great work on this one.

Use Stock As An Input, Not An End Result

I work at Creative Market85, so I’m absolutely in favor of using great stock graphics, fonts, photos, and more. Quality stock resources can be immensely helpful for every designer, but how you use them is an important consideration. Whether you’re using some interesting vector artwork, an icon set, or a full-blown website theme, consider putting in some extra effort so that your implementation doesn’t look exactly like that of everyone else. The vast majority of people downloading that asset won’t bother with much or any customization, so a little bit goes a long way.

The Trouble With Unique Sites

Finding sites that are truly surprising and unique is a tall order. I put in hours of site searching to prepare for this article and still feel like I have very little to show for it. One overwhelming trend I’ve found is that it often feels like the only designers really pursuing unique web design are producing sites with wonky user experiences.

Experimentation is great, but sites that confuse users with weird, unexpected and unpleasant UX often fall short of their goals. Many of these sites take a step backwards by presenting us with Flash-like experiences: long loading times, overly ornate animations, jumpy scrolling, and complex user flows. There is a middle ground. You can create beautiful, unique looking websites without trying to reinvent the interaction wheel.

Web Design Lives

Standardization and predictable design will always have their place on the web. In fact, they may be the best possible solution for presenting most types of content to most screens. That said, we should let our creative instincts fight it out with our analytical instincts from time to time.

Let’s do our part to make sure the web remains what it has always been: a place for technology, art and design to overlap in new and interesting ways. Be a pioneer, try something you’ve never seen anyone do — and yes, make lots of mistakes along the way. It’s great to create something weird every now and then, even if other people hate it. That’s how this crazy thing called the web was built, and that’s how we’ll keep pushing it forward.

Ultimately, despite the fact that plenty of sites look pretty similar, I don’t believe that web design has reached a point of stagnation. There are countless extremely talented designers creating unbelievable sites, constantly raising the bar for their peers. This topic is wide open for debate, though. I’d love to hear your thoughts about the state of design on the web, and who you think is doing the most interesting work.

(ml, og)

Footnotes

  1. 1 http://www.creativebloq.com/web-design/why-web-design-losing-its-soul-51514950
  2. 2 http://www.smashingmagazine.com/wp-content/uploads/2015/06/01-awwwards-opt.jpg
  3. 3 http://www.awwwards.com/nominees/
  4. 4 http://www.smashingmagazine.com/wp-content/uploads/2015/06/01-awwwards-opt.jpg
  5. 5 http://www.smashingmagazine.com/wp-content/uploads/2015/06/02-layout-opt.jpg
  6. 6 http://www.smashingmagazine.com/wp-content/uploads/2015/06/02-layout-opt.jpg
  7. 7 http://www.smashingmagazine.com/wp-content/uploads/2015/06/03-prototyping-tools-opt.png
  8. 8 http://www.smashingmagazine.com/wp-content/uploads/2015/06/03-prototyping-tools-opt.png
  9. 9 http://www.smashingmagazine.com/wp-content/uploads/2015/06/04-free-stockphotos-opt.jpg
  10. 10 http://www.smashingmagazine.com/wp-content/uploads/2015/06/04-free-stockphotos-opt.jpg
  11. 11 http://www.smashingmagazine.com/wp-content/uploads/2015/06/05-stockphoto-examples-opt.jpg
  12. 12 http://thevillagestyle.com/adventure1/
  13. 13 http://jigglist.com
  14. 14 http://www.collegeessayguy.com/
  15. 15 http://www.getbusymakemoney.com
  16. 16 http://www.smashingmagazine.com/wp-content/uploads/2015/06/05-stockphoto-examples-opt.jpg
  17. 17 http://www.phasesmag.com
  18. 18 http://www.smashingmagazine.com/wp-content/uploads/2015/06/06-phases-magazine-opt.jpg
  19. 19 http://www.phasesmag.com
  20. 20 http://www.smashingmagazine.com/wp-content/uploads/2015/06/06-phases-magazine-opt.jpg
  21. 21 http://www.smashingmagazine.com/wp-content/uploads/2015/06/07-phases-magazine-opt.jpg
  22. 22 http://www.smashingmagazine.com/wp-content/uploads/2015/06/06-phases-magazine-opt.jpg
  23. 23 http://www.curiousspace.com
  24. 24 http://www.smashingmagazine.com/wp-content/uploads/2015/06/08-curious-space-opt.jpg
  25. 25 http://www.curiousspace.com
  26. 26 http://www.smashingmagazine.com/wp-content/uploads/2015/06/08-curious-space-opt.jpg
  27. 27 http://www.smashingmagazine.com/wp-content/uploads/2015/06/09-curious-space-opt.jpg
  28. 28 http://www.curiousspace.com
  29. 29 http://www.smashingmagazine.com/wp-content/uploads/2015/06/09-curious-space-opt.jpg
  30. 30 http://www.smashingmagazine.com/wp-content/uploads/2015/06/10-curious-space-opt.jpg
  31. 31 http://www.smashingmagazine.com/wp-content/uploads/2015/06/10-curious-space-opt.jpg
  32. 32 http://www.smashingmagazine.com/wp-content/uploads/2015/06/11-curious-space-opt.jpg
  33. 33 http://www.smashingmagazine.com/wp-content/uploads/2015/06/11-curious-space-opt.jpg
  34. 34 http://letempsduntrajet.fr
  35. 35 http://www.smashingmagazine.com/wp-content/uploads/2015/06/12-le-temps-dun-trajet-opt.jpg
  36. 36 http://letempsduntrajet.fr
  37. 37 http://www.smashingmagazine.com/wp-content/uploads/2015/06/12-le-temps-dun-trajet-opt.jpg
  38. 38 http://www.smashingmagazine.com/wp-content/uploads/2015/06/12b-build-by-buffalo-opt.jpg
  39. 39 http://builtbybuffalo.com
  40. 40 http://www.smashingmagazine.com/wp-content/uploads/2015/06/12b-build-by-buffalo-opt.jpg
  41. 41 http://builtbybuffalo.com
  42. 42 http://www.smashingmagazine.com/wp-content/uploads/2015/06/13-build-by-bufallo-opt.jpg
  43. 43 http://www.smashingmagazine.com/wp-content/uploads/2015/06/13-build-by-bufallo-opt.jpg
  44. 44 http://www.anakin.co/en
  45. 45 http://www.smashingmagazine.com/wp-content/uploads/2015/06/14-anakin-opt.jpg
  46. 46 http://www.anakin.co/en
  47. 47 http://www.smashingmagazine.com/wp-content/uploads/2015/06/14-anakin-opt.jpg
  48. 48 http://www.smashingmagazine.com/wp-content/uploads/2015/06/15-anakin-opt.jpg
  49. 49 http://www.smashingmagazine.com/wp-content/uploads/2015/06/15-anakin-opt.jpg
  50. 50 http://www.smashingmagazine.com/wp-content/uploads/2015/06/16-interesting-shapes-opt.png
  51. 51 http://avexdesigns.com/
  52. 52 http://www.mathildejacon.com/
  53. 53 http://www.smashingmagazine.com/wp-content/uploads/2015/06/16-interesting-shapes-opt.png
  54. 54 http://fixate.it
  55. 55 http://forbetter.coffee
  56. 56 http://www.smashingmagazine.com/wp-content/uploads/2015/06/17-organic-sites-opt.png
  57. 57 http://fixate.it
  58. 58 http://forbetter.coffee
  59. 59 http://www.smashingmagazine.com/wp-content/uploads/2015/06/17-organic-sites-opt.png
  60. 60 http://www.smashingmagazine.com/wp-content/uploads/2015/06/18-for-better-coffee-opt.png
  61. 61 http://www.smashingmagazine.com/wp-content/uploads/2015/06/18-for-better-coffee-opt.png
  62. 62 http://www.smashingmagazine.com/wp-content/uploads/2015/06/19-for-better-coffee-opt.png
  63. 63 http://www.smashingmagazine.com/wp-content/uploads/2015/06/19-for-better-coffee-opt.png
  64. 64 http://happyfuncorp.com/#home
  65. 65 http://www.smashingmagazine.com/wp-content/uploads/2015/06/20-happy-fun-corp-opt.png
  66. 66 http://www.smashingmagazine.com/wp-content/uploads/2015/06/20-happy-fun-corp-opt.png
  67. 67 https://vasilis.nl/
  68. 68 http://www.smashingmagazine.com/wp-content/uploads/2015/06/21-vasilis-van-gemert-opt.png
  69. 69 https://vasilis.nl/
  70. 70 http://www.smashingmagazine.com/wp-content/uploads/2015/06/21-vasilis-van-gemert-opt.png
  71. 71 http://www.smashingmagazine.com/wp-content/uploads/2015/06/22-vasilis-van-gemert-opt.png
  72. 72 http://www.smashingmagazine.com/wp-content/uploads/2015/06/22-vasilis-van-gemert-opt.png
  73. 73 http://2015.dconstruct.org
  74. 74 http://www.smashingmagazine.com/wp-content/uploads/2015/06/23-dconstruct-opt.jpg
  75. 75 http://2015.dconstruct.org
  76. 76 http://www.smashingmagazine.com/wp-content/uploads/2015/06/23-dconstruct-opt.jpg
  77. 77 https://en.wikipedia.org/wiki/The_Jetsons
  78. 78 http://www.smashingmagazine.com/wp-content/uploads/2015/06/24-dconstruct-opt.jpg
  79. 79 http://www.smashingmagazine.com/wp-content/uploads/2015/06/24-dconstruct-opt.jpg
  80. 80 http://www.smashingmagazine.com/wp-content/uploads/2015/06/25-dconstruct-opt.jpg
  81. 81 http://www.smashingmagazine.com/wp-content/uploads/2015/06/25-dconstruct-opt.jpg
  82. 82 http://www.smashingmagazine.com/wp-content/uploads/2015/06/26-dconstruct-opt.jpg
  83. 83 http://www.smashingmagazine.com/wp-content/uploads/2015/06/26-dconstruct-opt.jpg
  84. 84 http://clearleft.com
  85. 85 https://creativemarket.com

The post Beyond The Boring: The Hunt For The Web’s Lost Soul appeared first on Smashing Magazine.

Source link

Omaha’s Local Web Design Agency

Beyond The Boring: The Hunt For The Web’s Lost Soul

Omaha Web Design

Has web design lost its soul? And is responsive design to blame? These questions, posed by my friend and colleague Noah Stokes1, are provocative to say the least. After all, the responsive web has made browsing on our ever increasing collection of Internet-connected screens not only possible, but enjoyable.

Our priority as designers must be to solve problems; perhaps more than anything else, this is what we do. Responsive web design is a fantastic solution to the problem of creating virtual experiences that adapt to different devices. There are other problems out there that we’re called on to solve, though, not least of which is to make content of all kinds appear interesting and engaging. A page of plain text becomes a beautiful blog post, a mess of unconnected JPGs becomes a professional portfolio.

The question, then, becomes: can we succeed at solving both of these problems?

What We’ve Gained

There’s no doubt about it, the web has become an aesthetically beautiful place. Simple, attractive sites that are built on solid grid layouts have become the standard. The wild west of the web has been tamed. Law and order in the form of frameworks and fluid grids have taken over and peace reigns throughout the land.

All of this is a good thing. The benefits of simple, attractive sites are both clear and plentiful:

  1. Familiar and easy for users to navigate (when done correctly).
  2. Prototyping is (relatively) fast and easy.
  3. Heavy standardization of site-building techniques (assembly lines have replaced artisans).
  4. Fast layout leads to big cost savings (which may or may not be passed down to the customer).
  5. Strict grid layouts lend themselves to responsive design (the minimal layout trend is driven heavily by this need).
2
A stroll through a web design gallery like Awwwards3 reveals hundreds of fantastic sites that fit the criteria of simple and attractive sites. (View large version4)

It can’t be overstated that there is immense value in standardization and associated techniques. Countless individuals and small businesses benefit from having simple, attractive (and not at all unique) sites to share their brand with the world. However, that’s just one side of the story.

What We’ve Lost

Taken in individual doses, the average professional website today looks great. Compare even a lowly designer’s portfolio site today to the best design agency sites ten years ago, and you’ll have to concede that we’ve gotten a lot better at this web design thing. However, as you look around, it’s easy to come to the conclusion that everything is starting to look the same.

Have designers lost that pioneer spirit? Has creativity been sacrificed on the altar of convenience? Before answering these questions, let’s take a look at what’s causing the lack of variation in web design today.

Reasons Why Sites All Look The Same

What’s the driving force behind the feeling of sameness that we get as we look around the web today? What’s to blame? As it turns out, it’s not as simple as pinning it all on one tool or method. RWD might contribute, but it’s just one item in a long list. Here are a few of the likely suspects.

Layout

Limited layout ideas are one of the most prominent and obvious reasons for a lack of variation on the web. Strip out colors, animations, parallax scrolling effects and the like, and you start to see that a few basic layouts rule the web. How many sites can you name that use only slight variations of these five layouts?

Five common web layouts.5
Five common web layouts. (View large version6)

This is what Noah meant when he lamented that all he saw were “boxes and grids everywhere.” We seem to have reached a stagnation point where unique layouts are a lost art.

Responsive Web Design

Once upon a time, you could guarantee that everyone visiting your website would be doing so on a low-resolution desktop computer screen. These days, websites that look great on almost any viewport at any resolution aren’t a luxury, they’re a necessity. Basic, fluid-width, collapsing grids make responsive web design a much simpler process than more organic layouts.

Frameworks

Web design frameworks have the potential to rapidly speed up both design and development workflows. For many, they’re the safest, most straightforward route to a responsive, cross-browser website. As a bonus, they also take care of simple styling for all manner of common elements, from buttons to forms. The incredible popularity of tools like Bootstrap and Foundation leads to thousands of web designers using the exact same codebase, layouts, and even aesthetic style on every project they take on.

Prototyping Tools And Processes

Even our blank-canvas design process has intentionally reduced creativity from the design process. Most prototyping tools encourage and perhaps even force you to use standardized, boxy elements that conform to strict grid layouts.

Many prototyping tools encourage common grid layout structures.7
Many prototyping tools encourage common grid layout structures. (View large version8)

High-Quality Free Photos And Graphics

Never before have beautiful, free design assets been so readily available. Again, convenience and affordability reign supreme, so we see designers flocking to free photo sites, pulling from the same small (but growing) pool of resources.

Two free stock photographs.9
Two free stock photographs. (View large version10)

In the last two years, how many sites have you seen using one (or both) of the two photos above? If you browse the web regularly, I’d wager the number is in the dozens.

The same photographs used on different sites.11
The Village Style12 and Jigglist13; College Essay Guy14 and Get Busy Make Money15 (View large version16)

This goes way beyond photos, extending to icons, fonts, patterns, and so on. The upside here is that designers with zero budget can still make great looking sites; the downside is that every other designer is doing the same thing with the same resources.

Design Trends

To some designers, “trend” is a dirty word. It shouldn’t be though. Pick a decade in the 20th century and examine its design trends. What you find is fascinating. It gives that time period its own distinct style and personality, and is often a reflection of the entire culture. Even if you can’t see it, it’s happening right now in your work. Everything you see and experience is affecting what you do, and the web amplifies this like never before. The result is a lot of designers gaining inspiration from the same sources and pursuing the same trends.

You And Me

Every tool and resource listed above is incredibly valuable. These things make our jobs easier, open up web design and development to more people, and save clients money. I didn’t choose them arbitrarily, I use them. If we’re looking for someone to blame for a lack of variation in web design, I’ll raise my hand. It’s me. And while I don’t think every project merits a unique design, I’d like to tip my hat to the designers out there who are trying to do something more interesting.

It’s also important to note that you can use any or all of the above and still create a unique design. It’s all in how you wield the tools that are available to you.

How To Challenge The Status Quo

At this point, you’ve already decided whether or not you care if your site designs are unique. Maybe that’s not your thing — that’s completely acceptable. If you find yourself wanting to break out of your typical workflow, though, here are a few ideas to get you going and some sites that serve as great examples.

Get Weird With Layout

Close your prototyping app, take out a pen and some paper, and think about how you can make an interesting, usable layout that’s not something you’ve ever done before.

Phases Magazine

Phases Magazine1917 is a good example of a site doing something unexpected with layout. It’s boxy — there is a grid at play here — and yet somehow they made it feel totally outside the typical web design experience (the screenshot doesn’t really give you a good feel for it; be sure to visit the site). If you see this and think, “Whoa, that’s weird,” good! That’s what they’re going for. Some will love it, some will hate it, but I really like that they’re trying something different.

Phases Magazine uses an unconventional grid.18
Phases Magazine1917 uses an unconventional grid. (View large version2220)

Unfortunately, the site’s overall experience is quite poor. There’s some unnecessary scrolljacking, and the seemingly responsive layout breaks massively in certain viewports.

Phases Magazine's layout breaks on smaller screens.21
Phases Magazine’s layout breaks on smaller screens. (View large version2220)
Curious Space

A better implementation of a similar idea is Curious Space282523.

The layout of Curious Space.24
The layout of Curious Space282523. (View large version26)

Here the grid still has a more organic feel, but scrolling functionality is normal and the breakpoints are perfectly functional.

Curious Space adapts well to different devices.27
Curious Space282523 adapts well to different devices. (View large version29)

There are a lot of nice little design touches that you notice as you interact with the site. For instance, the image stack order changes on hover:

Hovering with a mouse brings content to the foreground.30
Hovering with a mouse brings content to the foreground. (View large version31)

Also, they have a bit of fun with scrolling, but it’s not disrupting in the least, and it fits with the haphazard visual theme of the site. The logo starts off as a jumble of letters, but as you scroll, they fall into place and form “Curious Space” in the navigation bar.

The letters of the logo fall into place as you scroll.32
The letters of the logo fall into place as you scroll. (View large version33)
Le Temps D’un Trajet

Another interesting example is Le Temps d’un trajet3634. Once again, we see a non-standard grid, but instead of being sporadic, the layout is more intentional and clustered.

The homepage layout of Le Temps d'un trajet.35
The homepage layout of Le Temps d’un trajet3634. (View large version37)

Each block in the arrangement is a static image that turns into a short video on hover. The coolest part, though, is how the grid shifts fluidly to accommodate focusing on different nodes.

Don’t Be A Square

One easy way to give your site a different atmosphere is to think outside the box. As cringeworthy as that sounds, when you open yourself up to different geometry, things can get really interesting.

Built By Buffalo
Hexagonal layout.38
Built By Buffalo4139 uses hexagons for layout. (View large version40)

Check out the hexagon hive that Built By Buffalo4139 has going on. This gallery design doesn’t translate nicely to mobile, so they simply switch to rectangles at one of their breakpoints. This is a great example of doing something unique where appropriate, but realizing where the boundary should be drawn to give your users the best possible experience.

The layout switches to rectangles on narrower viewports.42
The layout switches to rectangles on narrower viewports. (View large version43)
Anakin Design Studio

One of my favorite sites in this vein that I’ve seen recently is Anakin Design Studio4644. Not only is the layout beautiful and unpredictable, the shapes at play here are all far outside what you’d expect scrolling through today’s websites.

Homepage of Anakin Design Studio.45
Anakin Design Studio4644‘s homepage. (View large version47)

As you can see, the huge, masked typography makes a bold impression. Beyond that though, if you move down the page you see a display of recent work. Most designers would put a simple rectangular thumbnail grid here and call it a day, but Anakin has played with the shapes to make it a lot more interesting. They’re still rectangular images, but they’ve used white backgrounds to create the illusion of varying shapes.

Anakin Design Studio's portfolio of work.48
Anakin Design Studio’s portfolio. (View large version49)
Avex Designs; Mathilde Jacon

Here are some other sites doing unexpected experiments with interesting shapes.

Examples of interesting shapes from Avex Designs and Mathilde Jacon.50
Avex Designs51 and Mathilde Jacon52 use unconventional shapes to create unique experiences. (View large version53)

Go Organic

Fixate; For Better Coffee

Sites like Fixate5754 and For Better Coffee5855 combine illustration with organic, crazy-busy layouts that make for powerful and memorable experiences.

Complex illustrated layouts.56
Fixate5754 and For Better Coffee5855 use highly illustrated layouts to help them stand out.(View large version59)

The layouts above only seem complex because of the artwork; in reality, they can be pulled off fairly easily. Custom illustration work is a fantastic way to communicate a unique brand personality in a world lost in minimal thumbnail grids that all look the same.

For Better Coffee uses entertaining animations to track the coffee bean through the coffee creation process as you scroll. The experience is smooth, and it doesn’t jump the page to predefined points, so scrolling becomes a story-telling feature.

Coffee bean story.60
A coffee bean falls toward a grinder as the page is scrolled. (View large version61)
Pouring coffee.62
Further down the page, scrolling pours fresh coffee into a cup. (View large version63)
HappyFunCorp

While we’re on the topic of beautifully illustrated sites, you should check out HappyFunCorp64.

At first, it seems like a fairly normal site with some fun little animations. The cool part happens when you start to navigate. The scene on the homepage serves as the basis for the rest of the site, so when you follow a link, instead of loading a brand-new page it zooms in to a detail of the whole scene.

A zoomed-in section of the HappyFunCorp site.65
Following a link zooms in to a detail. (View large version66)

It’s quirky, but I love the original thinking that went into it. Also, because the navigation is still presented in a standard way means that there’s no learning curve for users. The whole experience in delightfully unexpected, but in a way that doesn’t contradict how you normally interact with a site.

Vary The Experience

One basic expectation that users have is that everyone who lands on the same site will receive the same experience; a fun way to do something different is to toss that out the window. Vasilis van Gemert’s site6967 not only uses a unique, overlapping box layout, it also changes its entire color scheme for every visit.

Three different color schemes.68
Three different color schemes from Vasilis van Gemert’s site6967. (View large version70)

This creative feature extends beyond the homepage to all of the major subpages.

Subpages also change their color schemes.71
Subpages also change their color schemes. (View large version72)

Create A Unique Visual Theme

Another way to make your site design unique is to decide on an entertaining or interesting theme that you can use as the basis of all your design decisions. This provides a nice framework for everything you do and encourages you to explore beyond traditional UI.

While not appropriate for all sites (a government website, for instance), for things like event announcements or small company pages it can be refreshing. The new site for dConstruct 20157573 is a great example of this idea.

Part of the retro-futuristic design for dConstruct 2015.74
Part of the retro-futuristic design of the dConstruct 20157573 site. (View large version76)

As you can see, they went for a retro-futuristic vibe, heavily reminiscent of The Jetsons77. The result is a site that’s flat out fun to scroll through as you discover the how they present each new section.

A detail from the dConstruct design.78
A detail from the dConstruct design. (View large version79)

There are a couple of really great things to note about this site. First of all, the headline treatments are wonderfully retro, using a combination of Lamplighter Script and Andes.

The best part, though, is that these are live web fonts with the diagonal direction implemented via a simple CSS skew. The repetition of diagonal lines throughout the site helps the design feel both consistent and creative.

Styled web fonts mean selectable text.80
With creative use of styled web fonts, all the text is selectable. (View large version81)

This site is a great example of how responsive design doesn’t have to be boring. The layout doesn’t feel boxy or typical, and yet it manages to reflow nicely to any viewport size. In fact, I really love how creative they were with transforming elements for smaller screens. For instance, as your viewport shrinks, the ticket graphic shown below jumps into an animated transform that shifts from horizontal to vertical orientation. It’s a tiny detail, but it’s clever and shows how much thought was put into every aspect of the layout.

26-dconstruct-opt-small82
For narrow viewports, the ticket flips from horizontal to vertical. (View large version83)

Hats off to Clearleft84 for the great work on this one.

Use Stock As An Input, Not An End Result

I work at Creative Market85, so I’m absolutely in favor of using great stock graphics, fonts, photos, and more. Quality stock resources can be immensely helpful for every designer, but how you use them is an important consideration. Whether you’re using some interesting vector artwork, an icon set, or a full-blown website theme, consider putting in some extra effort so that your implementation doesn’t look exactly like that of everyone else. The vast majority of people downloading that asset won’t bother with much or any customization, so a little bit goes a long way.

The Trouble With Unique Sites

Finding sites that are truly surprising and unique is a tall order. I put in hours of site searching to prepare for this article and still feel like I have very little to show for it. One overwhelming trend I’ve found is that it often feels like the only designers really pursuing unique web design are producing sites with wonky user experiences.

Experimentation is great, but sites that confuse users with weird, unexpected and unpleasant UX often fall short of their goals. Many of these sites take a step backwards by presenting us with Flash-like experiences: long loading times, overly ornate animations, jumpy scrolling, and complex user flows. There is a middle ground. You can create beautiful, unique looking websites without trying to reinvent the interaction wheel.

Web Design Lives

Standardization and predictable design will always have their place on the web. In fact, they may be the best possible solution for presenting most types of content to most screens. That said, we should let our creative instincts fight it out with our analytical instincts from time to time.

Let’s do our part to make sure the web remains what it has always been: a place for technology, art and design to overlap in new and interesting ways. Be a pioneer, try something you’ve never seen anyone do — and yes, make lots of mistakes along the way. It’s great to create something weird every now and then, even if other people hate it. That’s how this crazy thing called the web was built, and that’s how we’ll keep pushing it forward.

Ultimately, despite the fact that plenty of sites look pretty similar, I don’t believe that web design has reached a point of stagnation. There are countless extremely talented designers creating unbelievable sites, constantly raising the bar for their peers. This topic is wide open for debate, though. I’d love to hear your thoughts about the state of design on the web, and who you think is doing the most interesting work.

(ml, og)

Footnotes

  1. 1 http://www.creativebloq.com/web-design/why-web-design-losing-its-soul-51514950
  2. 2 http://www.smashingmagazine.com/wp-content/uploads/2015/06/01-awwwards-opt.jpg
  3. 3 http://www.awwwards.com/nominees/
  4. 4 http://www.smashingmagazine.com/wp-content/uploads/2015/06/01-awwwards-opt.jpg
  5. 5 http://www.smashingmagazine.com/wp-content/uploads/2015/06/02-layout-opt.jpg
  6. 6 http://www.smashingmagazine.com/wp-content/uploads/2015/06/02-layout-opt.jpg
  7. 7 http://www.smashingmagazine.com/wp-content/uploads/2015/06/03-prototyping-tools-opt.png
  8. 8 http://www.smashingmagazine.com/wp-content/uploads/2015/06/03-prototyping-tools-opt.png
  9. 9 http://www.smashingmagazine.com/wp-content/uploads/2015/06/04-free-stockphotos-opt.jpg
  10. 10 http://www.smashingmagazine.com/wp-content/uploads/2015/06/04-free-stockphotos-opt.jpg
  11. 11 http://www.smashingmagazine.com/wp-content/uploads/2015/06/05-stockphoto-examples-opt.jpg
  12. 12 http://thevillagestyle.com/adventure1/
  13. 13 http://jigglist.com
  14. 14 http://www.collegeessayguy.com/
  15. 15 http://www.getbusymakemoney.com
  16. 16 http://www.smashingmagazine.com/wp-content/uploads/2015/06/05-stockphoto-examples-opt.jpg
  17. 17 http://www.phasesmag.com
  18. 18 http://www.smashingmagazine.com/wp-content/uploads/2015/06/06-phases-magazine-opt.jpg
  19. 19 http://www.phasesmag.com
  20. 20 http://www.smashingmagazine.com/wp-content/uploads/2015/06/06-phases-magazine-opt.jpg
  21. 21 http://www.smashingmagazine.com/wp-content/uploads/2015/06/07-phases-magazine-opt.jpg
  22. 22 http://www.smashingmagazine.com/wp-content/uploads/2015/06/06-phases-magazine-opt.jpg
  23. 23 http://www.curiousspace.com
  24. 24 http://www.smashingmagazine.com/wp-content/uploads/2015/06/08-curious-space-opt.jpg
  25. 25 http://www.curiousspace.com
  26. 26 http://www.smashingmagazine.com/wp-content/uploads/2015/06/08-curious-space-opt.jpg
  27. 27 http://www.smashingmagazine.com/wp-content/uploads/2015/06/09-curious-space-opt.jpg
  28. 28 http://www.curiousspace.com
  29. 29 http://www.smashingmagazine.com/wp-content/uploads/2015/06/09-curious-space-opt.jpg
  30. 30 http://www.smashingmagazine.com/wp-content/uploads/2015/06/10-curious-space-opt.jpg
  31. 31 http://www.smashingmagazine.com/wp-content/uploads/2015/06/10-curious-space-opt.jpg
  32. 32 http://www.smashingmagazine.com/wp-content/uploads/2015/06/11-curious-space-opt.jpg
  33. 33 http://www.smashingmagazine.com/wp-content/uploads/2015/06/11-curious-space-opt.jpg
  34. 34 http://letempsduntrajet.fr
  35. 35 http://www.smashingmagazine.com/wp-content/uploads/2015/06/12-le-temps-dun-trajet-opt.jpg
  36. 36 http://letempsduntrajet.fr
  37. 37 http://www.smashingmagazine.com/wp-content/uploads/2015/06/12-le-temps-dun-trajet-opt.jpg
  38. 38 http://www.smashingmagazine.com/wp-content/uploads/2015/06/12b-build-by-buffalo-opt.jpg
  39. 39 http://builtbybuffalo.com
  40. 40 http://www.smashingmagazine.com/wp-content/uploads/2015/06/12b-build-by-buffalo-opt.jpg
  41. 41 http://builtbybuffalo.com
  42. 42 http://www.smashingmagazine.com/wp-content/uploads/2015/06/13-build-by-bufallo-opt.jpg
  43. 43 http://www.smashingmagazine.com/wp-content/uploads/2015/06/13-build-by-bufallo-opt.jpg
  44. 44 http://www.anakin.co/en
  45. 45 http://www.smashingmagazine.com/wp-content/uploads/2015/06/14-anakin-opt.jpg
  46. 46 http://www.anakin.co/en
  47. 47 http://www.smashingmagazine.com/wp-content/uploads/2015/06/14-anakin-opt.jpg
  48. 48 http://www.smashingmagazine.com/wp-content/uploads/2015/06/15-anakin-opt.jpg
  49. 49 http://www.smashingmagazine.com/wp-content/uploads/2015/06/15-anakin-opt.jpg
  50. 50 http://www.smashingmagazine.com/wp-content/uploads/2015/06/16-interesting-shapes-opt.png
  51. 51 http://avexdesigns.com/
  52. 52 http://www.mathildejacon.com/
  53. 53 http://www.smashingmagazine.com/wp-content/uploads/2015/06/16-interesting-shapes-opt.png
  54. 54 http://fixate.it
  55. 55 http://forbetter.coffee
  56. 56 http://www.smashingmagazine.com/wp-content/uploads/2015/06/17-organic-sites-opt.png
  57. 57 http://fixate.it
  58. 58 http://forbetter.coffee
  59. 59 http://www.smashingmagazine.com/wp-content/uploads/2015/06/17-organic-sites-opt.png
  60. 60 http://www.smashingmagazine.com/wp-content/uploads/2015/06/18-for-better-coffee-opt.png
  61. 61 http://www.smashingmagazine.com/wp-content/uploads/2015/06/18-for-better-coffee-opt.png
  62. 62 http://www.smashingmagazine.com/wp-content/uploads/2015/06/19-for-better-coffee-opt.png
  63. 63 http://www.smashingmagazine.com/wp-content/uploads/2015/06/19-for-better-coffee-opt.png
  64. 64 http://happyfuncorp.com/#home
  65. 65 http://www.smashingmagazine.com/wp-content/uploads/2015/06/20-happy-fun-corp-opt.png
  66. 66 http://www.smashingmagazine.com/wp-content/uploads/2015/06/20-happy-fun-corp-opt.png
  67. 67 https://vasilis.nl/
  68. 68 http://www.smashingmagazine.com/wp-content/uploads/2015/06/21-vasilis-van-gemert-opt.png
  69. 69 https://vasilis.nl/
  70. 70 http://www.smashingmagazine.com/wp-content/uploads/2015/06/21-vasilis-van-gemert-opt.png
  71. 71 http://www.smashingmagazine.com/wp-content/uploads/2015/06/22-vasilis-van-gemert-opt.png
  72. 72 http://www.smashingmagazine.com/wp-content/uploads/2015/06/22-vasilis-van-gemert-opt.png
  73. 73 http://2015.dconstruct.org
  74. 74 http://www.smashingmagazine.com/wp-content/uploads/2015/06/23-dconstruct-opt.jpg
  75. 75 http://2015.dconstruct.org
  76. 76 http://www.smashingmagazine.com/wp-content/uploads/2015/06/23-dconstruct-opt.jpg
  77. 77 https://en.wikipedia.org/wiki/The_Jetsons
  78. 78 http://www.smashingmagazine.com/wp-content/uploads/2015/06/24-dconstruct-opt.jpg
  79. 79 http://www.smashingmagazine.com/wp-content/uploads/2015/06/24-dconstruct-opt.jpg
  80. 80 http://www.smashingmagazine.com/wp-content/uploads/2015/06/25-dconstruct-opt.jpg
  81. 81 http://www.smashingmagazine.com/wp-content/uploads/2015/06/25-dconstruct-opt.jpg
  82. 82 http://www.smashingmagazine.com/wp-content/uploads/2015/06/26-dconstruct-opt.jpg
  83. 83 http://www.smashingmagazine.com/wp-content/uploads/2015/06/26-dconstruct-opt.jpg
  84. 84 http://clearleft.com
  85. 85 https://creativemarket.com

The post Beyond The Boring: The Hunt For The Web’s Lost Soul appeared first on Smashing Magazine.

Source link

Omaha’s Local Web Design Agency

Responsive Typography With Sass Maps

Omaha Web Design


  

Managing consistent, typographic rhythm isn’t easy, but when the type is responsive, things get even more difficult. Fortunately, Sass maps make responsive typography much more manageable.

Responsive Typography With Sass Maps

Writing the code is one thing, but keeping track of font-size values for each breakpoint is another — and the above is for paragraphs alone. Throw in h1 to h6s, each with variable font sizes for each breakpoint, and it gets cumbersome, especially when the type doesn’t scale linearly.

The post Responsive Typography With Sass Maps appeared first on Smashing Magazine.

Source link

Omaha’s Local Web Design Agency

Benton Modern, A Case Study On Art-Directed Responsive Web Typography

Omaha Web Design

Having the ability to set legible body copy is an absolute must, and we’ve come a long way with web typography since the dawn of web design. However, I feel like we have allowed the lack of variety prior to the rise of web fonts to dampen our creativity now that thousands of web fonts are at our disposal. Have usability conventions and the web’s universality steered us away from proper art direction? Have we forgotten about art direction altogether? I believe so.

As designers, we can achieve much more with type, and with just a little more thought and creativity, we can finally start to take full advantage of the type systems available. Let’s look at ways we can push typographic design on the web further, beyond the status quo of today.

1
Benton Modern Formal version. (View large version2)

The Benton Modern brochure website3 (a project I was involved in) is a perfect example for showcasing how a large type family can be utilized to improve legibility and readability across breakpoints, while at the same time evoking emotion and providing a pleasant experience. We shall explore the ideas introduced to push the boundaries of typographic design on the web and get practical, too, with a key focus on responsive web typography.

First, The Basics Of Responsive Web Typography

You’re probably aware of responsive web typography by now and how it can solve challenges outside of core responsive web design. However, as the focus of this article isn’t on the ins and outs of responsive web typography, we shall not be exploring it in any great detail.

If you’re interested in learning more about general typesetting for the web and how to approach certain issues, many4 resources exist5 to help you.

Furthermore, my “Responsive Typography6” talk and chapter in Smashing Book 47, in which I propose reusing “traditional” typography rules and translating them to the language of CSS, should help kickstart any aspiring web typographer to improve their typography game.

To also help you on your way, here’s a quick rundown of some of the methods I’ve been advocating in recent years, methods that were applied to the Benton project, too:

  • Provide different font sizes for different reading distances, currently achievable by detecting a device’s form factor using @media queries. Long term, this is probably not ideal — that is, until reading distance-detection techniques8 become more feasible. In the meantime, use Size Calculator9 by Nick Sherman10 and Chris Lewis11 to calculate the physical or perceived font size when factoring in reading distance.
  • Maintain perfect proportions in a paragraph with letter spacing, word spacing and line height properties for each breakpoint. Universal Typography’s demo12 by Tim Brown13 of Nice Web Type14 is a very useful tool that can help you experiment with and adjust your paragraph proportions accordingly.
  • Establish hierarchy using either a typographic scale (Modular Scale15 is a useful tool by Tim Brown and Scott Kellum16) or different styles at the same font size — for instance, uppercase for h2, small caps for h3 and italics for h4 subheads. For more options and ideas on styling subheads, may I suggest you read “Setting Subheads With CSS17” and explore examples of subheads set with CSS18.
  • For small screens, indent paragraphs and separate page sections with white space. For large screens, use block paragraphs and separate page sections with graphical elements (lines, shapes, color).
  • Use graded fonts to normalize rendering across different pixel densities. Font grades are very subtle font weights used to compensate for different ink and paper qualities, as well as for different pixel densities on screen. This method is explained in detail in iA19’s article “New Site With Responsive Typography20.” In short, lighter grades are used for low-DPI screens and heavier grades for high-DPI screens, while graded fonts will also compensate for different sub-pixels’ direction between portrait and landscape mode on mobile and tablet devices.
  • Look for type families that have multiple optical sizes21, and use appropriate styles for body copy, tiny text and display sizes. For instance, Font Bureau22, the company behind the Benton Modern family, makes many families like this with a wide stylistic palette.
  • Use different font widths according to the width of the screen (see what happens with the subheads on the Benton website23 when you resize the browser window). For instance, use a condensed font for small screens and a wider font for larger desktop screens, just like on the brochure website for Input24 (again, resize the window). In the case of the Benton project, we set different font widths manually for each breakpoint, but there’s also a solution for automatic swapping using Font-To-Width25 (by Sherman and Lewis) that takes advantage of multiple-width type families to fit pieces of text snugly within their containers.

    Here’s another tip: If you intend to use Georgia or Verdana on large screens, replace them with Georgia Pro Condensed or Verdana Pro Condensed26 on mobile screens. The reason why Georgia Pro and Verdana Pro’s condensed widths work well at small sizes is because they aren’t extremely condensed and, hence, can still be read comfortably.

With this basic primer on responsive web typography out of the way, let me walk you through the process of designing a web page that is meant not only to inform, but to amaze!

Show, Don’t Tell

Webtype27 commissioned us to build a brochure website for Benton Modern soon after Indra Kupferschmid28 had seen my talk on responsive web typography at Smashing Conference in Oxford. The brief was to showcase what could be achieved typographically with a versatile type family coupled with responsive web typography using as many responsive techniques as possible, essentially putting into practice the elements presented and demonstrated in my talk. With Indra Kupferschmid as the chief type savant and Nick Sherman as the onboard quality assurance director, there was certainly to be no trouble with experimenting and pushing the boundaries.

From the very start, we wanted the user to experience the type family through the design and not just through a full page of body copy. That being said, in searching for the right metaphor to use, we eventually settled on creating two distinctive designs — the formal29 and the expressive30. Both are fully responsive, utilizing the same HTML, and for all intents and purposes showcase the benefits of separating structure from presentation, so don’t forget to resize your browser and inspect the HTML and CSS.

Learning About The Typeface

Indra’s elaborate copy was a good starting point to get to know the typeface. When you receive content up front, as was the case in this project, it’s so much easier to create semantic HTML and to explore different styles. Here’s how we started our investigative testing, bearing in mind that Benton Modern comprises 48 styles in total:

  1. First, we tested all of the styles at large and small sizes, stretching and squeezing every which way possible. We used Reading Edge optical sizes31 (designed for 9- to 14-pixel font sizes) as subheads, and display optical sizes (designed for headlines) for body copy. We wanted to see what could go wrong and challenge the intended use for each style. However, the solution that we settled on was still pretty much in line with the intended use for each optical size.
  2. Next, we tested how different styles behave in narrow columns versus wider blocks of text. Hyphenated and justified verus left-aligned. Tightly spaced versus loosely spaced.
  3. Lastly, we analyzed all of the glyphs one by one, searching for little hidden gems. Apart from the ampersand — which is always an obvious choice — another good candidate was the uppercase R.
An early stage prototype32
An early-stage prototype. (View large version33)

From there, the next step was to apply some basic styles to the page. One of the early ideas was to adopt a traditional newspaper column layout, which we tried. With the exception of this high-level concept, we still didn’t have a definitive layout concept by this point.

Indented paragraphs in columns were too narrow to be justified and hyphenated34 properly, so we just kept the hyphenation to improve the texture a little bit.

.columns p 
   -webkit-hyphens: auto;
   -moz-hyphens: auto;
   hyphens: auto;

.columns p + p 
   text-indent: 1.5rem;

We used columns only when there was enough horizontal space. But we also wanted to avoid columns bleeding out of the screen vertically, because that would require scrolling up and down during reading when moving from column to column. That’s why we introduced another @media query to test the height of the screen before applying columns.

@media only screen and (min-height: 25em) 

   @media only screen and (min-width: 40em) and (max-width: 59.9375em) 
      -webkit-columns: 2;
      -moz-columns: 2;
      columns: 2;
      -webkit-column-gap: 2.7em;
      -moz-column-gap: 2.7em;
      column-gap: 2.7em;
   

   @media only screen and (min-width: 60em) 
      -webkit-columns: 3;
      -moz-columns: 3;
      columns: 3;
      -webkit-column-gap: 2.7em;
      -moz-column-gap: 2.7em;
      column-gap: 2.7em;
   
 

Designing Content

The next step was to analyze the content in more detail. That way, we were able to establish what the different sections were and adjust the details as we went along.

The formal version was the first to be developed. We created a huge headline to reflect newspaper headlines and added the year that the series started. The deck was the obvious element to style next. We experimented with a condensed version, and to our surprise it worked immediately. At that stage, the page navigation still didn’t exist and was only included much later on to improve overall usability, as well as to demonstrate the use of brackets as graphic elements.

The sections were a little dull, though. The hierarchy and arrangement of subhead, intro paragraph and columns were quickly established using the rules explained previously, but something was still missing. After some trial and error, we decided to separate the different sections with dotted borders to further emphasize the fine detail in the design of the Benton Modern series, and we introduced the section sign § (Alt + 6 on a Mac) to mark the sections. However, that still wasn’t good enough, so we again previewed numerous glyphs to find suitable candidates for other sections. We ended up using § for “About,” • for “Optical Sizes,” an italic i for “How to Use,” + for “Bonus Features” and * for “Pairings.” Some of these characters are rarely used in web design, so introducing them as decorations felt natural.

Plenty of little details35
Plenty of little details. (View large version36)

At this point the design was pretty solid, but we still needed to highlight the most impressive facts to showcase to the reader the inherent versatility of the family. So we established a no-nonsense look and feel by enlarging the important numbers: 3 optical sizes, 48 styles to choose from, and 4 widths in display styles.

The first version of pairing swatches was set in Pinterest37-inspired columns, as with the rest of the sections. Yet we had a need to change it — at least slightly — because this section was not about Benton Modern, but about its companions. Benton Modern RE fonts38 are really great at small sizes, so introducing the pairs as contrasting large headlines made sense. Indra’s selection of pairings worked very well without many additional adjustments. The only areas that required special attention were the custom sizes for each headline, especially if we wanted the headlines to resize with the screen.

Viewport Width For Smooth Type Scaling

The only CSS units that support smooth scaling are vw (1% of the viewport’s width), vh (1% of the viewport’s height), vmax (1% of the longest side) and vmin (1% of the shortest side). The resulting CSS for one headline is composed of three font-size declarations — values in pixels, root ems39 (rems) and viewport widths — one for each flexible breakpoint (small to medium screens) that covers older browsers, too:

#swatch-benton-sans h1  
   @include rem(font-size, #208/16); 

@media only screen and (max-width: 29.9375em) 
   #swatch-benton-sans h1 
      @include rem(font-size, #57/16); 
      font-size: 18.75vw; 
   

@media only screen and (min-width: 30em) and (max-width: 61.9375em) 
   #swatch-benton-sans h1 
      @include rem(font-size, #86/16);
      font-size: 20vw; 
   

As you can see, we’re using a Sass mixin here. It returns the given property with values in pixels, as well as in root em units.

@mixin rem($property, $values) 
   $max: length($values);
   $pxValues: ‘’;
   $remValues: ‘’;
   
   @for $i from 1 through $max 
      $value: strip-unit(nth($values, $i));
      $pxValues: #$pxValues + $value*16px;
      @if $i < $max 
         $pxValues: #$pxValues + " ";
      
    
   
   @for $i from 1 through $max 
      $value: strip-unit(nth($values, $i));
      $remValues: #$remValues + $valuerem;
      @if $i < $max 
         $remValues: #$remValues + " ";
      
    
   
   #$property: $pxValues; 
   #$property: $remValues; 

OpenType Features

Whenever you need to showcase important details within the content — in this case, OpenType features such as the alternate R, the ligatures and the small caps — it’s always good to highlight these features in an interesting way. We didn’t want to use CSS images for graphic details, so we simply enlarged the type and brought the details to focus. The difference between ligatures and default glyphs is clear, and comparing small caps with uppercase and lowercase counterparts is easy.

OpenType Features40
OpenType Features. (View large version41)

If you were wondering how to enable OpenType features in CSS, here are a couple of examples with vendor prefixes:

/* Alternate characters */
-webkit-font-feature-settings: "ss01";
-moz-font-feature-settings: "ss01" 1;
font-feature-settings: "ss01";

/* Common ligatures (ff, fi, ffi, fl, ffl, fj, …) */
-webkit-font-feature-settings: "liga";
-moz-font-feature-settings: "liga" 1;
font-feature-settings: "liga";

/* Small caps */
-webkit-font-feature-settings: "smcp";
-moz-font-feature-settings: "smcp" 1;
font-feature-settings: "smcp";

You can test all of the OpenType features available with CSS in Richard Rutter42’s CSS3 Font-Feature-Settings OpenType Demo43. Consult Bram Stein44’s excellent The State of Web Type45 to check which features are supported in which browsers and to what extent.

OpenType Features in Safari Are… a Drag

There’s one piece of bad news. Safari on both Mac and iOS support OpenType features but ignores any assigned value46. The safest way to use alternate characters or small caps in Safari is by loading subset fonts (subset fonts contain only a subset of glyphs from the full font file). For the Benton Modern project, we decided to test browser capabilities with @support before applying small caps, and we provided a fallback for browsers that don’t support font-feature-settings:

@supports ((font-feature-settings: "smcp") or
   (-webkit-font-feature-settings: "smcp") or 
   (-moz-font-feature-settings: "smcp" 1)) 
   .small-caps 
      text-transform: lowercase; 
      -webkit-font-feature-settings: "smcp"; 
      -moz-font-feature-settings: "smcp" 1;
      font-feature-settings: "smcp"; 
   

Expressive Details

The Formal newspaper-inspired style looked really great. It was well organized, with plenty of small details. But we wanted to push the design a little further. How about creating a magazine-inspired design? We retained the same emphasis on elements as in the formal version but fed the opening section and all section subheads with steroids using pseudo-elements (for example, the R and the asterisk on the “cover” page), and we created a specific arrangement for each subhead by repositioning each word in a subhead in a Lubalinesque47 manner.

Expressive Details48
Expressive Details. (View large version49)

3D Effects

The 3D effect on “The Complete Series” was achieved with multiple text shadows, as explained in Tim Brown’s Typekit Practice50 lesson “Using Shades for Eye-Catching Emphasis51.”

3D Effects52
3D Effects. (View large version53)

Drop Caps

Drop caps can be achieved simply by floating the first character. But vertical metrics complexities54 as well as cross-browser inconsistency make it virtually impossible to get drop caps right. Luckily, Adobe engineers wrote dropcap.js55, a small script that solves that problem. The setup is very straightforward, and it’s easy to adjust positioning by specifying the number of lines the drop cap should span, as well as the height of the drop cap itself. There’s a bonus: The script doesn’t require any external JavaScript libraries.

var dropcaps = document.querySelectorAll(‘.drop-cap’);

if (window.innerWidth < 600) 
   window.Dropcap.layout(dropcaps, 3);
 else 
   window.Dropcap.layout(dropcaps, 5, 3);

Drop Caps56
Drop Caps. (View large version57)

Flipped and Rotated Type

All elements that needed special treatment were wrapped in their respective spans and given dedicated class names. This meant adding non-semantic markup, but there was no other way around it, especially if we wanted to take full control over the presentation.

Flipped and Rotated Type58
Flipped and Rotated Type. (View large version59)

We flipped parts of the pairings section subhead with the transform: scale rule. The great thing is that if the transform property is not supported by the browser, nothing will happen.

.flip 
   display: block;
   -webkit-transform: scale(-1, -1);
   -moz-transform: scale(-1, -1);
   transform: scale(-1, -1);

Flipped and Rotated Type60

Flipped and Rotated Type. (View large version61)

The same applies to the O in the “Bonus Features,” which we rotated with the transform: rotate rule. When rotating letters, you might want to readjust the positioning after rotation (watch out for the aforementioned vertical metrics issues). The values will vary from typeface to typeface and glyph to glyph, so there’s no generic rule.

.o 
   -webkit-transform: rotate(90deg);
   -moz-transform: rotate(90deg);
   transform: rotate(90deg);
   /* Glyph-specific adjustments */

Setting Expressive Subheads

Setting responsive expressive subheads is a piece of cake when you grasp the underlying concept. We need to do only two things:

  1. set the font size of a container in viewport width units,
  2. size everything that’s inside the container in em units.
<div class="container">
   <h1>
      <span class="s1">You</span>
      <span class="s2">&</span>
      <span class="s3">Me</span>
   </h1>
</div>

Elements inside the container can be repositioned either absolutely or using negative margins. If you’re using absolute positioning, then it’s best to fix the aspect ratio of the h1, thus retaining proportions. If you’re fixing the aspect ratio, you can also use percentages instead of ems, because now you have a height reference for vertical properties in place.

Setting Expressive Subheads62

Setting Expressive Subheads. (View large version63)

Example of positioning with margins:

.container 
   font-size: 10vw;

.container h1 
   font-size: 1em;
   line-height: 1;
   width: 100%;

.s1 
   margin-left: 1em;
   margin-top: 1em;

Example of absolute positioning:

.container 
   font-size: 10vw;

.container h1 
   font-size: 1em;
   line-height: 1;
   position: relative;
   width: 100%;
   height: 0;
   padding-top: 75%; /* 4:3 aspect ratio */
   padding-top: 50%; /* 2:1 aspect ratio */

.s1 
   position: absolute;
   left: 10%;
   top: 10%;

Voila! Compare all three positioning variants in the Expressive Web Typography64 demo.

Steal Ideas!

Now you hopefully see how far we can take typography on the web. To take full advantage of the methods discussed in this article, look for type families with multiple font styles and optical sizes. The only reason we were able to make all of these responsive adjustments is that the Benton Modern is such a versatile typeface family with so many variants.

View the HTML and CSS source on Benton Modern65, use those techniques to improve typography in your own projects, and let us know if you come up with something different. Setting type on the web still involves a lot of manual labor, especially for the smaller, more delicate details, but typographic tools are emerging66 to speed up the process. Until then, don’t be intimidated because there is always a solution to a given problem. The next time you are offered a challenging project, bite the bullet, test like crazy, and do whatever it takes.

(al, ml)

Footnotes

  1. 1 http://www.smashingmagazine.com/wp-content/uploads/2015/05/01-formal-opt.jpg
  2. 2 http://www.smashingmagazine.com/wp-content/uploads/2015/05/01-formal-opt.jpg
  3. 3 http://bentonmodern.webtype.com/
  4. 4 http://nicewebtype.com/
  5. 5 http://rwt.io/
  6. 6 https://vimeo.com/96406270
  7. 7 https://shop.smashingmagazine.com/products/smashing-book-4-ebooks
  8. 8 http://webdesign.maratz.com/lab/responsivetypography/
  9. 9 http://sizecalc.com
  10. 10 http://nicksherman.com
  11. 11 http://chrislewis.codes
  12. 12 http://universaltypography.com/demo
  13. 13 https://twitter.com/timbrown
  14. 14 http://twitter.com/nicewebtype
  15. 15 http://modularscale.com
  16. 16 https://twitter.com/scottkellum
  17. 17 http://blog.typekit.com/2013/07/25/setting-subheads-with-css/
  18. 18 http://webdesign.maratz.com/lab/subheads/
  19. 19 http://ia.net
  20. 20 http://ia.net/know-how/responsive-typography
  21. 21 http://kupferschrift.de/cms/2012/05/multi-axes-families/
  22. 22 http://www.fontbureau.com/
  23. 23 http://bentonmodern.webtype.com/
  24. 24 http://input.fontbureau.com/info/
  25. 25 http://font-to-width.com
  26. 26 http://georgiaverdana.com
  27. 27 http://www.webtype.com/
  28. 28 http://kupferschrift.de/
  29. 29 http://bentonmodern.webtype.com/formal/
  30. 30 http://bentonmodern.webtype.com/expressive/
  31. 31 http://www.fontbureau.com/ReadingEdge/
  32. 32 http://www.smashingmagazine.com/wp-content/uploads/2015/05/02-early-opt.jpg
  33. 33 http://www.smashingmagazine.com/wp-content/uploads/2015/05/02-early-opt.jpg
  34. 34 http://practicaltypography.com/hyphenation.html
  35. 35 http://www.smashingmagazine.com/wp-content/uploads/2015/05/05-separators-opt.jpg
  36. 36 http://www.smashingmagazine.com/wp-content/uploads/2015/05/05-separators-opt.jpg
  37. 37 https://www.pinterest.com/
  38. 38 http://www.webtype.com/font/bentonmodern-re-family/
  39. 39 http://www.w3.org/TR/css3-values/#rem-unit
  40. 40 http://www.smashingmagazine.com/wp-content/uploads/2015/05/04-opentype-opt.jpg
  41. 41 http://www.smashingmagazine.com/wp-content/uploads/2015/05/04-opentype-opt.jpg
  42. 42 https://twitter.com/clagnut
  43. 43 http://clagnut.com/sandbox/css3/
  44. 44 https://twitter.com/bram_stein
  45. 45 http://www.stateofwebtype.com/#font-feature-settings
  46. 46 http://www.stateofwebtype.com/#font-feature-settings
  47. 47 http://lubalincenter.cooper.edu
  48. 48 http://www.smashingmagazine.com/wp-content/uploads/2015/05/06-expressive-opt.jpg
  49. 49 http://www.smashingmagazine.com/wp-content/uploads/2015/05/06-expressive-opt.jpg
  50. 50 http://practice.typekit.com/
  51. 51 http://practice.typekit.com/lesson/using-shades/
  52. 52 http://www.smashingmagazine.com/wp-content/uploads/2015/05/07-3d-opt.jpg
  53. 53 http://www.smashingmagazine.com/wp-content/uploads/2015/05/07-3d-opt.jpg
  54. 54 http://blog.typekit.com/2010/07/14/font-metrics-and-vertical-space-in-css/
  55. 55 http://webplatform.adobe.com/dropcap.js/
  56. 56 http://www.smashingmagazine.com/wp-content/uploads/2015/05/08-dropcap-opt.jpg
  57. 57 http://www.smashingmagazine.com/wp-content/uploads/2015/05/08-dropcap-opt.jpg
  58. 58 http://www.smashingmagazine.com/wp-content/uploads/2015/05/09-flipped-opt.jpg
  59. 59 http://www.smashingmagazine.com/wp-content/uploads/2015/05/09-flipped-opt.jpg
  60. 60 http://www.smashingmagazine.com/wp-content/uploads/2015/05/10-rotated-opt.jpg
  61. 61 http://www.smashingmagazine.com/wp-content/uploads/2015/05/10-rotated-opt.jpg
  62. 62 http://www.smashingmagazine.com/wp-content/uploads/2015/05/11-optical-sizes-subhead-opt.jpg
  63. 63 http://www.smashingmagazine.com/wp-content/uploads/2015/05/11-optical-sizes-subhead-opt.jpg
  64. 64 http://webdesign.maratz.com/lab/expressive-web-typography/
  65. 65 http://bentonmodern.webtype.com
  66. 66 http://typetester.org

The post Benton Modern, A Case Study On Art-Directed Responsive Web Typography appeared first on Smashing Magazine.

Source link

Omaha’s Local Web Design Agency

The Art Of The SVG Filter And Why It Is Awesome

Omaha Web Design

After almost 20 years of evolution, today’s web typography, with its high-density displays and support for OpenType features, is just a step away from the typographic quality of the offline world. But there’s still one field of graphic design where we still constantly fall back to bitmap replacements instead of using native text: display typography, the art of staging letters in illustrative, gorgeous, dramatic, playful, experimental or unexpected ways.

1
Liquid type effect (demo2)

A Case For Display Text In HTML

Sure, we’re able choose from thousands of web fonts and use CSS effects for type, some with wide browser support (like drop-shadows and 3D transforms) and others that are more experimental (like background-clip and text-stroke), but that’s basically it. If we want really outstanding display typography on our websites, we’ll usually embed it as an image.

Woodtype style, created purely with SVG filters.3
Woodtype, a style created purely with SVG filters (demo4)

The disadvantages of using images for type on the web are obvious: file size, lack of feasibility for frequently altered or user-generated content, accessibility, time-consuming production of assets, etc.

Wouldn’t it be great if we could style letters the same way we usually style text with CSS? Apply multiple borders with different colors? Add inner and outer bevels? Add patterns, textures and 3D-effects? Give type a used look? Use multiple colors and distorted type? Give type a distressed look?

Sophisticated SVG Filters: CSS For Type

Most of this is already possible: The trick is to unleash the magic of SVG filters. SVG filters (and CSS filters) are usually considered a way to spice up bitmaps via blur effects or color manipulation. But they are much more. Like CSS rules, an SVG filter can be a set of directives to add another visual layer on top of conventional text. With the CSS filter property, these effects can be used outside of SVG and be applied directly to HTML content.

A 3D vintage effect5
3D vintage effect (demo6)

Talking about filters in CSS and SVG can be a bit confusing: SVG filters are defined in an SVG filter element and are usually applied within an SVG document. CSS filters can be applied to any HTML element via the filter property. CSS filters such as blur, contrast and hue-rotate are shortcuts for predefined, frequently used SVG filter effects. Beyond that, the specification7 allows us to reference user-defined filters from within an SVG. A further point of confusion is the proprietary -ms- filter tag, which was deprecated in Internet Explorer (IE) 9 and removed when IE 10 was released.

This article mostly deals with the first case: SVG filters used in an SVG document embedded on an HTML page, but later we’ll experiment with SVG filters applied to HTML content.

Using feImage to fill text with a repeating pattern8
Using feImage to fill text with a repeating pattern (demo9)

The illustrations in this article are taken from demos of SVG filter effects applied to text. Click on any one of them to see the original (modern, SVG-capable browsers only). I call them “sophisticated” SVG filters because under the hood these filters are crafted by combining multiple effects into one output. And even though the appearance of the letters has been altered dramatically, under the hood the text is still crawlable and accessible and can be selected and copied. Because SVG filters are supported in every modern browser, these effects can be displayed in browsers beginning from IE 10.

Applying a sketch effect to text10
A sketchy text effect (demo11)

Understanding SVG filters is challenging. Even simple effects like drop-shadows require a complicated, verbose syntax. Some filers, such as feColorMatrix and feComposite, are difficult to grasp without a thorough understanding of math and color theory. This article will not be a tutorial on learning SVG filters. Instead I will describe a set of standard building blocks to achieve certain effects, but I will keep explanations to the bare minimum, focusing on documenting the individual steps that make up an effect. You will mostly read about the how; for those who want to know the why, I’ve put a reading list at the end of this article.

Variations of posterized text effects12
Some variations of posterized text effects (demo13)

Constructing A Filter

Below is a sophisticated SVG fiter in action. The output of this filter is a weathered text effect, and we will use this for a step-by-step walkthrough:

Making text look grungy14
A grungy wall painting (demo15)

Let’s break down this effect into its building blocks:

  1. green text;
  2. red extrusion;
  3. text and extrusion are separated by a transparent gap;
  4. text has a grungy, weathered look.

Our SVG filter effect will be constructed by combining multiple small modules, so-called “filter primitives.” Every building block is constructed from a set of one or more primitives that are then combined into a unified output. This process is easier to understand when shown as a graph:

Image of an SVG filter graph

The processing steps that make up a sophisticated filter are illustrated best in a graph.

Adding A Filter

We’ll start with a boilerplate SVG that contains an empty filter and text:

<svg version="1.1" id="Ebene_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
  <defs>
    <style type="text/css">
      <![CDATA[
        .filtered
          filter: url(#myfilter);
          …
        
      ]]>
    </style>

    <filter id="myfilter">
      <!-- filter stuff happening here -->
    </filter>
  </defs>

  <g class="filtered">
    <text x="0" y="200" transform="rotate(-12)">Petrol</text>
  </g>
</svg>

The filter Element

We have to start somewhere, and the filter tag is the element to begin with. Between its start and end tag, we will put all of the rules for transformation, color, bitmap manipulation, etc. The filter can then be applied to a target as an attribute or via CSS. The target will usually be an element inside an SVG, but later on we will learn about another exciting option: applying SVG filters to HTML elements.

A handful of attributes exist to control the filter element:

  • x and y positions (default -10%);
  • width and height (default 120%);
  • an ID, which is necessary to refer to later on;
  • filterRes, which predefines a resolution (deprecated with the “Filter Effects Module Level 116” specification);
  • relative (objectBoundingBox is the default) or absolute (userSpaceOnUse) filterUnits.

A Word on Filter Primitives

As we’ve learned, filter primitives are the building blocks of SVG filters. To have any effect, an SVG filter should contain at least one primitive. A primitive usually has one or two inputs (in, in2) and one output (result). Primitives exist for blurring, moving, filling, combining or distorting inputs.

The specification allows us to take several attributes of the filtered element as an input source. Because most of these do not work reliably across browsers anyway, in this article we will stick with SourceGraphic (the unfiltered source element with colors, strokes, fill patterns, etc.) and SourceAlpha (the opaque area of the alpha channel — think of it as the source graphic filled black), which do have very good browser support.

How To Thicken The Input Text

The first filter primitive we will get to know is feMorphology, a primitive meant to extend (operator="dilate") or thin (operator="erode") an input — therefore, perfectly suited to creating outlines and borders.

Here is how we would fatten the SourceAlpha by four pixels:

Source fattened by 4 pixels

Source fattened by four pixels
<feMorphology operator="dilate" radius="4" in="SourceAlpha" result="BEVEL_10" />

Creating an Extrusion

The next step is to create a 3D extrusion of the result from the last primitive. Meet feConvolveMatrix. This filter primitive is one of the mightiest and most difficult to grasp. Its main purpose is to enable you to create your own filter. In short, you would define a pixel raster (a kernel matrix) that alters a pixel according to the values of its neighbouring pixels. This way, it becomes possible to create your own filter effects, such as a blur or a sharpening filter, or to create an extrusion.

Here is the feConvolveMatrix to create a 45-degree, 3-pixel deep extrusion. The order attribute defines a width and a height, so that the primitive knows whether to apply a 3×3 or a 9×1 matrix:

Using feConvolveMatrix to create an extrusion on the fattened input
Using feConvolveMatrix to create an extrusion on the fattened input
<feConvolveMatrix order="3,3" kernelMatrix=
   "1 0 0 
   0 1 0
   0 0 1" in="BEVEL_10" result="BEVEL_20" />

Be aware that IE 11 and Microsoft Edge (at the time of writing) cannot handle matrices with an order greater than 8×8 pixels, and they do not cope well with multiline matrix notation, so removing all carriage returns before deploying this code would be best.

The primitive will be applied equally to the left, top, right and bottom. Because we want it to extrude only to the right and bottom, we must offset the result. Two attributes define the starting point of the effect, targetX and targetY. Unfortunately, IE interprets them contrary to all other browsers. Therefore, to maintain compatibility across browsers, we will handle offsetting with another filter primitive, feOffset.

Offsetting

As the name implies, feOffset takes an input and, well, offsets it:

<feOffset dx="4" dy="4" in="BEVEL_20" result="BEVEL_30"/>

Cutting Off the Extruded Part

feComposite is one of the few filter primitives that take two inputs. It then combines them by applying a method for composing two images called Porter-Duff compositing. feComposite can be used to mask or cut elements. Here’s how to subtract the output of feMorphology from the output of feConvolveMatrix:

Cutting off the fattened 1st primitive from the extrusion
Cutting off the fattened first primitive from the extrusion
<feComposite operator="out" in="BEVEL_20" in2="BEVEL_10" result="BEVEL_30"/>

Coloring the Extrusion

This is a two-step process:

First, we create a colored area with feFlood. This primitive will simply output a rectangle the size of the filter region in a color we define:

<feFlood flood-color="#582D1B" result="COLOR-red" />

We then cut off the transparent part of BEVEL_30 with one more feComposite:

Coloring the extrusion
Coloring the extrusion
<feComposite in="COLOR-red" in2="BEVEL_30" operator="in" result="BEVEL_40" />

Mixing Bevel and Source Into One Output

feMerge does just that, mix bevel and source into one output:

Bevel and source graphic mixed into one output
Bevel and source graphic mixed into one output
<feMerge result="BEVEL_50">
   <feMergeNode in="BEVEL_40" />
   <feMergeNode in="SourceGraphic" />
</feMerge>

Looks pretty much like the desired result. Let’s make it a little more realistic by giving it a weathered look.

Adding a Fractal Texture

feTurbulence is one of the most fun primitives to play with. However, it can melt your multicore CPU and make your fans rotate like the turbojet engines of a Boeing 747. Use it wisely, especially on a mobile device, because this primitive can have a really, really bad effect on rendering performance.

Like feFlood, feTurbulence outputs a filled rectangle but uses a noisy, unstructured texture.

We have several values on hand to alter the appearance and rhythm of the texture. This way, we can create surfaces that look like wood, sand, watercolor or cracked concrete. These settings have a direct influence on the performance of the filter, so test thoroughly. Here’s how to create a pattern that resembles paint strokes:

<feTurbulence baseFrequency=".05,.004" width="200%" height="200%" top="-50%" type="fractalNoise" numOctaves="4" seed="0" result="FRACTAL-TEXTURE_10" />

By default, feTurbulence outputs a colored texture — not exactly what we want. We need a grayscale alpha map; a bit more contrast would be nice, too. Let’s run it through an feColorMatrix to increase the contrast and convert it to grayscale at the same time:

Finally adding a fractal texture to the result
Finally, adding a fractal texture to the result
<feColorMatrix type="matrix" values=
   "0 0 0 0 0,
   0 0 0 0 0,
   0 0 0 0 0,
   0 0 0 -1.2 1.1"
   in="FRACTAL-TEXTURE_10" result="FRACTAL-TEXTURE_20" />

The last thing to do is compose the textured alpha into the letterforms with our old friend feComposite:

<feComposite in="BEVEL_50" in2="FRACTAL-TEXTURE_20" operator="in"/>

Done!

How To Apply SVG Filters To SVG Content

There are two methods of applying SVG filters to an SVG text element:

1. Via CSS

.filtered 
   filter: url(#filter);

2. Via Attribute

<text filter="url(#filter)">Some text</text>

Applying SVG Filters To HTML Content

One of the most exciting features of filters is that it’s possible to embed an SVG, define a filter in it and then apply it to any HTML element with CSS:

filter: url(#mySVGfilter);

At the time of writing, Blink and WebKit require it to be prefixed:

-webkit-filter: url(#mySVGfilter);

As easy as it sounds in theory, this process is a dark art in the real world:

  • SVG filters on HTML content are currently supported in WebKit, Firefox and Blink. IE and Microsoft Edge will display the unfiltered element, so make sure that the default look is good enough.
  • The SVG that contains the filter may not be set to display: none. However, you can set it to visibility: hidden.
  • Sometimes the size of the SVG has a direct influence on how much of the target element is filtered.
  • Did I say that WebKit, Blink and Firefox understand this syntax? Well, Safari (and its little brother mobile Safari) is a special case. You can get most of these demos working in Safari, but you will pull your hair out and bite pieces out of your desk in the process. At the time of writing, I can’t recommend using SVG filters on HTML content in the current version of Safari (8.0.6). Results are unpredictable, and the technique is not bulletproof. To make things worse, if Safari fails to render your filter for some reason, it will not display the HTML target at all, an accessibility nightmare. As a rule of thumb, you increase your chances of getting Safari to display your filter with absolute positioning and fixed sizing of your target. As a proof of concept, I’ve set up a “pop” filter effect, optimized for desktop Safari17. Applying feImage to HTML elements seems to be impossible in Safari.

Previous Demos, Applied To HTML Content

In these demos, the wrappers are set to contenteditable = "true for convenient text editing. (Be aware that these demos are experimental and will not work in Safari, IE or Edge.)

  • Image filled text18
  • Extruded and filled with pattern19
  • Extruded and illuminated20
  • Grungy look with the help of fractal filters21
  • feTurbulence to achieve spilled water effect22
  • Some pop-arty color effects23
  • Sketchy style24

Structuring A Filter

Depending on its complexity, a filter can quickly become a messy thing. During authoring, you could be adding and removing rules and changing their order and values, and soon you’re lost. Here are some rules I’ve made for myself that help me keep track of what’s going on. People and projects vary; what seems logical and structured for me might be chaotic and incomprehensible for you, so take these recommendations with a grain of salt.

Grouping

I group my filter primitives into modules depending on their functionality — for example, “border,” “fill,” “bevel,” etc. At the start and end of a module, I put a comment with the name of this group.

Naming

A good naming convention will help you structure your filter and keep track of what’s going in and outside of a primitive. After experimenting with BEM-like schemas25, I finally settled on a very simple naming structure:

NAME-OF-GROUP_order-number

For example, you would have BEVEL_10, BEVEL_20, OUTLINE_10 and so on. I start with 10 and increment by 10 to make it easier to change the order of primitives or to add a primitive in between or to the beginning of a group. I prefer full caps because they stand out and help me to scan the source faster.

Always Declare Input and Result

Though not necessary, I always declare an “in” and a “result.” (If omitted, the output of a primitive will be the input of its successor.)

Some Building Blocks

Let’s look at some single techniques to achieve certain effects. By combining these building blocks, we can create new sophisticated filter effects.

Text Stroke

SVG filter outline26
<!-- 1. Thicken the input with feMorphology: -->

<feMorphology operator="dilate" radius="2" 
in="SourceAlpha" result="thickened" />

<!-- 2. Cut off the SourceAlpha -->

<feComposite operator="out" in="SourceAlpha" in2="thickened" />

This method is not guaranteed to look good. Especially when you apply dilate in conjunction with big values for radius, the result can look worse than the geometry created via stroke-width. Depending on the situation, a better alternative would be to store the text in a symbol element, and then insert it when needed via use, and thicken the instance with CSS’ stroke-width property. Be aware that stroke-width cannot be applied to HTML content, though.

Torn Look

Torn look27
<!-- 1. create an feTurbulence fractal fill -->

<feTurbulence result="TURBULENCE" baseFrequency="0.08"
numOctaves="1" seed="1" />

<!-- 2. create a displacement map that takes the fractal fill as an input to distort the target: -->

<feDisplacementMap in="SourceGraphic" in2="TURBULENCE" scale="9" />

Color Fill

Tornout look28
<!-- 1. Create a colored filled area -->

<feFlood flood-color="#F79308" result="COLOR" />

<!-- 2. Cut off the SourceAlpha -->

<feComposite operator="in" in="COLOR" in2="SourceAlpha" />

It should be mentioned that, besides feFlood, feColorMatrix is another method of altering the source input’s color, even though that concept is more difficult to grasp.

Offsetting

Offsetting the filtered element29
<!-- Offset the input graphic by the amount defined in its "dx" and "dy" attributes: -->

<feOffset in="SourceGraphic" dx="10" dy="10" />

Extrusion

Extrude the target30
<!-- Define a convolve matrix that applies a bevel. -->

<!-- Order defines the depth of the extrusion; angle is defined by the position of "1" in the matrix. Here we see a 45-degree, 4-pixel deep extrusion: -->

<feConvolveMatrix order="4,4" 
   kernelMatrix="
   1 0 0 0
   0 1 0 0
   0 0 1 0 
   0 0 0 1" in="SourceAlpha" result="BEVEL" />

<!-- offset extrusion: -->

<feOffset dx="2" dy ="2" in="BEVEL" result="OFFSET" />

<!-- merge offset with Source: -->

<feMerge>
   <feMergeNode in="OFFSET" />
   <feMergeNode in="SourceGraphic" />
</feMerge>

Noise Fill

Create a noise fill31

The feTurbulence filter primitive will create a noisy texture by applying the so-called Perlin noise algorithm (invented by Ken Perlin during his work on TRON in 1981). This will generate a rectangle filled with noise that looks like what you could see on old TV sets late at night before cable TV was invented.

The appearance of the noise structure can be modified by several parameters:

  • type in its default state will produce a liquid texture.
  • type can be set to fractalNoise instead, which will output a sandy result.
  • baseFrequency is there to control x and y pattern repetition.
  • numOctaves will increase the level of detail and should have a low value if performance is an issue.
  • The number to start randomization with is determined by seed.
<feTurbulence type="fractalNoise" baseFrequency="0.1" numOctaves="5" seed="2" />

Image Fill

Fill target with an image32

feImage‘s purpose is to fill the target with a texture. If we want to apply a repeating pattern, it must be used in conjunction with feTile.

<!-- The following code will create a 100 × 200-pixel square filled with "myfill.svg": -->

<feImage xlink:href="myfill.svg" x="0" y="0" width="100" height="200" result="IMAGEFILL"/>

<!-- We then use this fill as an input for feTile, creating a repeating pattern this way: -->

<feTile in="IMAGEFILL" resulte="TILEPATTERN"/>

<!-- Now we will use feComposite to "cut off" SourceAlpha's transparent areas from the fill: -->

<feComposite operator="in" in="TILEPATTERN" in2="SourceAlpha" />

The cool thing about this filter is that the specification allows us to use any SVG element as an input and to create a pattern fill from it. So, in theory, you could create pattern fills from symbols, groups and fragments within your SVG and then apply them as a texture, even to HTML elements. Unfortunately, because of an old bug33, Firefox accepts only external resources as input. If you prefer to keep things self-contained and want to avoid the additional HTTP request, there’s hope: Embed the pattern fill as an UTF-8 data URI:

<feImage xlink:href='data:image/svg+xml;charset=utf-8,<svg width="100" height="100"><rect width="50" height="50 /></svg>' />

Some browsers do not understand UTF-8 data URIs when they aren’t URL-encoded, so make URL encoding34 a default:

<feImage xlink:href='data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%22100%22%20height%3D%22100%22%3E%3Crect%20width%3D%2250%22%20height%3D%2250%20%2F%3E%3C%2Fsvg%3E' />

If you want to apply feImage to HTML content, be aware that size matters. The SVG that contains the filter must cover the area where it is being applied. The easiest way to achieve this is by making it an absolutely positioned child within the block element it is being applied to:

<style>
  h1
    position: relative;
    filter: url(#myImageFilter);
  
  h1 svg
    position: absolute;
    visibility: hidden;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
  
</style>
<h1>
  My Filtered Text
  <svg>
    <filter id="myImageFilter">…</filter>
  </svg>
</h1>

Lighting Effect

3D Bevel35

This is one “Wow” effect that quickly becomes boring when used too often. This filter has a serious effect on performance, so use it wisely.

<!--We create a heightmap by blurring the source: -->

<feGaussianBlur stdDeviation="5" in="SourceAlpha" result="BLUR"/>

<!-- We then define a lighting effect with a point light that is positioned at virtual 3D coordinates x: 40px, y: -30px, z: 200px: -->

<feSpecularLighting surfaceScale="6" specularConstant="1" specularExponent="30" lighting-color="#white" in="BLUR" result="SPECULAR">
    <fePointLight x="40" y="-30" z="200" />
</feSpecularLighting>

<!-- We cut off the parts that overlap the source graphic… -->

<feComposite operator="in" in="SPECULAR" in2="SourceAlpha" result="COMPOSITE"/>

<!-- … and then merge source graphic and lighting effect: -->

<feMerge>
    <feMergeNode in="SourceGraphic" />
    <feMergeNode in="COMPOSITE"/>
</feMerge>

Conclusion

There is a gap between pure CSS layout and custom design elements created in software such as Photoshop or Illustrator. External assets embedded as background images, icon sprites and SVG symbols will always have their place in the design of websites. But sophisticated SVG filters give us more independence from third-party design tools and bridge this gap by enabling us to create visual styles directly in the browser.

In this article we’ve seen how SVG filters help us to create playful, decorative web typography. But nothing says we have to stop here. Soon, browser support will be good enough for us to use these effects on every HTML element as easily as we use CSS today. Even though the effects behave differently from native CSS techniques (an SVG filter will affect not only an element but all its children), it will be exciting to see how inventive web designers use these techniques in the near future.

Resources From This Article

  • Sophisticated Filter Effects36, GitHub
    The repository of demos
  • Sophisticated Filter Effects37, Codepen
    Play around with the code.

Reading List

  • “Filter Effects Module Level 138” (working draft), W3C
  • “SVG Filters39,” Mike Sierra, WebPlatform.org
  • “Filter Effects in SVG40,” David Dailey
  • “SVG Filters41” (tutorial), Jakob Jenkov
  • “Filter Primitives Overview42,” Manfred Moitzi
  • “Using Filters to Add Raster Images43,” SVGBasics
  • “Filters44,” Matthew Bystedt
  • “Cirque du Filter: A Journey Into Advanced SVG Filter Effects45” (slidedeck), Michael Mullany, CSS Dev Conf 2013
  • “How to Go Beyond the Basics With SVG Filters46,” Michael Mullany, Creative Bloq
  • “Porter/Duff Compositing and Blend Modes47,” Søren Sandmann Pedersen
  • “Matrix Operations for Image Processing48,” Paul Haeberli
  • “Image Processing Using 2D-Convolution49,” Williamson Labs
  • “3×3 Convolution Kernels With Online Demo50,” Zoltán Fegyver
  • “The Perlin Noise Math FAQ51,” Matt Zucker
  • “A Look at SVG Light Source Filters52,” Joni Trythall, CSS-Tricks

(ds, al)

Footnotes

  1. 1 http://media.mediatemple.netdna-cdn.com/wp-content/uploads/2015/05/splash-svg.html
  2. 2 http://media.mediatemple.netdna-cdn.com/wp-content/uploads/2015/05/splash-svg.html
  3. 3 http://media.mediatemple.netdna-cdn.com/wp-content/uploads/2015/05/extruded-svg.html
  4. 4 http://media.mediatemple.netdna-cdn.com/wp-content/uploads/2015/05/extruded-svg.html
  5. 5 http://media.mediatemple.netdna-cdn.com/wp-content/uploads/2015/05/3dneon-svg.html
  6. 6 http://media.mediatemple.netdna-cdn.com/wp-content/uploads/2015/05/3dneon-svg.html
  7. 7 http://www.w3.org/TR/filter-effects/
  8. 8 http://media.mediatemple.netdna-cdn.com/wp-content/uploads/2015/05/copperplate-svg.html
  9. 9 http://media.mediatemple.netdna-cdn.com/wp-content/uploads/2015/05/copperplate-svg.html
  10. 10 http://media.mediatemple.netdna-cdn.com/wp-content/uploads/2015/05/sketchy-svg.html
  11. 11 http://media.mediatemple.netdna-cdn.com/wp-content/uploads/2015/05/sketchy-svg.html
  12. 12 http://media.mediatemple.netdna-cdn.com/wp-content/uploads/2015/05/pop-svg.html
  13. 13 http://media.mediatemple.netdna-cdn.com/wp-content/uploads/2015/05/pop-svg.html
  14. 14 http://media.mediatemple.netdna-cdn.com/wp-content/uploads/2015/05/weathered-svg.html
  15. 15 http://media.mediatemple.netdna-cdn.com/wp-content/uploads/2015/05/weathered-svg.html
  16. 16 http://www.w3.org/TR/filter-effects/
  17. 17 http://media.mediatemple.netdna-cdn.com/wp-content/uploads/2015/05/pop-safari.html
  18. 18 http://media.mediatemple.netdna-cdn.com/wp-content/uploads/2015/05/copperplate-html.html
  19. 19 http://media.mediatemple.netdna-cdn.com/wp-content/uploads/2015/05/extruded-html.html
  20. 20 http://media.mediatemple.netdna-cdn.com/wp-content/uploads/2015/05/3dneon-html.html
  21. 21 http://media.mediatemple.netdna-cdn.com/wp-content/uploads/2015/05/weathered-html.html
  22. 22 http://media.mediatemple.netdna-cdn.com/wp-content/uploads/2015/05/splash-html.html
  23. 23 http://media.mediatemple.netdna-cdn.com/wp-content/uploads/2015/05/pop-html.html
  24. 24 http://media.mediatemple.netdna-cdn.com/wp-content/uploads/2015/05/sketchy-html.html
  25. 25 https://en.bem.info/method/
  26. 26 http://media.mediatemple.netdna-cdn.com/wp-content/uploads/2015/05/outline.svg
  27. 27 http://media.mediatemple.netdna-cdn.com/wp-content/uploads/2015/05/tornout.svg
  28. 28 http://media.mediatemple.netdna-cdn.com/wp-content/uploads/2015/05/colorfill.svg
  29. 29 http://media.mediatemple.netdna-cdn.com/wp-content/uploads/2015/05/offset.svg
  30. 30 http://media.mediatemple.netdna-cdn.com/wp-content/uploads/2015/05/extrude.svg
  31. 31 http://media.mediatemple.netdna-cdn.com/wp-content/uploads/2015/05/noisefill.svg
  32. 32 http://media.mediatemple.netdna-cdn.com/wp-content/uploads/2015/05/imagefill.svg
  33. 33 https://bugzilla.mozilla.org/show_bug.cgi?id=455986
  34. 34 http://meyerweb.com/eric/tools/dencoder/
  35. 35 http://media.mediatemple.netdna-cdn.com/wp-content/uploads/2015/05/lighting.svg
  36. 36 https://github.com/dirkweber/svg-filter-typeeffects
  37. 37 http://codepen.io/collection/ArxmyO/
  38. 38 http://www.w3.org/TR/filter-effects/
  39. 39 https://docs.webplatform.org/wiki/svg/tutorials/smarter_svg_filters
  40. 40 http://srufaculty.sru.edu/david.dailey/svg/SVGOpen2010/filters2.htm
  41. 41 http://tutorials.jenkov.com/svg/filters.html
  42. 42 https://pythonhosted.org/svgwrite/classes/filter_primitive.html
  43. 43 http://www.svgbasics.com/filters1.html
  44. 44 http://apike.ca/prog_svg_filters.html
  45. 45 http://de.slideshare.net/mullany1/cirque-du-filter-cssdevconf-2013
  46. 46 http://www.creativebloq.com/netmag/how-go-beyond-basics-svg-filters-71412280
  47. 47 http://ssp.impulsetrain.com/porterduff.html
  48. 48 http://graficaobscura.com/matrix/index.html
  49. 49 http://williamson-labs.com/convolution-2d.htm
  50. 50 http://matlabtricks.com/post-5/3×3-convolution-kernels-with-online-demo#demo
  51. 51 http://webstaff.itn.liu.se/~stegu/TNM022-2005/perlinnoiselinks/perlin-noise-math-faq.html
  52. 52 https://css-tricks.com/look-svg-light-source-filters/

The post The Art Of The SVG Filter And Why It Is Awesome appeared first on Smashing Magazine.

Source link

Omaha’s Local Web Design Agency

Creating Responsive Shapes With Clip-Path And Breaking Out Of The Box

Omaha Web Design

CSS’ clip-path property is your ticket to shape-shifting the monotonous, boxy layouts traditionally associated with flat, responsive design. You will begin to think outside the box, literally, and hexagons, stars and octagons will begin to take form on your web pages. Once you get your hands dirty with clip-path, there’s no end to the shapes you can generate, simply by tweaking a few values.

While the focus of this article is on clip-path using polygons with CSS, all of the demos provide a reference to an inline SVG, in order to gain additional support on Firefox. Generating a responsive SVG clipped shape is trivial once you have created a responsive shape with CSS’ clip-path. We’ll look at this in detail later.

Clip-Path, In A Nutshell

Clipping, with the clip-path property, is akin to cutting a shape (like a circle or a pentagon) from a rectangular piece of paper. The property belongs to the “CSS Masking Module Level 1731” specification. The spec states, “CSS masking provides two means for partially or fully hiding portions of visual elements: masking and clipping”.

The first part, i.e. masking, has to do with using a graphical element, such as a PNG image, CSS gradient or SVG element, as a mask to conceal sections of another element.

The second part, i.e. clip-path, involves a closed vector path, which could be a basic shape defined in CSS or an SVG using the clipPath tag. The region inside this path is displayed, and everything beyond or outside it is clipped out.

Note: Masking is beyond the scope of this article, but CSS-Tricks2 and HTML5 Rocks3 have more information.

Below is a simple visualization of how clip-path works:

See the Pen Visualizing clip-path4 by Karen Menezes (@imohkay5) on CodePen6.

Note: The demos in this article, including the one above, will work in Firefox and in WebKit and Blink browsers, including Chrome, Safari and Opera.

Clip-Path Is Not Clip

There is an older CSS 2.1 clip property7, which is rather restrictive, notably because it supports only rectangular shapes. It has been deprecated in favor of clip-path8.

Articles about clipping that use the deprecated syntax feature code that looks like this:

.element 
  clip: rect(30px, 30px, 20px, 20px);

Support For Clip-Path

In August 2014, the “CSS Masking Module” was published as a “Candidate Recommendation,” which is a step up from the earlier “Last Call Working Draft” stage. Before we look at browser support, it’s important to consider the multiple ways in which clip-path can be applied to an element, because browser support varies for each method.

There are two ways to use clip-path:

  1. with CSS
    Basic shapes from the “CSS Shapes Module9” provide a convenient way to use clip-path. The different shapes available are polygon, circle, ellipse and inset; inset is for rectangular shapes.
  2. with SVG
    One can, alternatively, create a shape using SVG and then clip an element to this shape via the URL syntax. There are two ways to do this:

    • with a reference to an inline SVG (i.e. the SVG markup exists on the page itself),
    • with a reference to an external SVG document.

    In both cases, the clipPath element within the SVG is used to wrap the element that determines the clipping path, be it a circle, polygon, path or other element. Compare the demo below in Firefox and in a WebKit or Blink browser such as Chrome to spot the differences. Square images imply a lack of browser support.

    Note: The third image does not show up in Safari. Despite extensive debugging, I’m unable to resolve the issue. I’d appreciate a note in the comments section if you come across the solution.

See the Pen Clip-path: Browser support10 by Karen Menezes (@imohkay69614643393229252111) on CodePen70624744403330262212.

As you may have gathered from observing the demo above in different browsers, support for clipping paths13 is quirky and currently depends on the means by which you choose to clip an element:

  • with CSS: Chrome 24+, Safari 7+, Opera 15+, iOS 7.1+, Android 4.4+, Opera Mobile 24+
    (Note that all supported browsers currently require the -webkit vendor prefix.)
  • with SVG: all of the browsers listed above and Firefox 3.5+

The clip-path property is not yet supported in Internet Explorer but is currently under consideration14 as part of the “Masking Module.”

Note: There is a caveat with support for SVG clipping path. Modern WebKit and Blink browsers support clipping paths with SVGs only if they are declared inline (i.e. within the document). References to external SVGs are supported only in Firefox, as evidenced in the demo above. The Chromium project is tracking this bug15.

Let’s examine the advantages of CSS versus SVG with clip-path.

Advantages of CSS

  • The lucid syntax is easy to grasp due to the relative simplicity of basic shapes.
  • Responsiveness is easily achieved with relative units, such as percentages.

Advantages of SVG

  • Browser support is better, with the addition of Firefox.
  • You can clip with complex shapes, multiple shapes and text.

While CSS offers a background-clip property that provides us with some options (including a non-standard way to clip text), neither background-clip nor CSS’ clip-path match what SVG clipping can achieve in modern browsers. Getting acquainted with clip-path via CSS, however, is less intimidating (especially if you aren’t familiar with manipulating SVGs) and will prepare you for the intricacies of clipping paths with SVG, as well as the “CSS Shapes Module16,” where content aligns itself to the shape of an element.

Note: If you can’t wait to delve into the matrix of clipping with SVG, Sara Soueidan’s overview17 is a good starting point.

Let’s look at the pros and cons of using clip-path to progressively enhance our designs.

Pros

  • Browsers that don’t support the clip-path property will ignore it. If you use it with care, users on non-supporting browsers won’t suspect a thing!
  • Once a clipping-path shape is generated, the specification states that pointer events must not be dispatched outside the clipping area (which is ideal). So, the click event is restricted to the shape and its outer boundary18. We will look at this in the demos below.
  • You can use percentages or any length unit, such as pixels or ems, to define your coordinates with basic shapes using CSS. Fluid units such as percentages can be used to create responsive shapes, perfect for adaptive layouts.

Cons

  • All borders, shadows and outlines outside the clipping region will be clipped19. You can’t add a border and expect it to be honored. We’ll look at some alternatives below.
  • The specification has not yet reached the “Recommendation” stage, so there’s always a chance that the syntax will change in the interim.
  • A few bugs have been reported with clip-path and 3D transforms, transitions and opacity, which are covered in the demos below. Be aware of these, and avoid combining properties that replicate these bugs.

Clip-Path With Polygons: Usage And Syntax

The demos below focus on using different kinds of polygons in a design. The syntax for the other basic shapes (i.e. inset, circle and ellipse) is quite simple, and you can go only so far with them. Polygons, however, open the door to a practically infinite numbers of shapes.

The syntax for a basic polygon shape is this:

.element  clip-path: polygon(x1 y1, x2 y2, x3 y3, ...); 

Each argument pair in the list represents the x-axis and y-axis coordinates of that particular vertex of the polygon.

Here’s how we’d write it in the real world (minus the currently supported WebKit-prefixed version):

.element  clip-path: polygon(0 100%, 0 0, 100% 0, 80% 100%); 

Let’s add support for Firefox with a reference to an inline SVG:

.element  clip-path: url("#clip-shape"); 

Here’s how our selector will finally look, with cross-browser support:

.element 
  -webkit-clip-path: polygon(0 100%, 0 0, 100% 0, 80% 100%);
  clip-path: polygon(0 100%, 0 0, 100% 0, 80% 100%);
  -webkit-clip-path: url("#clip-shape"); /* required for Webkit/Blink browsers if you're using only inline SVG clipping paths, but not CSS clip-path */
  clip-path: url("#clip-shape");

Below is the code for the inline SVG, which we will need to insert anywhere in the markup.

<svg width="0" height="0">
  <defs>
	<clipPath id="clip-shape" clipPathUnits="objectBoundingBox">
	  <polygon points="0 1, 0 0, 1 0, 0.8 1" />
	</clipPath>
  </defs>
</svg>

Here is the final demo.

See the Pen Clip-path: Demo20 by Karen Menezes (@imohkay69614643393229252111) on CodePen70624744403330262212.

You can create a responsive SVG clipping path in the following manner:

  • Set the width and height of the SVG to 0.
  • Set an ID on the clipPath element inside the SVG, which can then be referenced with CSS. You can use inline or external SVG, keeping in mind the browser support mentioned above.
  • Reuse the percentage coordinate values of the polygon defined with CSS clip-path. Just divide them by 100 and add as unitless polygon points to the SVG.
  • Set the value of the clipPathUnits attribute to objectBoundingBox, so that the clipping path honors the boundaries of the HTML element that references it.

Dudley Storey has more23 on this process.

Let’s look at a demo to understand how to plot coordinates for a polygon.

Below we have an image that is clipped. The background color represents the dimensions of the original image. The black boxes with the coordinates are simply absolutely positioned divs whose locations match the polygon’s vertices in percentages. You will see that they maintain their positions, even if you resize your browser window to a narrow width (for example, 400 pixels or greater).

See the Pen Clip-path: Polygon coordinates24 by Karen Menezes (@imohkay69614643393229252111) on CodePen70624744403330262212.

Real-World Examples With Clip-Path

Note: Every demo in this article uses clip-path with CSS but also has inline SVG in the markup with a class of clip-svg, which simply resets the width and height of the SVG to 0. You could, alternatively, remove the class and set the width and height attributes directly in the SVG markup.

Example 1: Clip An Image to Various Polygon Shapes

In case you need a quick definition of a polygon, it’s a 2D shape that’s closed and consists of straight lines.

Therefore, a shape cannot be a polygon if it has curves, is open or has fewer than three lines. Some famous polygons in history are triangles, quadrilaterals, pentagons and hexagons. Even star shapes are polygons, since the boundaries of a polygon can cross each other.

Note: The images in the demo are responsive. By using the good ol’ responsive image solution of img max-width: 100%; height: auto; and adaptive clipping paths via CSS and SVG, we make our polygons blissfully scale up and down.

This demo is the result of an exercise to understand plotting coordinates to make polygon shapes. I’ve added several shapes that you can use for your designs in the demo below. On hovering over each image, you will see the aspect ratio of the original image.

Nothing beats the exceptional Clippy7727, a GUI tool by Bennett Feely to visualize shapes. All coordinates for all of the existing shapes are provided in percentages, and there’s also a custom polygon option. This one’s a game-changer. You can use Clippy to generate clipped shapes and create SVGs for yourself based on them, for better browser support.

See the Pen Clip-path: Polygon shapes28 by Karen Menezes (@imohkay69614643393229252111) on CodePen70624744403330262212.

Example 2: Animate a Basic Shape With CSS Transition

Hover over the purple hexagon. It transforms to an octagon. However, the CSS transition specified has not taken effect.

See the Pen Clip-path: shape transition: Part 131 by Karen Menezes (@imohkay69614643393229252111) on CodePen70624744403330262212.

The reason for this is explained in Sara Soueidan’s article on animating CSS shapes34: “The number of points defining the final shape must be the same as the number of points defining the initial shape.” Makes perfect sense!

Because a hexagon has six pairs of coordinate points, let’s add two pairs through duplication to make them eight, to match the number of pairs for an octagon. These duplicated pairs won’t affect the shape of the hexagon.

This is the declaration for a hexagon in the form of a default polygon with six pairs of coordinate points:

clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);

And this is the declaration for a hexagon in the form of a polygon with eight pairs of coordinates, the first two of which have been duplicated:

clip-path: polygon(50% 0%, 50% 0%, 100% 25%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);

Now the transition will be smooth as the shapes transform, as seen in the demo below.

Note: For browsers that support clipping paths only with SVG (currently Firefox), we need to add a SMIL animation to obtain a seamless transition on hover. According to the SMIL specification, declarative animations can be used to animate paths and polygon points in SVG, which is currently impossible with CSS.

Keep in mind that some people are discussing deprecating SMIL in Chrome and Chromium35 and focusing on implementing the Web Animations API36, which is unfortunately at the early draft stage.

In the demo below (background image courtesy of morgueFile37), you can see that we have animated the polygon points between the mouseover and mouseout events over a duration of 0.2 seconds. Look for the <animate> tag in the SVG markup.

See the Pen Clip-path: shape transition: Part 238 by Karen Menezes (@imohkay69614643393229252111) on CodePen70624744403330262212.

Example 3: Add a Border to a Clipped Object

To make a long story short, borders, outlines and box-shadows that lie outside the clipping region are removed.

I was a little saddened by this, and I pinged the W3C members on the working group for CSS. However, the conclusion is that there’s no way to do this when you’re using basic shapes. Dirk Schulze41 responded to my query: “Yes, all drawing operations belonging to the element get clipped. This includes outlines and borders.”

See the demo below. Hover over the rhomboid with a partial border to see the original, unclipped version with the entire border.

See the Pen Clip-path: Borders42 by Karen Menezes (@imohkay69614643393229252111) on CodePen70624744403330262212.

Of course, we can always use a CSS hack to get a border, which is what I finally resorted to — good ol’ generated content.

The demo below creates a copy of the element via a pseudo-element (content:after) and absolutely positions it. This creates the illusion of a border, enabling us to simulate interesting effects, such as the gradient border seen in the second octagon and the inset box-shadow via a CSS filter on the third one (not very pretty, but functional). Note that CSS filters currently work only in Firefox and in WebKit and Blink browsers.

See the Pen Clip-path: Border simulation45 by Karen Menezes (@imohkay69614643393229252111) on CodePen70624744403330262212.

Example 4: Use clip-path to Create a Diamond Grid Over a Rhombus

Below is the image we will use.

48
(View large version49)

This is the effect we’re aiming for. Upon hovering over the bottom three boxes, you’ll see the background color fade to reveal the background.

demo-clip-diamond50
(View large version51)

The actual size of the image is 600 × 600 pixels. Thus, let’s start with four empty divs of 300 pixels each and apply the same background image to them. Let’s add a parent wrapper of 604 pixels and lay out the images with the inline-block property.

demo-clip-diamond152
(View large version53)

Let’s now change the value of the background-position property for each image to top, left, right and bottom, respectively.

demo-clip-diamond254
(View large preview55)

Let’s clip each box into the shape of a rhombus. We will overlay an absolutely positioned layer on each of the bottom three images, with some text.

demo-clip-diamond356
(View large version57)

Now we will move the images into rows — the second and third image into one row, and the first and fourth into their own individual rows.

demo-clip-diamond458
(View large version59)

Finally, we will use negative margins to push up the second and third rows, so that they are laid out as in the final demo below. We can remove the width value of 604 pixels on the parent wrapper, and we can structure our media query so that the four diamond boxes move from a stacked layout on small screens to inline blocks on larger ones.

See the Pen Clip-path: Diamond grid60 by Karen Menezes (@imohkay69614643393229252111) on CodePen70624744403330262212.

While working on this demo, I noticed a bug in Chrome with pointer events being dispatched outside the clipped region, which violates the specification63: “By default, pointer events must not be dispatched on the clipped-out (non-visible) regions of a shape.” I have filed the bug64. The issue with this demo was solved by using the pointer-events property with a value of none on the overlay. Alternatively, you could apply the same clip-path value to the overlay to resolve the issue.

Due to the negative margins applied, this demo would look odd in browsers that don’t support clip-path. You would have to use some sort of feature detection to apply the margins (although I haven’t experimented with this) or the @supports CSS feature query, although I wouldn’t recommend the latter in production code.

Example 5: Create a Dummy Profile Page With Hexagons

Our final page should look like this:

hexagon-demo65
(View large version66)

We’ll start by adding a background image of hexagon tiles to the body (the image courtesy of Subtle Patterns67).

The hexagon clip-path values can be obtained from one of the demos above or with the Clippy tool.

The first hexagon uses a background image (because we’re blending a dull maroon into the background using the background-blend-mode property). Using generated content, an absolutely positioned overlay is clipped to a maroon triangle shape, which you can see on the bottom. It disappears on hover.

The second hexagon, with the word “work,” simply has a dark grey background that changes on hover.

The third hexagon has a gradient border, similar to the one in the demo on creating borders with clip-path.

The hexagons stack on small screens and are vertically centered on larger ones. I’ve used a combination of display: table and the absolute centering transforms hack — of course, you could use flexbox, floats or whatever else floats your layouting boat.

Here’s the final demo.

See the Pen Clip-path: Hexagon shapes for dummy profile page68 by Karen Menezes (@imohkay69614643393229252111) on CodePen70624744403330262212.

I discovered a bug71 with clip-path while creating this demo. Altering the value of opacity in combination with the CSS transition causes a flicker and artifacts on the page. Be aware of this if you’re using clip-path to progressively enhance a design.

There is also a bug with clip-path and the backface-visibility property when set to hidden. This bug is documented in Chromium72’s issue tracker and I have been able to replicate it using the basic shape syntax in Chrome on Linux. Keep this in mind if you’re using a clip-path shape to do a cool 3D flip or anything that uses CSS 3D transforms.

While clipping with SVG wins hands down for its flexibility and options, nothing beats the ease with which elements can be clipped with CSS. In fact, the same polygon coordinates can be effortlessly recycled to create responsive SVG for even better browser support. With clip-path, you can dramatically alter the look and feel of a page, without having to worry much about non-supporting browsers, where it will gracefully degrade. If you choose to use clip-path for design enhancements, keep an eye on the specification as it advances towards “Recommendation” status.

Resources, Tools And Inspiration

  • “CSS Masking Module Level 1731,” W3C
    This is the ultimate source of truth and the best reference, when in doubt.
  • “Clipping in CSS and SVG: The clip-path Property and <clipPath> Element74,” Sara Soueidan
    Soueidan has the definitive guide to clipping paths. While the focus is largely on SVG, this article is a fantastic introduction, with plenty of information for both intermediate and advanced readers.
  • “clip-path75,” Sara Soueidan, Codrops
    Soueidan’s well-researched and comprehensive article over on Codrops breaks down a fairly complicated module into something that is easy to understand and assimilate.
  • “Clipping and Masking in CSS76,” Chris Coyier, CSS-Tricks
    Coyier’s article, peppered with several helpful demos, explains both clipping and masking.
  • Clippy7727
    Bennett Feely’s fab clip-path maker can generate a plethora of predefined and custom polygon shapes, circles and ellipses for CSS’ clip-path. All values are in percentages and, hence, useful for responsive layouts.
  • Clip Path Generator78
    CSS Plant offers a rather comprehensive graphical interface to clip or mask an element. Cross-browser support is provided for Firefox, Chrome, Safari and old iOS. Clips are in pixels, not percentages.
  • Species in Pieces79
    So breathtaking it borders on the spiritual, this showcase of 30 endangered species was crafted entirely with CSS’ clip-path, without a hint of canvas or WebGL. View it in a WebKit or Blink browser until the other ones catch up.

(ds, il, al)

Footnotes

  1. 1 http://www.w3.org/TR/css-masking-1
  2. 2 http://css-tricks.com/clipping-masking-css
  3. 3 http://www.html5rocks.com/en/tutorials/masking/adobe/
  4. 4 http://codepen.io/imohkay/pen/KpdomO/
  5. 5 http://codepen.io/imohkay
  6. 6 http://codepen.io
  7. 7 http://www.w3.org/TR/CSS21/visufx.html#clipping
  8. 8 http://www.w3.org/TR/css-masking-1/#clip-property
  9. 9 http://www.w3.org/TR/css-shapes-1/#typedef-basic-shape
  10. 10 ‘http://codepen.io/imohkay/pen/GJpxXY/’
  11. 11 ‘http://codepen.io/imohkay’
  12. 12 ‘http://codepen.io’
  13. 13 http://caniuse.com/#search=clip-path
  14. 14 https://status.modern.ie/masks?term=masks
  15. 15 https://code.google.com/p/chromium/issues/detail?id=109212
  16. 16 http://www.w3.org/TR/css-shapes/
  17. 17 http://sarasoueidan.com/blog/css-svg-clipping/
  18. 18 http://www.w3.org/TR/css-masking-1/#clipping-paths
  19. 19 http://www.w3.org/TR/css-masking-1/#clipping-paths
  20. 20 ‘http://codepen.io/imohkay/pen/pJjVob/’
  21. 21 ‘http://codepen.io/imohkay’
  22. 22 ‘http://codepen.io’
  23. 23 http://demosthenes.info/blog/1007/Combining-CSS-clip-path-and-Shapes-for-New-Layout-Possibilities
  24. 24 ‘http://codepen.io/imohkay/pen/pJjVgE/’
  25. 25 ‘http://codepen.io/imohkay’
  26. 26 ‘http://codepen.io’
  27. 27 http://bennettfeely.com/clippy
  28. 28 ‘http://codepen.io/imohkay/pen/RPWyjz/’
  29. 29 ‘http://codepen.io/imohkay’
  30. 30 ‘http://codepen.io’
  31. 31 ‘http://codepen.io/imohkay/pen/ZGbjbz/’
  32. 32 ‘http://codepen.io/imohkay’
  33. 33 ‘http://codepen.io’
  34. 34 http://sarasoueidan.com/blog/animating-css-shapes/
  35. 35 https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/5o0yiO440LM
  36. 36 http://www.w3.org/TR/web-animations/
  37. 37 http://www.morguefile.com/archive/display/946871
  38. 38 ‘http://codepen.io/imohkay/pen/ZGbjyG/’
  39. 39 ‘http://codepen.io/imohkay’
  40. 40 ‘http://codepen.io’
  41. 41 http://blog.dschulze.com
  42. 42 ‘http://codepen.io/imohkay/pen/zGvLjo/’
  43. 43 ‘http://codepen.io/imohkay’
  44. 44 ‘http://codepen.io’
  45. 45 ‘http://codepen.io/imohkay/pen/MwaBBK/’
  46. 46 ‘http://codepen.io/imohkay’
  47. 47 ‘http://codepen.io’
  48. 48 http://www.smashingmagazine.com/wp-content/uploads/2015/05/clip-img-large-preview-opt.jpg
  49. 49 http://www.smashingmagazine.com/wp-content/uploads/2015/05/clip-img-large-preview-opt.jpg
  50. 50 http://www.smashingmagazine.com/wp-content/uploads/2015/05/diamond-demo-large-preview-opt.jpg
  51. 51 http://www.smashingmagazine.com/wp-content/uploads/2015/05/diamond-demo-large-preview-opt.jpg
  52. 52 http://www.smashingmagazine.com/wp-content/uploads/2015/05/diamond1-large-preview-opt.jpg
  53. 53 http://www.smashingmagazine.com/wp-content/uploads/2015/05/diamond1-large-preview-opt.jpg
  54. 54 http://www.smashingmagazine.com/wp-content/uploads/2015/05/diamond2-large-preview-opt.jpg
  55. 55 http://www.smashingmagazine.com/wp-content/uploads/2015/05/diamond2-large-preview-opt.jpg
  56. 56 http://www.smashingmagazine.com/wp-content/uploads/2015/05/diamond3-large-preview-opt.jpg
  57. 57 http://www.smashingmagazine.com/wp-content/uploads/2015/05/diamond3-large-preview-opt.jpg
  58. 58 http://www.smashingmagazine.com/wp-content/uploads/2015/05/diamond4-large-preview-opt.jpg
  59. 59 http://www.smashingmagazine.com/wp-content/uploads/2015/05/diamond4-large-preview-opt.jpg
  60. 60 ‘http://codepen.io/imohkay/pen/KpdBrw/’
  61. 61 ‘http://codepen.io/imohkay’
  62. 62 ‘http://codepen.io’
  63. 63 http://www.w3.org/TR/css-masking-1/#clipping-paths
  64. 64 https://code.google.com/p/chromium/issues/detail?id=468613
  65. 65 http://www.smashingmagazine.com/wp-content/uploads/2015/05/hexagons-demo-large-preview-opt.jpg
  66. 66 http://www.smashingmagazine.com/wp-content/uploads/2015/05/hexagons-demo-large-preview-opt.jpg
  67. 67 http://subtlepatterns.com
  68. 68 ‘http://codepen.io/imohkay/pen/ZGbmoQ/’
  69. 69 ‘http://codepen.io/imohkay’
  70. 70 ‘http://codepen.io’
  71. 71 https://code.google.com/p/chromium/issues/detail?id=446901
  72. 72 https://code.google.com/p/chromium/issues/detail?id=350724
  73. 73 http://www.w3.org/TR/css-masking-1
  74. 74 http://sarasoueidan.com/blog/css-svg-clipping
  75. 75 http://tympanus.net/codrops/css_reference/clip-path
  76. 76 http://css-tricks.com/clipping-masking-css/
  77. 77 http://bennettfeely.com/clippy
  78. 78 http://cssplant.com/clip-path-generator
  79. 79 http://www.species-in-pieces.com

The post Creating Responsive Shapes With Clip-Path And Breaking Out Of The Box appeared first on Smashing Magazine.

Source link

Omaha’s Local Web Design Agency