background preloader

CSS

Facebook Twitter

Everything You Need to Know About the CSS will-change Property. Introduction If you’ve ever noticed “that flicker” in WebKit-based browsers while performing certain CSS operations, especially CSS transforms and animations, then you’ve most likely come across the term “hardware acceleration” before.

Everything You Need to Know About the CSS will-change Property

The CPU, GPU, and Hardware Acceleration In a nutshell, Hardware acceleration means that the Graphics Processing Unit (GPU) will assist your browser in rendering a page by doing some of the heavy lifting, instead of throwing it all onto the Central Processing Unit (CPU) to do. When a CSS operation is hardware-accelerated, it usually gets a speed boost as the page rendering gets faster. As their names show, both the CPU and the GPU are processing units. Btns.css - beautiful button styles. SVG `text` and Small, Scalable, Accessible Typographic Designs. Let's say you designed something with custom fonts that was a little bit fancy.

SVG `text` and Small, Scalable, Accessible Typographic Designs

Perhaps a certain word is positioned between the ascenders of another word below it. Some text is kerned out below to match the width of that same word. This is something we might tell a graphic designer switching from print to web to avoid. It's too finicky. 7 Things You Didn't Know You Could Do with CSS. CSS and JavaScript, believe it or not, are starting to overlap as CSS adds more functionality.

7 Things You Didn't Know You Could Do with CSS

When I wrote 5 Ways that CSS and JavaScript Interact That You May Not Know About, people were surprised at how CSS and JavaScript have come to overlap. Creating Decorated Ordered Lists With CSS. HTML ordered lists can be incremented in many different languages, but customizing the appearance of the leading numbers in each list item is rather difficult.

Creating Decorated Ordered Lists With CSS

Formatting the list in an OpenType font and using font-feature-settings to produce a special numbers option is one possibility, but there is an easier method. By using the under-appreciated CSS counters property – usually associated with generating point-numbered lists – we can customize the leading numbers with abandon. Given a standard HTML ordered list: <h1>Clarke’s Three Laws</h1> <li>When a distinguished but elderly scientist states that something is possible, he is almost certainly right. <li>The only way of discovering the limits of the possible is to venture a little way past them into the impossible. <li>Any sufficiently advanced technology is indistinguishable from magic. Frosting Glass with CSS Filters. The following is a guest post by Bear Travis, a Web Standards Engineer at Adobe.

Frosting Glass with CSS Filters

I'm a fan of how Adobe is pushing the web forward with new design capabilities, and doing it in a responsible way. CSS filters is a good example. They knew they were desired because Photoshop paved the way. They brought them to the web with a sensible syntax and they helped with both the spec and browser implementation. Now we're seeing them in stable browsers, and they are advocating use through responsible progressive enhancement. While filters such as contrast, saturate, and blur have existed in image editors for some time, delivering them on the web has historically required serving images with those filters already applied. Old School: Frosted Glass with Images The frosted glass effect has been kicking around the internet for a while; we even saw it here on CSS-Tricks back in 2008.

Demo The HTML. The Definitive Guide to CSS Transitions. Back in the golden days of the web, we had a little thing called Flash to help us make the web a dynamic, fun, interactive place.

The Definitive Guide to CSS Transitions

But, Flash is being used less and less. Of course, in certain environments it can still be put to amazing use, but in today’s web environment you need CSS to get the job done. One of the easiest ways to give your site a near-instant facelift is to bring CSS3 transitions to the table (pun intended). As users interact with various elements on your page, transitions allow for a delayed response that is far more natural and engaging than a jarring, instant response.

Case in point, hover over these two boxes and tell me which is more interesting to you. Drop this into an HTML document and check it out: Yeah, I know gray boxes aren’t all that exciting, but the point is that the transitions on the box to the right are more interesting and give the design a more polished feel. CSS Beautifier. CSS Diner - Where we feast on CSS Selectors! CSS Playground. Adapt.js - Adaptive CSS. CSS Almanac. Troubleshooting CSS. Sometimes CSS can be frustrating.

Troubleshooting CSS

Learn about some tricky properties, the common issues they can cause and how to solve them. CSS is a mess. First introduced in ~1995, it was meant to style basic text documents. Not websites. Not applications. A lot of things were not intended in the first place like multi-column layouts, responsive web design and more; this is why it has become a language full of hacks and glitches, like some kind of odd steam machine with a bunch of extensions. On the bright side, this is what makes CSS fun (or kinda)! Photo credits Anyway, I’m not here to talk about my convictions but about CSS. Among others, I picked some really common yet annoying issues: Float clearing, an old battle I think this has to be the most common wat? Basically, when an element only contains floated elements, it collapses on itself. There are a number of ways to fix this.

Then Nicolas Gallagher came with a new way to clear floats from the parent without touching the markup at all. Why? CSS3 Keyframes Animation Generator. Flexible CSS cover images. I recently included the option to add a large cover image, like the one above, to my posts.

Flexible CSS cover images

The source image is cropped, and below specific maximum dimensions it’s displayed at a predetermined aspect ratio. This post describes the implementation. CSS Front-end Frameworks with comparison - By usabli.ca. WTF, HTML and CSS?