Search
How To Best Spend Your Time In Disney Dreamlight Valley's Storybook Vale
20.11.2024
As a wise man once said, “If you can be one thing, you should be efficient.” Take that to heart when getting started in Disney Dreamlight Valley’s new expansion The Storybook Vale. There’s a staggering amount of fresh content to see, characters to meet, and materials to collect and you should...
How to Get the Current Branch Name with git
28.10.2023
Most developers spoil themselves with fun command line utilities to make their work easier and more efficient. One such command line helper allows developers to always show the git branch in the command line. How can you get the current branch? With this handy snippet: git branch --show-current...
Ahmad Shadeed: Use Cases For CSS fit-content
1.3.2022
Ahmad Shadeed covers the CSS fit-content sizing keyword. It’s useful! It just doesn’t come up super often. I find myself using min-content a lot more, like when setting up the height of a grid-template-row.
The fit-content keyword is actually …
Ahmad Shadeed: Use Cases For...
No Motion Isn’t Always prefers-reduced-motion
8.2.2022
There is a code snippet that I see all the time when the media query prefers-reduced-motion is talked about. Here it is:
@media (prefers-reduced-motion: reduce) {
* {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms...
Sticky Definition Lists
28.10.2021
I ran across this 30 seconds of code website the other day, and they have a CSS section which is really good! The first example snippet I looked at was this “floating section headers” example, reminding me yet again how …
The post Sticky Definition Lists appeared first...
WooCommerce + Google Analytics
12.10.2021
Google Analytics is powerful analytics software. A common way to use it is to just slap the JavaScript snippet on every page template you have and let it collect basic data about unique visitors and pageviews and such. That’s useful, …
The post WooCommerce + Google Analytics appeared...
Creating Stylesheet Feature Flags With Sass !default
14.5.2021
!default is a Sass flag that indicates conditional assignment to a variable — it assigns a value only if the variable was previously undefined or null. Consider this code snippet:
$variable: 'test' !default;
To the Sass compiler, this line …
The post Creating Stylesheet Feature Flags With...
How to Monitor Core Web Vitals and Take Action with Raygun
29.4.2021
Raygun is an error and performance monitoring software for websites and mobile apps. In the case of websites, you install their JavaScript snippet onto your site, which takes 2 seconds, and now you’ve got monitoring in place. Why? Well now …
The post How to Monitor Core Web Vitals...
Platform News: Using :focus-visible, BBC’s New Typeface, Declarative Shadow DOMs, A11Y and Placeholders
16.4.2021
There’s a whole lot of accessibility in this week’s news, from the nuances of using :focus-visible and input placeholders, to accessible typefaces and a Safari bug with :display: contents. Plus, a snippet for a bare-bones web component that supports …
The post Platform News:...
Weekly Platform News: Focus Rings, Donut Scope, Ditching em Units, and Global Privacy Control
4.3.2021
In this week’s news, Chrome tackles focus rings, we learn how to get “donut” scope, Global Privacy Control gets big-name adoption, it’s time to ditch pixels in media queries, and a snippet that prevents annoying form validation styling.
Chrome will…
The post Weekly...
How to Load Fonts in a Way That Fights FOUT and Makes Lighthouse Happy
24.11.2020
A web font workflow is simple, right? Choose a few nice-looking web-ready fonts, get the HTML or CSS code snippet, plop it in the project, and check if they display properly. People do this with Google Fonts a zillion times a day, dropping its <link> tag into the <head>.
Let’s...
A Web Component with Different HTML for Desktop and Mobile
16.1.2020
Christian Schaefer has a great big write-up about dealing with web advertisements. The whole thing is interesting, first documenting all the challenges that ads present, and then presenting modern solutions to each of them.
One code snippet that caught my eye was a simple way to design a component...
“Link In Bio” is a slow knife
16.12.2019
Anil Dash:
If Instagram users could post links willy-nilly, they might even be able to connect directly to their users, getting their email addresses or finding other ways to communicate with them. Links represent a threat to closed systems.
On CodePen, we have a TextExpander snippet we use...
A Snippet to See all SVGs in a Sprite
8.10.2019
I think of an SVG sprite as this:
<svg display="none">
<symbol id="icon-one"> ... <symbol>
<symbol id="icon-two"> ... <symbol>
<symbol id="icon-three"> ... <symbol>
</svg>
I was long a fan of that approach for icon systems...
Weekly Platform News: Layout Shifts, Stalled High-Bitrate Videos, Screenshots in Firefox
26.9.2019
In this week's roundup: fighting shifty layouts, some videos might be a bit stalled, and a new way to take screenshots in Firefox.
Let's get into the news!
Identifying the causes of layout shifts during page load
You can now use WebPageTest to capture any layout shifts that occur on your website...
Five Methods for Five-Star Ratings
5.7.2019
In the world of likes and social statistics, reviews are very important method for leaving feedback. Users often like to know the opinions of others before deciding on items to purchase themselves, or even articles to read, movies to see, or restaurants to dine.
Developers often struggle with with...
Game of Thrones Quiz Game with React and GraphQL: Creating the Question Modal
17.6.2019
Create a folder named question-modal within the src/components directory and a file index.js within it. Open the file and update it with the snippet below:
Clever code
17.4.2019
This week, Chris Ferdinandi examined a clever JavaScript snippet, one that's written creatively with new syntax features, but is perhaps less readable and performant. It's a quick read, but his callout of our industry's fixation on cleverness is worth... calling out:
...we’ve become obsessed as...
Smooth Scrolling for Screencasts
13.3.2019
Let's say you wanted to scroll a web page from top to bottom programmatically. For example, you're recording a screencast and want a nice full-page scroll. You probably can't scroll it yourself because it'll be all uneven and jerky. Native JavaScript can do smooth scrolling. Here's a tiny snippet...
Příručka marketéra: Optimalizace snippetů ve výsledcích vyhledávání
16.1.2018
Množství SEO specialistů vnímá jako hlavní cíl optimalizace dosáhnout přední pozice ve výsledcích vyhledávání na vybraná klíčová slova. To však zdaleka není to nejdůležitější. Každý SEO specialista by měl myslet nejen na to, jak dosáhnout nejvyšší příčky ve výsledcích vyhledávání. Ale také na...