Andrea Verlicchi's Blog

Hello! I'm Andrea and I wrote...

Using CSS variables to scale layout spaces

Here I show you how you can CSS variables (or custom properties) them to scale your layout spaces across different media queries. The advantage: shorter, lighter, easier-to-maintain CSS files.

Changing text color for contrast based on background lightness

If you had to change the color of some fixed-positioned text based on the lightness of its scrolling background, how would you do that? CSS filters, blend modes? But what if you had to support all browsers, including Internet Explorer? Here are a couple of ways to do that using CSS clip and clip-path.

Slides of my talk about responsive images at CSS Day 2017

e On March 17th 2017 I spoke about responsive images, an HTML 5.1 standard at the CSS Day 2017 Conference in Faenza, Italy. The speech was on web performance, since using responsive images is a way to serve lighter images to smaller screens (and viceversa) and images optimization. I also took a sneak peek on how to generate the right size for your images in the cloud using a software as a service.

Responsive images? You don't need the picture tag

Say you have a responsive website layout where images are sized at 100% of the container, but the container is not always as wide as the viewport. Do we need to use the picture tag, or the img tag is enough? The img tag can do it, using its sizes and srcset attributes. Here’s how.

Lazy load of responsive images with srcset and LazyLoad

It’s now possible (yes, today!) to have lazy loading on responsive images to make our images to adapt to users screens and keep our website fast. YAY! \o/ In this article, we’ll see what markup we need to write and which Javascript libraries we’re gonna need to do that.

Pagination

Page 1 of 3 No newer posts Older posts →