Tuesday, October 13, 2015

The Billion Dollar Question: Who is the New Steve Jobs?

Note: A special thanks to Sam Mallikarjunan, the person who knew the answer to this before me.

steve jobs travis kalanick

When I watch a Steve Jobs video on YouTube, my entire body tingles with motivation.

You know what I mean? That invincible feeling that permeates through your body and gives you hope that you, one little human being, can make the entire world a better place.

Right now, my entire body is tingling with motivation. But it’s not because I just binged on Steve Jobs’ video clips. It’s because I just binged on articles about Travis Kalanick, Uber founder and CEO.

I believe Kalanick is the new Steve Jobs.

Continue reading %The Billion Dollar Question: Who is the New Steve Jobs?%


by Lauren Holliday via SitePoint

What Do Super High-Res Displays Mean for Your Website?

When retina displays hit the market, web design experts and web developers gasped at the thought of having to deal with a new resolution.

From a web design standpoint, it was a nightmare. Responsive design dealt with content for different screen sizes and device widths, but pixel ratios were a whole new ball game. Now Apple is releasing iMacs with 5K displays and a lot of web designers are sweating at the thought of scaling everything up once again.

5k Display

The problem with this comes from the fact that the main consumers for these types of machines are web and graphic designers. We are always upgrading our equipment. We're only human, and we are looking for the most features for our money. The problem is that in order for graphics to appear crisp, so they'll need to create images that are 4 times as large in pixel size.

Problems Arise

There are several problems that arise when screen resolutions drastically increase. For Retina displays, images doubled in size. Now, with the 5K display, they doubled again, meaning they are 4 times larger than typical images.

Bandwidth is limited

[author_more]
CoDesign Tools: Is it Time to Switch?
Is Your Website's Privacy Policy Putting You at Risk?
The Non-Writer's Guide to Writing for Search Engines
[/author_more]

Serving large images is fine when you're on your desktop computer with a high-speed internet connection. However, it's impossible to ignore the 80% of browsers who are looking at your site on a mobile device. 4X images will crush 3G and 4G internet connections. You will have to serve smaller images to those devices for quick load times and to save as much bandwidth as possible.

Another Size to Remember

Not only is it rough on bandwidth, but it's another image size you have to remember. When building a website, you'll have to accommodate those devices, creating an image size optimal for those devices. If you're concerned with conserving resources, it's an issue. A handful of 1-4MB images may not cause an issue, but what if you have thousands?

How Can We Address These Issues?

Fortunately, our field is working on solutions and workarounds to increasing image sizes. It would make our jobs more difficult to create multiple versions of sites or pages, but with simple scripts and options, we can serve the best version of our site and its files to the right people.

Images

The newer version of Photoshop has the ability for you to export an image in multiple sizes at once. This single feature can save you a few minutes per image of saving it at different sizes, including 2X for Retina displays. All that is needed is for Adobe to add 4X to their size options. It will be as simple as clicking a button and saving the image to a folder.

Media Queries

Media Queries

Media queries will allow you to serve different images to different devices with different pixel ratios, whether they are 1, 2, or 4. This will give you some degree of control over images looking crisp on the right device.

Picturefill

PictureFill

This lifesaver allows you to serve images to every user, depending on a variety of conditions you may encounter, with all of the different devices out there. PictureFill handles situations like screen size, viewport size, screen resolution, and more. It enables the element feature, as well as workarounds for browsers where it isn't supported.

Other Issues

With all of these issues to address and things to consider, as well as the solutions we've covered so far, there is still the issue with the weight of your site. With these huge image sizes, your site's weight is going to drastically increase. Most hosting companies allow limited resources. Not everyone can afford abundant hosting. The biggest issue is keeping your site's weight down.

SVG

SVG is constantly evolving, and it's a great way to cut down on weight. SVG file sizes are small, so whenever you can use them, it will help trim the fat on your site. Responsive SVGs means that the same graphic resizes to fit the screen size and different devices.

Optimizilla

Image Compression

Image compression is another way to cut down on the weight of your site. Just because your images are large and you have multiple copies, it doesn't mean they have to be full size.

There are several image compression services available to use and they are free, too. The top choices are WP Smushit, TinyPNG and Optimizilla. You'll want to choose the right one for you. You may want to try them out yourself to decide which one gets the best results for your images.

Just as an example, in the image above, I reduced the quality to 70%, but I couldn't notice a visual difference, but the file size was reduced by a significant 50%.

Continue reading %What Do Super High-Res Displays Mean for Your Website?%


by James George via SitePoint

Using PostCSS for Cross Browser Compatibility

In the last tutorial we wrapped up our “Quick Start” section of this series, and we’re now ready to move onto using PostCSS to generate stylesheets, employing different kinds of plugins for various purposes.

In this tutorial we’re going to use PostCSS to create a stylesheet designed for cross browser compatibility. We will:

  • Have vendor prefixes automatically added in
  • Add a series of fallbacks for Internet Explorer versions 8, 9 and 10
  • Add fallbacks for the not yet widely supported will-change property

Let’s begin!

Setup Your Project

The first thing you’ll need to do is setup your project to use either Gulp or Grunt, depending on your preference. If you don’t already have a preference for one or the other I recommend using Gulp as you’ll need less code to achieve the same ends.

You can read about how to setup Gulp or Grunt projects for PostCSS in the previous tutorials

respectively.

If you don't want to manually setup your project from scratch though, you can download the source files attached to this tutorial, and extract either the provided Gulp or Grunt starter project into an empty project folder. 

Then, with a terminal or command prompt pointed at the folder, run the command npm install.

Install Plugins

Now that you have your empty Gulp or Grunt + PostCSS project ready, we need to install the plugins you’ll be using in this tutorial.

We’re going to be installing quite a few plugins, so instead of installing them one at a time as we did in the “Quickstart Guides” for Gulp and Grunt, we’ll install them all at once with a single command.

Whether you’re using Gulp or Grunt, run the following command inside your project folder to install the plugins we’ll be using:

Now the plugins are installed, let’s go ahead and load them into your project.

Load Plugins via Gulp

If you’re using Gulp, add these variables under the variables already in the file:

Now add each of those new variable names into your processors array:

Do a quick test that everything is working by running the command gulp css then checking that a new “style.css” file has appeared in your project's "dest" folder.

Load Plugins via Grunt

If you’re using Grunt, update the processors object, which is nested under the options object, to the following:

Do a quick test compile by running the command grunt postcss then checking that your project’s “dest” folder now contains a new “style.css” file.

You now have all the plugins installed that are required for this tutorial, and you’re ready to move onto seeing how to use them to enhance your stylesheets’ cross browser compatibility.

Automatically Add Vendor Prefixing

Some of the measures for cross browser compatibility we’ll be covering will only be necessary for specific use cases. Automated vendor prefixing, on the other hand, is something I would suggest should be done with every project, via the Autoprefixer plugin created by Andrey Sitnik.

It can be difficult to keep tabs on which properties require which vendor prefixes at any given time, and by using Autoprefixer you don’t have to. Use Autoprefixer as part of every project and it will check your code against the data from CanIUse.com, then add vendor prefixes as necessary without you having to think about it.

Let’s do a little test to see Autoprefixer in action. Add the following animation and flexbox code to your project’s “src/style.css” file:

Run gulp css or grunt postcss to compile your file, and your “dest/style.css” should now contain this vendor prefixed code:

As you can see, vendor prefixes have been automatically added in, as dictated by the data provided from CanIUse.com on animation and flexbox.

Specifying Browser Support Levels

Autoprefixer uses Browserlist to determine which browser versions it will add support for. Under default settings it will apply vendor prefixes as required for:

  • > 1%: browsers used by more than one percent of people globally
  • last 2 versions: the last two versions of every browser tracked by CanIUse.com
  • Firefox ESR: the latest Firefox version
  • Opera 12.1: Opera version 12.1

The example we ran through above was compiled under Autoprefixer’s default settings. This meant support for IE10 and Safari 8 was included, so the -ms- and -webkit- prefixes they require for animation and flexbox were automatically inserted.

However, IE11 and Safari 9 don’t require these prefixes, so if you were to set your browserlist configuration to support only IE11+ and Safari 9+ these prefixes would no longer be added.

Try this out by passing a browsers setting through to Autoprefixer in your Gulpfile or Gruntfile like so:

Now if you recompile your CSS you’ll see there is no difference between your original and compiled code. This is because, with no support requested for Safari 8 or IE10, no vendor prefixes have been added in to suit them.

Related Links:

Add Fallback for “will-change” Property

The will-change property is used to let a browser know ahead of time that certain elements of your design are going to be animated. This allows the browser to optimize the rendering process and prevent delays and flickers. However, at present this property is not supported by IE / Edge, Safari or Opera Mini.

The postcss-will-change plugin, also created by Andrey Sitnik, adds a fallback that will help these browsers do a better job of rendering, even if not with the efficiency they could if they supported will-change. It does so by adding the backface-visibility property, which triggers the creation of a compositor layer that will be handled by the GPU.

For example, add this code to your “src/style.css” file:

Compile your stylesheet and you should see the fallback appear in your “dest/style.css” file:

Note: this plugin should be loaded before Autoprefixer in your Gulpfile/Gruntfile. This is to allow Autoprefixer to add vendor prefixes to the backface-visibility property, like so:

Related Links

Add Fallbacks for Old IE Issues

Thanks to improved browser versions from Microsoft, and major groups leading the way in dropping support for old IE, we’re gradually edging closer to not having to constantly consider fallbacks and workarounds for problematic legacy browsers. Microsoft itself will be dropping support for IE8 in 2016. Bootstrap 4 alpha was recently released and it has also dropped support for IE8. Google stopped supporting IE8 in 2012 and dropped IE9 support in 2013.

All that said, at the end of the day every project has to be assessed on a case by case basis, and if you’re targeting a demographic that has high usage rates of legacy browsers, you may have no choice but to do your best to support them. If that’s the case, the following plugins can help you make that process a little less painful.

Create rgba() Color Fallbacks

IE8 has no support for rgba() colors, so the postcss-color-rgba-fallback plugin by Guillaume Demesy adds a flat hexadecimal color as a fallback.

For example, add this code to your “src/style.css” file:

Compile and you should see the hexcode fall back added to your “dest/style.css” file:

Related Links

Create opacity Fallbacks

IE8 can’t handle the opacity property, so the postcss-opacity plugin by Vincent De Oliveira adds an IE specific filter to achieve the same effect.

Add this code to your source stylesheet:

After compilation you should see the appropriate -ms-filter fallback added:

Related Links

Convert :: into : on Pseudo-elements

It’s considered best practice when generating pseudo-elements such as .element::before to use a double colon notation ::. This is to help distinguish them from pseudo-classes such as .element:hover which should use a single colon notation :.

However, IE8 doesn’t support the double colon notation :: to create pseudo-elements, it only supports a single colon :. By using the postcss-pseudoelements plugin by Sven Tschui you can code according to best practices, and have the notation changed automatically.

Add the following double :: notation code:

Compile your file and you should see it has been reduced to the single : notation:

By coding to best practices and using this plugin, once IE8 is completely retired you can just reprocess your CSS without the plugin and have proper syntax in place.

Related Links

Add vm Fallback for vmin

In IE9 the viewport relative unit vmin is not supported, but instead uses the equivalent unit vm. If you’re catering to IE9, the postcss-vmin plugin by Vincent De Oliveira will add vm units as a fallback.

Add this code to your “src/style.css” file:

Recompile, and the resulting code should have the vm unit fallback added in:

Related Links

Add px Fallback for rem Units

IE8 doesn’t support rem units at all, and in both IE9 and IE10 they are unsupported in psuedo-elements and font shorthand declaration. With the node-pixrem plugin by Vincent De Oliveira and Rob Wierzbowski you can have px based fallbacks added automatically wherever you use rem units.

Add this code to your source stylesheet:

Recompile and you should see all the appropriate px fallbacks added:

Related Links

Let’s Recap

To sum up what we’ve covered in the above:

In the Next Tutorial

Coming up next in our PostCSS Deep Dive series is a tutorial on how to use plugins to minify and optimize your CSS. We’ll cover inlining @import files, combining media queries, stripping white space and several more methods to make your stylesheets as streamlined as possible. See you there!


by Kezz Bracey via Tuts+ Code

David Vuu

Design Weekly

Clean personal page for Australian UX/UI designer 'David Vuu' featuring a centrally divided layout. Quite a nice touch that with big image is of his latest project Design Weekly in use.

by Rob Hope via One Page Love

What To Wear

What To Wear Style

'What To Wear' is a simple but impressive One Pager that lets you find a stylish outfit based on your gender, location and upcoming event type. The location detection and weather forecast integration works well. This is a great little marketing exercise (in a Single Page website) by Looklist - the site that you land up on with the search results.

by Rob Hope via One Page Love

Quiz: Do You Understand WebSockets?

Free Course: Fun With Web Audio