Freelancing

CSS-Tricks

The `hidden` Attribute is Visibly Weak

4 hours 15 minutes ago

There is an HTML attribute that does exactly what you think it should do:

<div>I'm visible</div> <div hidden>I'm hidden</div>

It even has great browser support. Is it useful? Uhm. Maybe. Not really.

Adam Laki likes the semantics of it:

If we use the hidden attribute, we make our semantic a little better. Anybody will understand what does a “hidden” attribute means on an element.

Monica Dinculescu calls it a lie:

the hidden rule is a User Agent

Read article

The post The `hidden` Attribute is Visibly Weak appeared first on CSS-Tricks.

Chris Coyier

Workflow Considerations for Using an Image Management Service

10 hours 17 minutes ago

There are all these sites out there that want to help you with your images. They do things like optimize your images and help you serve them performantly.

That's a very good thing. By any metric, images are a major slice of the resources on websites, and we're notoriously bad at optimizing them and doing all the things we could to lower the performance hit from them. So you use some service to help you deliver images better. Smart. Many of them will make managing and optimizing images a lot easier. But I don't consider them a no-brainer. There is a lot to think about, like making choices that don't paint you into a corner.

The post Workflow Considerations for Using an Image Management Service appeared first on CSS-Tricks.

Chris Coyier

Ten-Ton Widgets

1 day 5 hours ago

At a recent conference talk (sorry, I forget which one), there was a quick example of poor web performance in the form of a third-party widget. The example showed a site that installed the widget in order to add a "email us" button fixed to the bottom right of the viewport. Not even a live-chat widget — just an email thing. It weighed in at something like 470KB, which is straight bananas.

Just in case you are someone who feels … Read article

The post Ten-Ton Widgets appeared first on CSS-Tricks.

Chris Coyier

Let’s Make a Fancy, but Uncomplicated Page Loader

1 day 11 hours ago

It’s pretty common to see a loading state on sites these days, particularly as progressive web apps and reactive sites are on the rise. It’s one way to improve "perceived" performance — that is, making it feel as though the site is loading faster than it actually is.

There’s no shortage of ways to make a loader — all it takes is a quick search on CodePen to see oodles of examples, from animated GIFs to complex animations. While it’s … Read article

The post Let’s Make a Fancy, but Uncomplicated Page Loader appeared first on CSS-Tricks.

Maks Akymenko

WordPress Plugin Overload? Give Jetpack a Try!

1 day 12 hours ago

The WordPress ecosystem has a plentiful supply of plugins that offer everything from AMP to Zapier integration and so, so, so many other things in between. It's a significant contributor to what makes WordPress great because plugins can account for the needs of nearly any website.

How many plugins are installed on your WordPress site? Five? Fifteen? Fifty? We've been up to 31 plugins here at CSS-Tricks and we rely on them for everything from content delivery to performance. Why … Read article

The post WordPress Plugin Overload? Give Jetpack a Try! appeared first on CSS-Tricks.

Geoff Graham

Weaving One Element Over and Under Another Element

2 days 6 hours ago

In this post, we’re going to use CSS superpowers to create a visual effect where two elements overlap and weave together. The epiphany for this design came during a short burst of spiritual inquisitiveness where I ended up at The Bible Project’s website. They make really cool animations, and I mean, really cool animations.

My attention, however, deviated from spiritualism to web design as I kept spotting these in-and-out border illustrations.

Screenshot form The Bible Project website.

I wondered … Read article

The post Weaving One Element Over and Under Another Element appeared first on CSS-Tricks.

Preethi

Stop Animations During Window Resizing

2 days 11 hours ago

Say you have page that has a bunch of transitions and animations on all sorts of elements. Some of them get triggered when the window is resized because they have to do with size of the page or position or padding or something. It doesn't really matter what it is, the fact that the transition or animation runs may contribute to a feeling of jankiness as you resize the window. If those transitions or animations don't deliver any benefit in … Read article

The post Stop Animations During Window Resizing appeared first on CSS-Tricks.

Chris Coyier

Two Images and an API: Everything We Need for Recoloring Products

5 days 10 hours ago

I recently found a solution to dynamically update the color of any product image. So with just one <img> of a product, we can colorize it in different ways to show different color options. We don’t even need any fancy SVG or CSS to get it done!

We’ll be using an image editor (e.g. Photoshop or Sketch) and the image transformation service imgix. (This isn’t a sponsored post and there is no affiliation here — it’s just a technique … Read article

The post Two Images and an API: Everything We Need for Recoloring Products appeared first on CSS-Tricks.

Dermot Dooley

The Teletype Text Element Lives On… at Least on This Site

5 days 10 hours ago

It was this: <tt>

I say "was" because it's deprecated. It may still "work" (like everybody's favorite <marquee> in some browsers), but it could stop working anytime, they say. The whole purpose of it was to display text in a monospace font, like the way Teletype machines used to.

Dave used it jokingly the other day.

Per recent events: As you can see by this official transcript, Dave Rupert LLC has done nothing wrong...

<tt>
Client: This is the

Read article

The post The Teletype Text Element Lives On… at Least on This Site appeared first on CSS-Tricks.

Chris Coyier

Weekly Platform News: Impact of Third-Party Code, Passive Mixed Content, Countries with the Slowest Connections

6 days 7 hours ago

In this week's roundup, Lighthouse sheds light on third-party scripts, insecure resources will get blocked on secure sites, and many country connection speeds are still trying to catch up to others... literally.

Measure the impact of third-party code during page load

Lighthouse, Chrome’s built-in auditing tool, now shows a warning when the impact of third-party code on page load performance is too high. The pre-existing “Third-party usage” diagnostic audit will now fail if the total main-thread blocking time caused by … Read article

The post Weekly Platform News: Impact of Third-Party Code, Passive Mixed Content, Countries with the Slowest Connections appeared first on CSS-Tricks.

Šime Vidas

Recipes for Performance Testing Single Page Applications in WebPageTest

6 days 10 hours ago

WebPageTest is an online tool and an Open Source project to help developers audit the performance of their websites. As a Web Performance Evangelist at Theodo, I use it every single day. I am constantly amazed at what it offers to the web development community at large and the web performance folks particularly — for free.

But things can get difficult pretty quickly when dealing with Single Page Applications — usually written with React, Vue, Svelte or any other … Read article

The post Recipes for Performance Testing Single Page Applications in WebPageTest appeared first on CSS-Tricks.

Nicolas Goutay

Images Are Not Static Content

6 days 10 hours ago

We constantly hear about the importance of keeping websites lean and fast. A fast-loading website makes users more satisfied, and satisfied users spend more time and money on your website. However, website optimization is a complex task, as there is not one silver bullet to fix all of the issues causing poor performance.

We also hear that addressing the performance of images is a low hanging fruit if you want to improve your site’s user experience However, anyone who has … Read article

The post Images Are Not Static Content appeared first on CSS-Tricks.

Geoff Graham

Learn Programming

PHP: The latest news in the PHP world