Web Standards

Foreword for CSS In Depth

Css Tricks - Fri, 05/18/2018 - 9:13am

Keith Grant recently released a brand new book on CSS: CSS in Depth. If you're looking for a book focused specifically on learning CSS, you've found it. I was happy to write the foreword for it, which I'll republish here.

"A minute to learn... A lifetime to master." That phrase might feel a little trite these days, but I still like it. It was popularized in modern times by being the tagline for the board game Othello. In Othello, players take turns placing white or black pieces onto a grid. If, for example, a white piece is played trapping a row of black pieces between two white, all the black pieces are flipped and the row becomes entirely white.

Like Othello, it isn't particularly hard to learn the rules of CSS. You write a selector that attempts to match elements, then you write key/value pairs that style those elements. Even folks just starting out don't have much trouble figuring out that basic syntax. The trick to getting good at CSS, as in Othello, is knowing exactly when to do what.

CSS is one of the languages of the web, but it isn't quite in the same wheelhouse as programming. CSS has little in the way of logic and loops. Math is limited to a single function. Only recently have variables become a possibility. Rarely do you need to consider security. CSS is closer to painting than Python. You're free to do what you like with CSS. It won't spit out any errors at you or fail to compile.

The journey to getting good at CSS involves learning everything CSS is capable of. The more you know, the more natural it starts to feel. The more you practice, the more easily your brain will reach for that perfect layout and spacing method. The more you read, the more confident you'll feel in tackling any design.

Really good CSS devs aren't deterred by any design. Every job becomes an opportunity to get clever, a puzzle to be solved. Really good CSS devs have that full and wide spectrum of knowledge of what CSS is capable of. This book you have is part of your journey to being that really good CSS dev. You'll gain that spectrum of knowledge necessary to getting there.

If you'll permit one more metaphor, despite CSS going on a couple of decades old, it's a bit like the wild wild west. You can do just about whatever you want to do, as long as it's doing what you want. There aren't any hard and fast rules. But because you're all on your own, with no great metrics to tell you if you're doing a good job or not, you'll need to be extra careful. Tiny changes can have huge effects. A stylesheet can grow and grow and become unwieldy. You can start to get scared of your own styles!

Keith covers a lot of ground in the book, and every bit of it will help you become a better CSS developer and tame this wild wild west. You'll deep dive into the language itself, learning what CSS is capable of. Then, just as importantly, you'll learn about ideas around the language that level you up in other ways. You'll be better at writing code that lasts, is understandable, and performant.

Even seasoned devs will firm up their skills here. If you find yourself reading about something that you already know, you'll firm up your skills, affirm your knowledge, and find little "oooo" bits that surprise you and extend that base.

Here's that link to buy it again.

The post Foreword for CSS In Depth appeared first on CSS-Tricks.

Unicode Patterns

Css Tricks - Fri, 05/18/2018 - 4:19am

These Unicode patterns by Yuan Chuan are extraordinarily clever. It's a <css-doodle> custom web component that sets up a CSS grid and randomizes what character to drop into a cell and things, like color.

See all their gorgeous work on CodePen and the very cool <css-doodle> website as well.

Direct Link to ArticlePermalink

The post Unicode Patterns appeared first on CSS-Tricks.

Custom List Number Styling

Css Tricks - Fri, 05/18/2018 - 4:16am

How about a classic CSS trick! This isn't even so tricky anymore, since CSS has counter-increment and counter-reset and such that is perfect for this. I just wanted to make sure you knew how it works and had some easy-to-copy examples at the ready.

Let's say all you wanna do is style the dang numbers:

See the Pen Custom List Style 2 by Chris Coyier (@chriscoyier) on CodePen.

Here's an example from the CodePen Challenges pages:

See the Pen Custom List Counters by Chris Coyier (@chriscoyier) on CodePen.

The keyframers made a Pen the other day that used pretty cool styles. Here's a redux:

See the Pen Custom List Style 3 by Chris Coyier (@chriscoyier) on CodePen.

Recipe sites are great places to look for custom list styles, as lists of steps are such a prevelant feature. On Mat Marquis' site, he's got some fun ones. I ripped off his CSS and moved it here:

See the Pen Wilto Counters by Chris Coyier (@chriscoyier) on CodePen.

Make sure to check out the fun little media query change. Lea Verou's food site, of course, has counter-based numbering as well.

Here's an interesting demo from Jonathan Snook that has a "timeline" look and uses custom counters to label each section:

See the Pen Timeline CSS with Counters by Jonathan Snook (@snookca) on CodePen.

More Information

The post Custom List Number Styling appeared first on CSS-Tricks.

Build Nodejs APIs Using Serverless

Css Tricks - Thu, 05/17/2018 - 10:11am

Simona Cotin did a great talk at Microsoft Build about Serverless technologies, called "Build Node APIs Using Serverless." In this talk, she addresses pretty much every major gotcha that you might run into while creating Serverless infrastructure for JavaScript applications. Some of the topics included, but are not limited to:

  • CORS
  • Local Debugging with VS Code
  • Installing npm packages
  • Configuring REST-like URLs
  • Saving environment variables

All in all, it's one of the best talks on Serverless I've seen, and if you're interested in this topic, then I highly suggest giving it a watch.

Direct Link to ArticlePermalink

The post Build Nodejs APIs Using Serverless appeared first on CSS-Tricks.

How React Reconciliation Works

Css Tricks - Thu, 05/17/2018 - 4:00am

React is fast! Some of that speed comes from updating only the parts of the DOM that need it. Less for you to worry about and a speed gain to boot. As long as you understand the workings of setState(), you should be good to go. However, it’s also important to familiarize yourself with how this amazing library updates the DOM of your application. Knowing this will be instrumental in your work as a React developer.

The DOM?

The browser builds the DOM by parsing the code you write, it does this before it renders the page. The DOM represents documents in the page as nodes and objects, providing an interface so that programming languages can plug in and manipulate the DOM. The problem with the DOM is that it is not optimized for dynamic UI applications. So, updating the DOM can slow your application when there are a lot of things to be changed; as the browser has to reapply all styles and render new HTML elements. This also happens in situations where nothing changes.

What is Reconciliation?

Reconciliation is the process through which React updates the DOM. When a component's state changes, React has to calculate if it is necessary to update the DOM. It does this by creating a virtual DOM and comparing it with the current DOM. In this context, the virtual DOM will contain the new state of the component.

Let's build a simple component that adds two numbers. The numbers will be entered in an input field.

See the Pen reconciliation Pen by Kingsley Silas Chijioke (@kinsomicrote) on CodePen.

First, we'll need to set up the initial state for the fields, then update the state when a number is entered. The component will look like this:

class App extends React.Component { state = { result: '', entry1: '', entry2: '' } handleEntry1 = (event) => { this.setState({entry1: event.target.value}) } handleEntry2 = (event) => { this.setState({entry2: event.target.value}) } handleAddition = (event) => { const firstInt = parseInt(this.state.entry1) const secondInt = parseInt(this.state.entry2) this.setState({result: firstInt + secondInt }) } render() { const { entry1, entry2, result } = this.state return( <div> <div> <p>Entry 1: { entry1 }</p> <p>Entry 2: { entry2 }</p> <p>Result: { result }</p> </div> <br /> <div> Entry 1: <input type='text' onChange={this.handleEntry1} /> </div> <br /> <div> Entry 2: <input type='text' onChange={this.handleEntry2} /> </div> <div> <button onClick={this.handleAddition} type='submit'>Add</button> </div> </div> ) } }

On initial render, the DOM tree will look like this;

When an entry is made in the first input field, React creates a new tree. The new tree which is the virtual DOM will contain the new state for entry1. Then, React compares the virtual DOM with the old DOM and, from the comparison, it figures out the difference between both DOMs and makes an update to only the part that is different. A new tree is created each time the state of App component changes — when a value is entered in either of the inputs field, or when the button is clicked.

Diffing Different Elements

When the state of a component changes so that an element needs to be changed from one type to another, React unmounts the whole tree and builds a new one from scratch. This causes every node in that tree to be destroyed.

Let's see an example:

class App extends React.Component { state = { change: true } handleChange = (event) => { this.setState({change: !this.state.change}) } render() { const { change } = this.state return( <div> <div> <button onClick={this.handleChange}>Change</button> </div> { change ? <div> This is div cause it's true <h2>This is a h2 element in the div</h2> </div> : <p> This is a p element cause it's false <br /> This is another paragraph in the false paragraph </p> } </div> ) } }

On initial render, you will see the div and its contents and how clicking the button causes React to destroy the div's tree with its content and build a tree for the <p> element instead. Same happens if we have the same component in both cases. The component will be destroyed alongside the previous tree it belonged to, and a new instance will be built. See the demo below;

See the Pen reconciliation-2 Pen by Kingsley Silas Chijioke (@kinsomicrote) on CodePen.

Diffing Lists

React uses keys to keep track of items in a list. The keys help it figure out the position of the item on a list. What happens when a list does not have keys? React will mutate every child of the list even if there are no new changes.

In other words, React changes every item in a list that does not have keys.

Here's an example:

const firstArr = ['codepen', 'codesandbox'] const secondArr = ['github', 'codepen', 'bitbucket', 'codesanbox'] class App extends React.Component { state = { change: true } handleChange = (event) => { this.setState({change: !this.state.change}) } render() { const { change } = this.state return( <div> <div> <button onClick={this.handleChange}>Change</button> </div> <ul> { change ? firstArr.map((e) => <li>{e}</li>) : secondArr.map((e) => <li>{e}</li>) } </ul> </div> ) } }

Here, we have two arrays that get rendered depending on the state of the component. React has no way of keep track of the items on the list, so it is bound to change the whole list each time there is a need to re-render. This results in performance issues.

In your console, you will see a warning like this:

Warning: Each child in an array or iterator should have a unique "key" prop.

To fix this, you add a unique key for each item on the list.

const firstArr = ['codepen', 'codesandbox'] const secondArr = ['github', 'codepen', 'bitbucket', 'codesanbox'] class App extends React.Component { state = { change: true } handleChange = (event) => { this.setState({change: !this.state.change}) } render() { const { change } = this.state return( <div> <div> <button onClick={this.handleChange}>Change</button> </div> <ul> { change ? firstArr.map((e, index) => <li key={e.index}>{e}</li>) : secondArr.map((e, index) => <li key={e.index}>{e}</li>) } </ul> </div> ) } }

See the Pen reconciliation-3 Pen by Kingsley Silas Chijioke (@kinsomicrote) on CodePen.

Wrapping Up

In summary, here are the two big takeaways for understanding how the concept of reconciliation works in React:

  • React can make your UI fast, but it needs your help. It’s good to understand its reconciliation process.
  • React doesn't do a full rerender of your DOM nodes. It only changes what it needs to. The diffing process is so fast that you might not notice it.

The post How React Reconciliation Works appeared first on CSS-Tricks.

The Ultimate Guide to Headless CMS

Css Tricks - Thu, 05/17/2018 - 3:58am

(This is a sponsored post.)

The World Has Changed—So Must the CMS

Having a responsive website is no longer enough. Your audience expects a seamless and personalized customer experience across all their devices—the age of headless technology is coming.

Headless CMS is the next generation in content management for brands that want to stay ahead of the curve by engaging customers through the growing number of channels.

Download The Ultimate Guide to Headless CMS ebook for a deep look into what headless CMS is, and why it should be at the top of your list when choosing a new CMS.

Download the ebook now!

Direct Link to ArticlePermalink

The post The Ultimate Guide to Headless CMS appeared first on CSS-Tricks.

Responsive tables, revisited

Css Tricks - Wed, 05/16/2018 - 8:21am

Lea Verou with some extra super fancy CSS trickery. No way we could miss linking this one up!

One of the problems with responsive table solutions, at least the ones where you are using CSS to rejigger things, is that there is duplicated content somewhere. Either in CSS or HTML.

Lea finds two ways to prevent that. One of which uses text-shadow to "duplicate" a copy of the text and move it into place. Another uses the Firefox-only element() function.

Another thing to remember: if you're forcing table elements to anything other than their natural display value (like block), make sure to use ARIA roles so they don't lose their accessibility usefulness.

Direct Link to ArticlePermalink

The post Responsive tables, revisited appeared first on CSS-Tricks.

The backdrop-filter CSS property

Css Tricks - Wed, 05/16/2018 - 4:07am

I had never heard of the backdrop-filter property until yesterday, but after a couple of hours messing around with it I’m positive that it’s nothing more than magic. This is because it adds filters (like changing the hue, contrast or blur) of the background of an element without changing the text or other elements inside.

Take this example where I’ve replicated the iOS notification style: see how the background of each of these boxes are blurred but the text isn’t?

That’s only a single line of CSS to create that faded background effect, just like this:

.notification { backdrop-filter: blur(3px); }

Now it’s worth noting that browser support for this CSS property isn’t particularly well supported just yet (see below). But we’ve been trying to do this sort of filtering stuff for a really long time and so it’s great to see that progress is being made here. Chris wrote about the “frosted-glass” technique in 2014 and way back then you had to use a bunch of weird hacks and extra images to replicate the effect. Now we can write a lot less code to get the same effect!

We also get to pick from a lot more filters than just that frosted glass style. The following demo showcases all of the backdrop-filter values and how they change the background:

Each of these boxes are just separate divs where I’ve applied a different backdrop-filter to each. And that’s it! I sort of can’t believe how simple this is, actually.

Of course you can chain them together like so:

.element { backdrop-filter: blur(5px) contrast(.8); }

And this could make all sorts of elaborate and complex designs, especially if you start combining them together with animations.

But wait, why do we even need this property? Well, after reading up a little it seems that the go-to default example is a modal of some description. That’s what Guillermo Esteves was experimenting with back in 2015:

See the Pen PwRPZa by Guillermo Esteves (@gesteves) on CodePen.

I reckon we can do something much weirder and more beautiful if we put our minds to it.

A note about browser support

The backdrop-filter property is not well supported at the time of this writing. And even in Safari where it is supported, you’ll still need to prefix it. There’s no support for Firefox at all. But, really, do websites need to look exactly the same in every browser?

This browser support data is from Caniuse, which has more detail. A number indicates that browser supports the feature at that version and up.

DesktopChromeOperaFirefoxIEEdgeSafariNoNoNoNo179*Mobile / TabletiOS SafariOpera MobileOpera MiniAndroidAndroid ChromeAndroid Firefox9.0-9.2*NoNoNoNoNo Further reading

The post The backdrop-filter CSS property appeared first on CSS-Tricks.

A Strategy Guide To CSS Custom Properties

Css Tricks - Wed, 05/16/2018 - 4:05am

CSS preprocessor variables and CSS custom properties (often referred to as "CSS variables") can do some of the same things, but are not the same.

Practical advice from Mike Riethmuller:

If it is alright to use static variables inside components, when should we use custom properties? Converting existing preprocessor variables to custom properties usually makes little sense. After all, the reason for custom properties is completely different. Custom properties make sense when we have CSS properties that change relative to a condition in the DOM — especially a dynamic condition such as :focus, :hover, media queries or with JavaScript.

Direct Link to ArticlePermalink

The post A Strategy Guide To CSS Custom Properties appeared first on CSS-Tricks.


Css Tricks - Tue, 05/15/2018 - 11:25am

The team at Figma has created a new resource for “learning, creating and evangelizing design systems” called Design Systems that already has a good collection of interviews and articles by some folks thinking about these things.

I particularly liked Jeroen Ransijn’s post on how to convince your company it’s ready for a design system, where he writes:

Building a design system is not about reaching a single point in time. It’s an ongoing process of learning, building, evangelizing and driving adoption in your organization.

Design systems are a popular topic. Ethan Marcotte recently looked at instances where patterns get weird, Lucan Lemonnier shared a process for creating a consistent design system in Sketch, and Brad Frost debunked the perception that design systems are rigid. Seems like Figma's new site will be a nice curated repository of this ongoing discussion.

Direct Link to ArticlePermalink

The post designsystems.com appeared first on CSS-Tricks.

Five of My Favorite Features of Jetpack

Css Tricks - Tue, 05/15/2018 - 6:37am

Jetpack is an official WordPress plugin directly from Automattic. It's an interesting plugin in that it doesn't just do *one thing* — it does a whole slew of things that enhance what your WordPress site can do. *Any* WordPress site, that is, and often with extremely little effort. Those easy win features Jesse Friedman calls light switch features, meaning you literally flip a switch in Jetpack's settings and start benefitting. I love that.

There are dozens of features in Jetpack, and I personally make use of most of them and see the benefit in all of them. Allow me to share with you five of my favorites and how they are actively used right here on this site. It's actually a bit hard to pick, so perhaps I'll do this again sometime!

1) Related Posts

This seems like such a simple little feature, but it's anything but. Something has to analyze all the content on your site and figure out what is most related to the current content. That kind of thing can be incredibly database intensive and bring even powerful hosting to its knees. WP Engine, by all accounts a powerful and WordPress-tuned host, bans many of them outright:

Almost all “Related Posts” plugins suffer from the same fundamental problems regarding MySQL, indexing, and search. These problems make the plugins themselves extremely database intensive.

Their top recommendation? Jetpack Related Posts.

Jetpack handles this by offloading the work off your servers and onto theirs. Your site has no additional load for this super useful feature. I find it does a great job.

In a recent post about dropdown menus, here are the related posts it displays. 2) Markdown

I wrote once: You Should Probably Blog in Markdown.

I'm quite serious about that. I've been involved with far too many sites where old content was mired with old crufty HTML or otherwise formatted in a way that held them back, and cleaning up that content was an impractically large job. You avoid that situation entirely if you create your content in Markdown (and stick to Markdown syntax).

Things like <span style="font-weight: bold; font-family: Georgia; color: red;"> around seemingly random sentences. <div class="content-wrap-wrap"> wrapping every single blog post because it was just “what you did”. Images force-floated to the right because that made sense three designs ago. Headers with class names on them that don’t even exist anymore. Tables of data spit into content with all the whitespace stripped out and weird alignment attributes you barely recognize. An about page that was pasted in from Microsoft Word.

Content like this will not and cannot last.

With Jetpack, you flip on Markdown support and you're good!

Almost more importantly, it feels like the Markdown option you can trust. There are other plugins out there that add Markdown support, and that's great, but they leave open questions. How long is the plugin going to be supported? What variety of Markdown did they pick? Is that variety going to continue to be supported? Does it work in comments? These kind of questions make me nervous.

Choosing Jetpack feels safe because it's the official Markdown choice of WordPress, in a plugin we can be sure will be updated forever.

It'll be interesting to see what Markdown + Gutenberg is like!

3) Social Sharing

This is a multi-pronged feature.

One, it can easily add sharing buttons to your posts. This isn't a particularly difficult thing to do for any developer worth their salt, but having it abstracted away in a plugin is nice.

Two, it can share your posts directly to social sites like Twitter and Facebook. That's a much harder thing to write from scratch. It's a thing I used a paid third-party service for years. It was a pleasant surprise when I discovered Jetpack's ability to do this.

The "official" buttons can be nice as they have the most integrated functionality with the services themselves, but I dig that the other options are like "Responsible Social Sharing Links" in that they have the least possible performance overhead.

It allows you to customize the mesasge, and does smart stuff like includes the Featured Image as image attached to the social post.

4) Comment Improvements

I'm a little uncomfortable using a third-party comment system on my sites. I like control. Comments are content and I like making sure those are in my own database. Yet, I think users have a little higher expectations of comment thread UX than they used to. Having to manually type in your name and email and all that feels kinda old school in a not-so-great way.

Fortunately, Jetpack can replace your comment form with a modernized version:

Now users can log in with their social accounts, making leaving a comment a much easier flow. Not to mention the fact that it's all the less work you have to do styling the comment form.

Notice the "Notify me of new comments via email" checkbox there too. Guess what powers that? Jetpack. That's a nice feature for people who are leaving question-style comments on your site. They very likely want to be notified of about the conversations happening in comments as it evolves.

5) Security

I've been deep into the world of web development for many years. The more I know, the more I can see that I don't know. We all have to focus on certain things to get done what we need to on our own journeys. I fully admit I know very little about server-side web security. I'd rather leave that exertise to others, or ideally, software that I trust.

Here's some fun statistics from here on CSS-Tricks:

It's nice to know my site is being protected that way from malicious logins. Spam, an even more direct problem, is also taken care of by Akismet, the spam-blocking plugin that my Jetpack subscription covers.

Should anything happen to the site, I know it's backed up off my server by VaultPress, which is also part of my Jetpack subscription.

See how much it does!?

Again, this is just a handful of the features of Jetpack. There are so many niceties tucked into it I consider it a no-brainer plugin. Probably the first and most important plugin you'll install on any self-hosted WordPress site.

The post Five of My Favorite Features of Jetpack appeared first on CSS-Tricks.

It All Started With Emoji: Color Typography on the Web

Css Tricks - Tue, 05/15/2018 - 4:02am

“Typography on the web is in single color: characters are either black or red, never black and red …Then emoji hit the scene, became part of Unicode, and therefore could be expressed by characters — or “glyphs” in font terminology. The smiley, levitating businessman and the infamous pile of poo became true siblings to letters, numbers and punctuation marks.”

Roel Nieskens

Using emojis in code is easy. Head over to emojipedia and copy and paste one in.


Or in CSS:

And JavaScript, too:

(Alternatively, you can specify emoji with a Unicode codepoint.)

However, you might run into a problem...

Lost in translation: Emoji’s consistency problem

The diversity of emoji across platforms might not sound like a major problem. However, these sometimes radical inconsistencies leave room for drastic miscommunication. Infamously, the “grinning face with smiling eyes” emoji ends up as a pained grimace on older Apple systems.

This was such a big deal that even The Washington Post covered it.

A harmless and playful watergun emoji might show up as a deadly firearm.

Courtesy of Emojipedia.

And who knows how many romances were dashed by Google’s utterly bizarre hairy heart emoji?

&#x1f92e;This has since been rectified by Google

Unicode standardizes what each emoji should represent with a terse description but the visual design is down to the various platforms.

Color fonts to the rescue!

The solution? Use an emoji font. Adobe has released a font called EmojiOne and Twitter open-sourced Twemoji. More are likely to follow.

@font-face { font-family: 'emoji'; src: url('emojione-svg.woff2') format('woff2'); }

If a user types into an HTML input or textarea, they will see your fancy custom emoji. ❤️

An input in Firefox.

Emoji fonts also have the benefit of avoiding the pixelation seen in scaled-up raster emoji. If you happen to want really large emoji, an SVG-in-Opentype font is clearly the superior choice.

On the left, a standard Apple dogface emoji looking pixelated. On the right, smooth SVG-in-Opentype emoji characters from Emojione and Twemoji, respectively. Unicode (right) clearly doesn’t specify a breed! Browser support

Confusingly, color fonts aren’t one standard but rather four &#x1f644;. OpenType is the font format used on the web. When emoji were added to unicode, the big players realized that multi-color support needed to be added to OpenType in some way. Different companies came up with a diversity of solutions. The fonts are still .ttf, .woff or .woff2 — but internally they’re a bit different. I pieced together this support table using a tool called Chromacheck:

Chrome Safari Edge Firefox SVG-in-Opentype ❌ ❌ ✅ ✅ COLR/CPAL ✅ ✅ ✅ ✅ SBIX ✅ ✅ ✅ ❌ CBDT/CBLC ✅ ❌ ✅ ❌

We’ve learned why color fonts were invented. But it’s not all about emoji...

Multicoloured alphabets Gilbert font

Color fonts are a new technology, so you won’t find that many typefaces to choose from as of yet. If you want to try one out that’s free and open source, Bungee by David Jonathan Ross is a great choice.

While some fonts provide full emoji support and others offer a multicolor alphabet, Ten Mincho — a commercial font from Adobe — takes a different tack. In the words of its marketing material, the font holds “a little surprise tucked away in the glyphs.” Of the 2,666 emoji in the Unicode Standard, Ten Mincho offers a very limited range in a distinctive Japanese style.

The adorable custom emoji set of Ten Mincho

Emoji have become a predominant mode of human communication. Over 60 million emoji are used on Facebook every single day. On Messenger, the number is even more astonishing, at five billion per day. If you’re building any sort of messaging app, getting emoji right really matters.

The post It All Started With Emoji: Color Typography on the Web appeared first on CSS-Tricks.

Free Introduction to Web Development Workshop

Css Tricks - Tue, 05/15/2018 - 3:54am

Brian Holt and the Frontend Masters team are putting on a free workshop today and tomorrow that is live-streamed for anyone that's interested. This is super cool because, despite the fact that there is a mountain of articles about web development out there, there are only few that start with the basics in a manner that's easy for beginners to follow. All of the materials are open source and available here as well.

I've been a fan of Brian's work for ages now, which is part of the reason why I advocated for him to join my team, and now I have the honor of working with him. I find his style of teaching really calming, which is encouraging when the subject forays into complex concepts. The livestream is free today (5/15) and tomorrow (5/16), but will also be available afterwards if you happen to miss it.

Direct Link to ArticlePermalink

The post Free Introduction to Web Development Workshop appeared first on CSS-Tricks.

Google Conversions: Highlights

LukeW - Mon, 05/14/2018 - 2:00pm

Across several presentations at Google Conversions in Dublin, several speakers shared insights and best practices for conversion rate optimization. Here's a few highlights:

Confirmation Bias - Michael Aagaard
  • In the 18th century, tobacco smoke was considered very good for your heart and lungs. In particular tobacco enemas were quite popular so much that they were placed along the banks of the river Thames to help drowning victims. This is an example of confirmation bias at work.
  • Confirmation biases is our tendency to accept evidence we agree with at face value and dismiss information we don't agree with unless the evidence is overwhelming. Confirmation biases limits our ability to seek out and uncover the truth.
  • Torturing data: if you torture any data long enough it will confess to anything. High levels of correlation between things don't imply causation. We have to be careful to not see what we want in data.
  • Stopping A/B tests when they show the impact we want is an example of confirmation bias. Instead, let them run for an appropriate amount of time. Over time, tests are likely to show much less effects.
  • How to overcome confirmation bias: accept the fact that you could be wrong, seek out a different perspective. Find people who talk to customers/users. They have a bias toward end users.
  • Don't test your ideas, do detective work to find out what customers need and how they talk about it. Then your A/B test is simply the final test at the end to see if you did your detective work well.
CRO - Lina Hansson
  • Celebrate the discovery of weak spots. Don't take it as failure but instead be happy when you find something that can be improved.
  • The biggest missed opportunity in conversion rate optimization is usability testing. Move away from opinions and instead use user testing to identify issues.
  • A common pain point across retail sites is find-ability: both search and browse. When we move to mobile, many sites remove their top categories list in order to fit on smaller screens. This creates discoverability issues. One of the first things retail sites should test is adding categories visibly on their home page.
  • Value propositions for companies are usually cut for mobile. Instead of removing them, redesign them to make them work on mobile.
  • People can be classified into four behavior types. Methodical people read completely and analyze before making decisions. Humanistic people react strongly to the opinions of others. Competitive people move quickly and expect things to work. Spontaneous people are emotional and fast-paced. You can design experiences that are appropriate for each of these behavior types.
  • The companies that solve checkout on mobile are the ones that will win.
Meaningful Data - Simo Ahava
  • It's quite simple to get a service like Google Analytics set up but how do we use these tools to really understand what we're doing. How can data become meaningful?
  • Tactics (tool expertise) without a strategy (business expertise) are just party tricks and a strategy without tactics is just talk. What brings the two together is agility.
  • Tools must be customized for your organization's needs. We are not trying to optimize metrics but our businesses. Default metrics and reports need to be adjusted to work with your specific needs.
Landing Pages - Anna Potanin
  • Designers want to do their best and create unique interfaces but making things for the Web often requires understanding and using conventions. Only apply a unique visual design after you have followed best practices.
  • 3 things all retail sites should have on their landing and home pages: call to action, value propositions, and visuals.
  • The more prominent you make your search bar, the more searches you get. Why do you want to do this? Conversion rates are usually much higher for people who search

Light Or Dark UI? A Usability Perspective

Usability Geek - Mon, 05/14/2018 - 7:07am
Often, the best way to explain the difference between user experience and user interface to the unfamiliar is through a more relatable analogy. If UI is how the car looks, UX is how it drives. If UI...
Categories: Web Standards

Page Transitions for Everyone

Css Tricks - Mon, 05/14/2018 - 3:55am

As Sarah mentioned in her previous post about page transition using Vue.js, there is plenty of motivation for designers and developers to be building page transitions. Let's consider mobile applications. While mobile applications are evolving, more and more attention is given to the animation experience, while the web pretty much stays the same. Why is that?

Maybe it’s because native app developers spend more time working on those animations. Maybe it’s because users say that’s what they want. Maybe it’s because they know more about the environment in which the app is going to run. All of that helps to improve the experience over time. Overall, it seems like mobile app developers somehow seem to know or care more about user experience.

If we take a look at how mobile apps are designed today, there is very often some sort of animated transition between states. Even ready-to-use native components have some kind of simple animation between states. Developers and designers realized that this little animation helps a user grasp what is happening in the app. It makes the navigation through the app easier and tells the user where they are going within the app.

For example, when you’re navigating to a subcategory, it usually slides in from the right side of the screen, and we all somehow know what that means.

Animation matters. It can be used to improve the user experience.

When you’re developing a website, it’s easy to spend hours making sure the user sees the whole story by way of top-notch transitions, like the movement between gallery pictures or fancy hover effects...but once a user clicks a link, all of that experience falls apart and you’re starting from the beginning. That’s because the page reloads and we don’t have an easy/obvious/native way to handle animations/transitions in that situation.

On the web, most of the effort used to improve the experience is in structure, visual design, or even the performance of the site. There are some elements you can swipe around here and there, but that’s about it. A boring remnant of the time when the web was simply used to navigate through a bunch of text pages later upgraded with some sliding text.

Yes, we actually used to do this.

There are some very fancy websites that are filled with animation or incredible WebGL hieroglyphs in the background. Unfortunately, they are often hard to navigate and your laptop battery is drained in about 15 minutes. But they are certainly nice to look at. Those sites are full animation, but most of it is used to impress you, and not to help you navigate around, or make the experience faster, or make things more accessible for you to browse the site.

The Source of the Problem

All of this raises a big question. We have all the technology to do this page transitions stuff on the web. Why don’t we do it? Is it because we don’t want to? Is it because we don’t think that’s part of our job? Is it so hard that we’d have to charge double for projects and clients aren’t buying it?

Let’s take a look at another possible reason. Often, a company chooses technologies that are common for all of their projects. You, as a front-ender, don't have much control over what’s implemented on the server, so maybe you can't count on some server-side rendering of your JSX.

Maybe you have to choose something stable and generally usable for any sort of solution (which usually means the less codebase, the more flexible), so you’re kind of forced to avoid some framework in your development stack. Unfortunately, it makes sense. You don’t want to implement a contact form in 10 different frameworks just because you’ve decided that some framework is a good base for this particular project. And don't get me started on security, which has been in the process of being improved throughout the years. You cannot just throw it away because you want your user to have a bit more fun browsing your site.

There is another possible reason. Maybe you want to build on WordPress because you want to take advantage of all those open source goodies people prepared for you over the years. Would you exchange all of that "free" functionality for a better experience? Probably not...

The Goal

Aside from drastic and unrealistic changes like getting rid of all images and videos, our website load time from the server just is what it is. We have a server rendered page, and apart from a faster server or better caching, there isn’t much to do to improve that.

So the way to improve the load time is to cheat a bit! Cheat by making the user think it takes less time because they are distracted by what’s happening on the screen. Cheat by loading the content ahead of time and animating the transition.

Let’s introduce some effects that could be used to do the transition. Even simple fade in/fade out can give you a whole different feel, especially with some element indicating loading. Let’s look at some examples.

Note: All of following examples are websites build on PHP and pretty much work without JavaScript as any other site would.

Source: rsts.cz/25let (public production site)

A simple fade out/fade in seamlessly improves experience user has before the click of the link and doesn't act that disturbing as a normal browser reload would. The loading indication on a menu icon ensures a user doesn’t panic in case the page takes little longer to load.

Some interesting animation can be achieved by animating different elements in different ways, which can also be combined with fading.

Source: mcepharma.com (public production site)

Or how about covering up the page with some other element?

Source: delejcotebavi.decathlon.cz (public production site)

Those few hours of work give the website whole new feel by turning your static page into an animated one. And that's without any additional preparation.

However, in case you are already aware of your intention in the design phase, you can adjust the design to your needs. Common elements can be prepared ahead of time.

Source: vyrostlijsme.cz/zaciname (company internal system)

The main navigation element introduced in a form of bubbles plays with the user while the content of the next page is loading. The impact is that user is not bored and knows that something is happening. As the animation starts on the click of the link, the user doesn't even realize he’s been waiting for something.


We have sorted out what we actually want to do, and why do we want to do it… let’s see how can we achieve this.

While there is not much to do on the back-end for this, there is a whole bunch of things you can do on the browser side. A good example is Turbolinks, developed by the Basecamp folks, which takes your website and makes it more app-feeling by enabling content loading with JavaScript. It simply avoids that ugly browser page-to-page reloading jump. Turbolinks deals with browser history, loading, and all that other stuff that would normally happen under the hood of the browser. The key thing here is taking control over loading and replacing content because as long as the browser doesn’t reload, everything that happens on a screen is in our control.

Let’s think of some concepts we can use to improve our experience. The load time is our biggest enemy, so how can we improve it in the browser?


In most cases, the request for loading the next page doesn't have to start only once a user clicks the link. There is another event happening that can indicate users intention to visit the page, and that’s a hover over the link. There are always few hundreds of milliseconds between hover and click on the link, why not use that time to our advantage? Heck, if the majority of your users end up on the next page that is known to you and you have the statistics to prove it, why not even preload it any time after the initial render, while the user is trying to get around the current page?

The following diagram illustrates how many things can happen in parallel and save us some of that precious time, instead of being done one by one. A very common mistake seen in custom solutions for page transition that people make for themselves is the start of the request, which is usually triggered after the page is unloaded/hidden.

Possible process of transition Caching

While this can be a problem for some dynamic sites, static sites are perfect candidates for caching. Why would you load a page twice, when you’re in control of loading and replacing the content? You can save the contents and use it in case the user visits the same page or returns to it with the browser back button.

Or, you can use the cache to preload pages on hover and empty the cache regularly (maybe after each page visit?) to always have the latest version of the page on dynamic sites while still enabling that preload feature.

Interestingly, Progressive Web Apps also "invest" in this area, although the approach is a bit different.


All these concepts are great, but we still need to bring animations to the party.

The control of the page load and replacement can be taken over by us, thus we can play with the contents of the page at any given time. For example, it’s simple enough to add a class to the page while it's loading. This gives us the ability to define another state for the page, or in other words, hide/unload it. When the animation is done and the page is loaded, we are free to replace the content and remove the state class to let the page animate back in again.

Another option is to animate your page "out" with JavaScript, replace the content, and animate it back "in."

There are many possibilities of how to approach this, but in any way, the key feature here is not letting the browser reload.

Ready to Go

Those are three main concepts that will make a lot of difference. The point is, with a little extra effort, it's not that hard to do this yourself, and I encourage you to do so.

It's going to be a bumpy road with loads of possible headaches, as it's not always easy not to break the browser’s native functionality.

However, if you’re more of a load and go type of person, I have put together a little package called swup that sorts out all of those things that Turbolinks does, plus all three of the concepts we’ve covered here. Here's a little demo.

What are the perks of swup?

  • It works exclusively on the front-end, so no server setup is required. Although you can easily implement a transfer of only required data based on X-Requested-With in the request header (little modification of swup is required based on your particular solution).
  • Uses browser history API to ensure correct functionality of your site, as it would work without swup (back/forward buttons and correct route in the URL bar).
  • It does not have to be part of initial load batch and can be loaded and enabled after the initial render.
  • Takes care of the timing, meaning it automatically detects the end of your transitions defined in CSS and, in the meantime, takes care of loading the next page. The whole process is based on promises, so not a single millisecond is wasted.
  • If enabled in options, swup can preload a page when a link is hovered or once it’s encountered in loaded content (with the data-swup-preload attribute).
  • If enabled in options, swup also caches the contents of the pages and doesn’t load the same page twice.
  • Swup emits a whole bunch of events that you can use in your code to enable your JavaScript, analytics, etc.
  • You can define as many elements to be replaced as you want, as long as they are common for all pages. This enables the possibility to animate common elements on the page, while still replacing its parts. The bubble menu in our earlier example above uses this feature, where the check signs on the bubbles are taken from the loaded page, but rest of the bubble stays on the page, so it can be animated.
  • Gives you the possibility to use different animation for transitions between different pages.

For those of you that like your animation done with JavaScript, there is also a version for that called swupjs. While it may be harder to implement animations in JavaScript, it definitely gives you more control.


The animation and seamless experience doesn't have to be strictly limited to native applications or newest technologies. With little effort, time, and a bit of code, even your WordPress site can feel native-like. And while we already love the web the way it is, I think we can always try to make it a little better.

The post Page Transitions for Everyone appeared first on CSS-Tricks.

Ship Map

Css Tricks - Mon, 05/14/2018 - 3:54am

Interactive maps can both be functional and, when combined with data, tell a good story. Kiln released this data-driven map (make sure to hit the play button) to show the routes of every cargo ship moving about on the high seas in 2012.

Created by London-based data visualisation studio Kiln and the UCL Energy Institute

How something like this is created can be mind-boggling. Kiln has a service called Flourish that helps with the lifting and we recently shared Observable, which has a similar aim. Sarah wrote up an entire tutorial on creating serverless data visualizations.

Direct Link to ArticlePermalink

The post Ship Map appeared first on CSS-Tricks.

What’s wrong with CSS-in-JS?

Css Tricks - Fri, 05/11/2018 - 9:15am

Brad Frost thinks it's:

  1. Lack of portability
  2. Context Switching
  3. Flushing best practices down the toilet

In the spirit of good-ol-fashioned blog-and-response, here's:

I'd like to point out that "CSS-in-JS" is an umbrella term, and that there are lots of takes on actual implementations of this. It's possible to like one approach and not another.

My guess is we'll end up with a split down the middle as a best practice someday.

When we write styles, we will always make a choice. Is this a global style? Am I, on purpose, leaking this style across the entire site? Or, am I writing CSS that is specific to this component? CSS will be split in half between these two. Component-specific styles will be scoped and bundled with the component and used as needed.

Direct Link to ArticlePermalink

The post What’s wrong with CSS-in-JS? appeared first on CSS-Tricks.

Turn Sublime Text 3 into a JavaScript IDE

Css Tricks - Fri, 05/11/2018 - 4:40am

Sublime Text is one of the most popular editors for web development and software development in general. It’s very smooth and fast compared to other editors (being written in C++ helps that speed). Sublime also has tons of plugins you can find through Package Control.

But it’s only a text editor and not an IDE. An IDE is a software application that provides comprehensive facilities to computer programmers for software development. In fact, Sublime doesn’t offer features like debugging tools, built-in tools for compiling and running applications, intelligent code suggestions, or code refactoring. Instead it offers a set of APIs you can use to extend it. Here’s an introduction to the JavaScript Enhancement plugin (my own creation) that makes Sublime a bit more IDE-like for JavaScript development.

What is the JavaScript Enhancement Plugin?

It is a plugin for Sublime Text 3 that offers a lot of features useful for creating, developing, and managing JavaScript projects. The most important ones are:

  1. Smart autocomplete
  2. Error detection and linting
  3. Code refactoring

Several other features can be found on the Wiki page.

Most of the features are implemented using Flow under the hood, which is a static typechecker for JavaScript created by Facebook (if you know TypeScript, it is quite similar). The main objective of this plugin is to turn Sublime Text 3 into a JavaScript IDE. It is in active development and it will include other features over time.


There are two ways to install it. The simplest one is through Package Control, the other one is to install it manually following these simple steps.

  • Sublime Text 3 build 3124 or newer
  • Node.js (6 or newer) and npm
  • TerminalView Sublime Text plugin (Linux and Mac OS X only)
Supported Systems

Because Flow only works on 64-bit systems, this plugin supports:

  • Mac OS X
  • Linux (64-bit)
  • Windows (64-bit)
Smart Autocomplete

Sublime Text has its own autocomplete feature, but it lacks power, making it not nearly as useful as it could be. With this plugin, you will get autocompletion based on the current context, like any other IDE. For example, you will get completions from your imported classes defined in other files, such as properties and methods.

Furthermore, the completions list will also contain info about variables type and functions signature in order to get a quick overview of them.

Here’s how that works with the plugin:

...and without the plugin:

Error Detection and Linting

Sublime Text doesn’t have an error detection and/or linting system natively. Thanks to Flow, this can be done using its own CLI commands.

First of all, you need to create a JavaScript project (see the Creating a JavaScript Project wiki page). In order to let the Flow server check your files, you need to add a special comment in them: // @flow.

You can set also more options in the .flowconfig file (see the official website to customize your Flow configuration. For example, if you want to let the Flow server check all files and not just those with @flow, you need to set the all option to true:

[options] # all=off by default all=true

To let the Flow server check also single files that aren't part of a project, you can activate the option in Tools > JavaScript Enhancements > Use Flow checker on current view (Not used in project) for each Sublime View. In this case, the Flow server will see only the current view.

Instead, like is says on the official website, lint settings can be specified in the .flowconfig [lints] section as a list of rule=severity pairs. These settings apply globally to the entire project. An example is:

[lints] # all=off by default all=warn untyped-type-import=error sketchy-null-bool=off

Lint settings can be specified also directly in a file using flowlint comments. For example:

/* flowlint * sketchy-null:error, * untyped-type-import:error */ Code Refactoring

Sublime Text doesn’t offer a code refactoring system natively. This is realized with the help of Flow CLI commands in order to get the necessary information. At the moment, this plugin offers various code refactoring features, including:

Some of them can also have an available preview. Furthermore, features, such as Safe Move, will work only on JavaScript projects (also here, see the Creating a JavaScript Project wiki page).

Support Issues/Questions

If you have any problems, create an issue. Protip: do a quick search first to see if someone else didn't ask the same question before! For small questions, you can use Gitter.

Feature Requests and Enhancements

For feature requests, create an issue or use Gitter.

Financial Contributions

If this project helps you reduce time to develop and also you like it, please consider supporting it with a donation on Patreon, Open Collective or using PayPal. Thanks!

The post Turn Sublime Text 3 into a JavaScript IDE appeared first on CSS-Tricks.

How to build a slide deck in PowerPoint that isn’t god awful

Css Tricks - Thu, 05/10/2018 - 3:52am

"Oooh! A PowerPoint Presentation!"

— No one ever

Nobody likes a slide show. I don't even have to back that assertion up with evidence. It's a universal truth — like saying "the sky is blue", "the grass is green" or "The Mummy with Tom Cruise is the worst movie ever made." And if you haven't seen The Mummy reboot, I just saved you and you should be grateful.

It's as if there is some unwritten rule that says: if you do a PowerPoint presentation, it has to be measurably boring on a physical level.

It doesn't have to be this way. We can make engaging and (I hate this word but watch me use it anyway) delightful slide shows and you only need to know two things:

  1. How to work with shapes
  2. The "Morph" transition

Here is an example of the slideshow we're going to be building in this post. Almost all of this will be handcrafted — including most of the artwork. I think you'll be surprised at how easy it is to do. Let’s just say it’s about 1,000 times easier than sitting through "The Mummy 2017."

To get started, you need to first pick a template by not picking a template.

Pick a template and then don't pick a template

One thing that most people struggle with is just deciding on a template to use. You don't need a template, but you do need some creative inspiration. You can just look on the main PowerPoint template gallery for ideas. For the city theme, I took inspiration from this template.

Keep in mind that your template doesn’t have to be related to your content. If you juxtapose something like a spring time city theme with a concept like Serverless, it provides an upbeat and friendly backdrop on which to talk about a concept that might otherwise be intimidating.

Just looking through this template gallery, you can take inspiration from the "Drops" template to build an underwater theme, the "Parcel" template to build a package theme — maybe a pile of packages on a table that you can move through. I don't know. I can't come up with all the ideas here.

Now that you have inspiration, the next step is to copy a great artist.

Great artists steal

Steve jobs famously quoted Picasso by saying, "Great artists steal" and then didn’t give him the credit, which is the pinnacle of irony.

That quote is not entirely true. You can borrow ideas and even form, but if you borrow too much, you are just ripping it off. It's a fine line. But this is a PowerPoint presentation. Not an iPhone. It's not like anybody but the eight people in your talk are going to see this.

For the city, we can just Google and see what other people are doing. I usually Google and then put "png" along with the search result because I want a cartoon city. The PNG image format is used for pictures that have only a few colors, and those are usually cartoons and logos. What we’re looking for here is something that is as "flat design" as possible.

This one is perfect. Flat design is the best thing to ever happen to non-designers. You used to have to actually be able to draw things and make them look realistic and all 3-D and stuff. Thanks to Flat Design, you slap a white square on a page with a heart in the corner and call it an icon. Thanks, Flat Design!

It is super easy to replicate or build your own flat artwork with some simple shapes in PowerPoint, which is exactly what we’re going to do.

Building the city with shapes

We’re going to replicate that city PNG image from our Google image search with nothing but shapes and our own Steve Jobs drive to steal art. For starters, just set the background of the slide to a light blueish green. We use a linear gradient turned 90° so that it becomes vertical, putting the white at the bottom so it looks more like light is coming from behind the buildings.

Our first building is just a rounded rectangle from the "Insert Shape" menu. We can let it sit just off the edge of the slide instead of having to get the bottom perfect. This is our first building so it’s also slightly off the screen to the left.

Most of our buildings are the same basic shape. We can copy this one, resize it and change the colors to get more buildings. I heavily "borrow" colors from my image inspiration. Having a great color palette will make all of the difference in the end.

OK! Now let’s add in some simple rectangle buildings. You may have to right-click and adjust the z-index ordering of the buildings selecting "Send To Back / Send Backward."

Our last building has a little spire on top. This is creating by adding a rounded rectangle for the building, one for the top and the one for the spire. You can adjust how rounded they are by dragging the little yellow square. I have split them out here so you can see what each looks like.

Then just put the shapes together. This is like LEGO only it didn’t cost you $180 bucks.

Beautiful! Now let’s add some windows to these buildings. Guess what you make windows out of? That’s right — more rounded rectangles.

Add in a small black rounded rectangle the runs the length of the first building. Then just copy and paste them down until you have a whole building’s worth.

Now the windows look a little wonky because they are not perfectly aligned. There are a few ways to fix this. You can zoom in using the little zoom slider in the bottom of the window. You can also select all the windows and then right-click and select "size and position." This opens up the sidebar and you can set the horizontal position "from" to 0. This will pull them a bit off the building so just adjust until they are centered.

Now repeat this for each building, using the original image for inspiration. Look at how they are doing windows. Some are long, some are square and some are in groups.

When you are done, you will have buildings with windows and guess what — they actually look like buildings!

Let’s add some hills and trees. These are just shapes too. The hills are stretched out green ovals. The trees are thick lines with green circles on top. Remember, people are expecting a PowerPoint presentation here, so the bar is already pretty low.

We need a few clouds. For that, we’re going to use the thenounproject.com. You don’t have to use Noun Project, but I find that a subscription is well worth all of the icons that I get. But you could very well just Google "cloud png."

The other cool thing about Noun Project is that you can get your icons in different colors. Now that we have clouds, we just insert a few and adjust their size.

What if all of our slide text looks like it was written in clouds? For this slide, the sky is all we have to work with, so a cloud font would work perfectly. There are a lot of font sites out there, and I ended up using one called "JFRockSolid." It’s supposed to be rocks, but when you make it white it looks like clouds. At least it looks like clouds to me.

Well, now that I’ve typed it out, it looks like rocks. DAMMIT.

We’re getting so close to being done! Let’s add in one more thing — a plane towing a banner with our subtitle on it.

For the plane, I just googled for "cartoon plane png." I wanted something with a few more colors and details. Sometimes we can build these things, sometimes we can use the Noun Project, and sometimes we just straight up rip off images from Google. Again, this is a technical presentation, not a customer-facing product. It’s also nice to include a slide at the end which gives credit for all the images you used. Be nice.

I just resized the plane and flipped it horizontally. Note that in order to flip images horizontally in PowerPoint, you have to use the 3-D Rotation on the x-axis. I know, so intuitive.

For the banner the plane is towing, we can use the "wave" shape.

Now, how do we add some text to this wave shape so that the text follows the ripple of the shape? This is a banner being buffeted by the wind, so our text would look silly if it’s just flat on the banner. Don’t believe me?

I told you. So, how do we do this? Well, for the first time your life, the answer is "Word Art."

Word Art acts like a shape, so we can skew it. I just add the first Word Art type and then remove the shadow and change the color. Then, under "Text Effects" you are going to select "ABC Transform." Then look for the shape that most closely resembles the one you want to align to. In our case, the shape is "wave 1."

Now just adjust your text shape using the little drag handles until it looks good on the banner. Change the font if that feels right. I’m using "Bernard MT". It’s not perfect, but it’s a huge improvement.

Connect the plane to the banner with a "curve" shape.

You’ll need to click to start the line and then click everywhere along the path between the plane and the banner where you want a curve. To end the line, hit the "escape" key. You’ll screw it up the first time, then you’ll get it.

And with that, we have wrapped up our first slide and done most of the hard work. It looks goofy in the presentation space, but here is what it will look like when you actually start the show.

"Burke — this does not look anything like a proper PowerPoint presentation."

Thank you. Thank you very much.

We’re now ready to begin building our show by zooming in and out of the city. The only transition we are going to use is going to be "Morph."

Using the Morph transition

The Morph transition animates objects to a new location or size. The key is to make sure you have the same objects between slides. Morph needs a reference to the element to be animated so it has to be an exact duplicate.

Morph is a cool name. I’m going to name my next kid Morph. Morph Holland. Yikes. That looks way worse on paper than it sounded in my head.

Duplication is the name of the game here. Duplicate the first slide by right-clicking and selecting "Duplicate slide."

Now we’re just going to play a game of moving things around and making them either bigger or smaller. And because most of our images are just shapes, we can resize them without degrading image quality.

The easiest way to move all these shapes is to group them into the left and right side by selecting several images and then right-click and select "group." Here is how I have mine grouped...

Make the following moves….

  1. Move the left group of buildings and hills almost all the way off the slide.
  2. Move the plane and banner group off to the slide to the right.
  3. Move the existing title off the top of the slide
  4. Copy the title and then move the copy back onto the slide and change the text

You slide should look something like this…

Now copy the new title text "Main Point I Want To Make" and paste it on the first slide. Then move it down to the bottom of the slide. Your first slide will now look like this…

On the second slide and select the "Transitions" tab and use the "Morph transition. Watch the magic unfold!

You can experiment with zooming in on any of the elements and then using that element as the slide background. For instance, maybe you have an image of an adorable pug that you want to show. You can animate individual elements with standard animations.

The rest is up to you. You can zoom in on buildings and use the windows for bullet points. Create a billboard and use that on the slide. I added a school bus (which I made with shapes BTW) just because school buses are awesome. I can say that now because I don’t have to ride one anymore. My kids would probably take serious issue with this.

Make something cool — because you can

Just like that you can create PowerPoint presentations that are so much fun to watch. People will wonder what the heck the slide is going to do next. They’ll stick around just for that. It does take some extra time to put together a high quality presentation, but on behalf of everyone who has ever sat through a PowerPoint presentation, I would like to thank you in advance.

If you would like to just grab and use this presentation (feel free to do so), you can download it here.

The post How to build a slide deck in PowerPoint that isn’t god awful appeared first on CSS-Tricks.

Syndicate content
©2003 - Present Akamai Design & Development.