Search

Nalezeno "snippet": 20

How To Best Spend Your Time In Disney Dreamlight Valley's Storybook Vale


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


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


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


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


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


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


!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


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...

How to Load Fonts in a Way That Fights FOUT and Makes Lighthouse Happy


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


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


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


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...

Five Methods for Five-Star Ratings


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...

Clever code


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


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í


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...

Nahoru
Tento web používá k poskytování služeb a analýze návštěvnosti soubory cookie. Používáním tohoto webu s tímto souhlasíte. Další informace