Building A Dynamic Header With Intersection Observer — Smashing Magazine
In JavaScript, attaching an event listener to constantly fire a callback on scroll can be performance-intensive. But there is a better way with Intersection Observer.
Creating An Accessible Dialog From Scratch — Smashing Magazine
Dialogs are everywhere in modern interface design (for good or for bad), and yet many of them are not accessible to assistive technologies. In this article, we will dig into how to create a short script to create accessible dialogs.
Uses CSS animations to create scrolling text. Create W3C compliant code by using CSS to create your scrolling text. Copy/paste to your website or blog.
If you are creating a WordPress theme to power a website that will be updated by individuals without any knowledge of HTML, you can add custom styles to the visual TinyMCE editor and ensure that...
A CSS-only solution to reveal a scroll-to-top link only on scrolling down the page + animated scroll back to top. Requires position: sticky and scroll...
I'm trying to create a custom "columns" block for Gutenberg with ACF & Wordpress, so what I want is a easy to manage columns block, where user can input some number representating the
Update
The solution below has a "SEO friendlier" version:
function hyphenize($string) {
$dict = array(
"I'm" => "I am",
"thier" => "their",
// Add your own
How to Create an Accessible Responsive Image Slider in Vue
In this article you will learn how to build an accessible, performant, responsive, and cross-device content slider using native HTML, simple CSS, and some Vue.js to connect the dots. Its base is simple and can be expanded upon later. It has great bones and will serve you well going forward.
Typewriter Animation That Handles Anything You Throw at It | CSS-Tricks
I watched Kevin Powell’s video where he was able to recreate a nice typewriter-like animation using CSS. It’s neat and you should definitely check it out
Preloading JavaScript Assets in WordPress // Alex MacArthur
Squeezing every last drop of performance out of your website on any platform is an always-changing, never-ending, often addictive battle. Among the several tactics you can employ in this fight, leveraging resource hints is a modern approach that can yield some significant ROI -- with preloading is a particularly impactful...
I have set up a Gallery field in the Options section which includes 5 images. I then have an image header on my site where I want to grab a single random image from that gallery field. Is that possible? If so, could anybody guide me. At the moment I use the following code to […]
randomImageLoader/index.html at master · ywting/randomImageLoader
A simple script that uses Math.random() to load a random image everytime the webpage refreshes - randomImageLoader/index.html at master · ywting/randomImageLoader
If you are optimizing Largest Contentful Paint, preload can be a game-changer for speeding up late-discovered hero images and resources, loaded via JavaScript.
Perhaps unavoidably so, Flickity drags my site down with a significant Cumulative Layout Shift (CLS) score during Lighthouse and web.dev tests. Has anyone found a way around this?
Three Insights I Gained While Researching Vue.js Accessibility — Smashing Magazine
Web app accessibility appears difficult because it seems that there is little information on the subject available online. Let’s take a closer look at the accessible use of framework features, concrete Vue.js traits, as well as community initiatives and vetted patterns.
Detecting media query support in CSS and JavaScript | Kilian Valkhof
Recently I needed a way to detect support for a media query in CSS and Javascript. To detect if a browser supports a certain CSS feature, you can use @supports () { ... }, but that doesn’t work for media queries. In this article I’ll show you how you can detect support for media queries […]
Here's a pen with some generative plants and shapes. I kept the paths as simple as possible and then transformed them using SVG filters (feTurbulence a...