CSS posts

How to optimize CSS animation with the will-change property

If you have done many animations using pure CSS you have probably noticed a small flicker that happens when an element is animated, you may even have used a hack to stop that from happening. Happily hacks are no longer needed, we a have a new CSS property to help us deal with heavy animations and transitions. Why does the flicker happen? ... When you execute an animation, the animation is performed using the browser's software rendering engine which is usually much slower than your computers GPU (Graphics...
read more

How to use CSS text stroke

CSS3 is evolving in such a way that we can translate pretty much everything we create in Photoshop into CSS code. However one thing we haven't had so far is a text stroke. We can add shadows to text, but until now there was no viable solution for text stroke. Now we have a webkit solution that introduces us to text stroke using only CSS. Browser support ... This property is still experimental and not safe in all browsers but you can also set some defaults that will only act up when the user is using a browser that...
read more

How to use clipping and masking in CSS

CSS is growing more sophisticated all the time, with new tools for us to use. In this article I'll talk about one new feature: clipping with clip-path and masking. clip-path and masking are two properties that push the boundaries of the box model a little further than we've seen before. Browser support ... Happily, browser support is pretty good for clip-path. For desktop browsers it's supported as far back as IE9 (although some older browsers need vendor prefixes, as we'll see). The only real issue...
read more

How to easily use Google Fonts with Sass

In this post, we are going to explore open source fonts and CSS pre-processing. I am going to give you an easy way to add web fonts to any website in just a few lines of code. What are Google Fonts? ... Google Fonts makes it quick and easy for everyone to use web fonts. Google Fonts is a collection of open source fonts that are hosted on Google's servers and with their API, it is easy for anyone to integrate their fonts into any web project. Best of all, it's free. (To learn more and explore the hundreds of fonts available,...
read more

How to use Cute Grids

This is a golden age for frameworks, with dozens for us to choose from. We have great options like Bootstrap and Foundation, but sometimes these frameworks deliver more than we want. Sometimes, all we need is a clean, and responsive grid. Cue: Cute Grids. Why use Cute Grids? ... The idea behind Cute Grids is to get you away from a full featured framework, and focus on just the grid. Cute Grids take a mobile-first approach, so that all of your websites work on mobile as well as desktop. The framework is completely...
read more

How to use Myth

Most of us use some form of a CSS pre processor now, they give us the freedom and advantages that CSS still doesn’t have implemented, like variables. The problem with these pre processors is that they use a completely different syntax than CSS itself making us learn two syntaxes. What if we could have a pre processor that had all the advantages we are used to and still keep the CSS syntax ? Myth allows you write CSS syntax so that you don’t have to remember two syntaxes and so that when features like variables...
read more

How to style file input fields

One area we always have some difficulty when it comes to styling is input fields and in particular the file input. This type of input doesn't usually allow for much customization but with some JavaScript tricks we can create our own file input that matches our website's look and feel.   The HTML ... Using the default HTML element for file input we can't create much so in this article we will create our file input that will be hidden and we will create another button that with some javascript magic will...
read more

Introducing viewport units

With the introduction of CSS3 we’ve seen huge advancements in web technology, and the last few years have felt like golden ones for anyone working on the Web. One great addition that hasn’t been talked up enough is viewport units. They’re anew kind of CSS3 unit that allow you to size elements relative to the viewport. Browser support ... The browser support for viewport units is surprisingly good. There’s full support in all the latest desktop browsers. IE has had full support since IE9 (although...
read more
Load more