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
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.
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
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.
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
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.
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
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.
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...
Client: This is the
The post The Teletype Text Element Lives On… at Least on This Site appeared first on CSS-Tricks.
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
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.
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
Copyright 2019 © All rights reserved