Search

Nalezeno "Article": 1993

prerender.js


This is another player in the game of rendering the page of the link that you’re about to click on before you click it. It’s like getting a decent performance boost for extremely little effort. Instant.page is another one, and I’ve been sufficiently convinced by its methodology...

Let’s Take a Deep Dive Into the CSS Contain Property


Compared to the past, modern browsers have become really efficient at rendering the tangled web of HTML, CSS, and JavaScript code a typical webpage provides. It takes a mere milliseconds to render the code we give it into something people can use. What could we, as front-end developers, do...

I’m getting back to making videos


It’s probably one part coronavirus, one part new-fancy-video setup, and one part “hey this is good for CodePen too,” but I’ve been doing more videos lately. It’s nice to be back in the swing of that for a minute. There’s something fun about coming back to an...

Creating an Accessible Range Slider with CSS


The accessibility trick is using <input type="range"> and wrestling it into shape with CSS rather than giving up and re-building it with divs or whatever and later forget about accessibility. The most clever example uses an angled linear-gradient background making the input look like...

Working With MDX Custom Elements and Shortcodes


MDX is a killer feature for things like blogs, slide decks and component documentation. It allows you to write Markdown without worrying about HTML elements, their formatting and placement while sprinkling in the magic of custom React components when necessary. Let’s harness that magic and look...

Static Hoisting


The other day in “Static or not?” I said: […] serving HTML from a CDN is some feat. What I meant is that serving resources like images, CSS, and JavaScript from a CDN is fairly straightforward. The industry at large has been doing that for many years. An asset with a URL can...

How to Use Block Variations in WordPress


WordPress 5.4 was released not so long ago and, along with other improvements and bug fixes, it introduced a feature called Block Variations. I had a chance to use it on one of my recent projects and am so pleasantly surprised with how smart this feature is. I actually think it hasn’t received...

How to Create Custom WordPress Editor Blocks in 2020


Peter Tasker on creating blocks right now: It’s fairly straightforward these days to get set up with the WP CLI ‘scaffold’ command. This command will set up a WordPress theme or plugin with a ‘blocks’ folder that contains the PHP and base CSS and JavaScript required to create...

`lh` and `rlh` units


There’s some new units I was totally unaware of from the Level 4 spec for CSS values! The lh unit is “equal to the computed value of line-height” and rlh is the same only of the root element (probably the <html> element) rather than the current element. Why would that...

The Anatomy of a Tablist Component in Vanilla JavaScript Versus React


If you follow the undercurrent of the JavaScript community, there seems to be a divide as of late. It goes back over a decade. Really, this sort of strife has always been. Perhaps it is human nature. Whenever a popular framework gains traction, you inevitably see people comparing it to rivals....

List Style Recipes


Lists are a fundamental part of HTML! They are useful in things like blog posts for listing out steps, recipes for listing ingredients, or items in a navigation menu. Not only are they an opportunity for styling, but they have accessibility implications. For example, the number of items in a list...

Playing With (Fake) Container Queries With watched-box & resizeasaurus


Heydon’s <watched-box> is a damn fantastic tool. It’s a custom element that essentially does container queries by way of class names that get added to the box based on size breakpoints that are calculated with ResizeObserver. It’s like a cleaner version of what Philip...

A Complete Guide to CSS Functions


Like any other programming language, CSS has functions. They can be inserted where you’d place a value, or in some cases, accompanying another value declaration. The post A Complete Guide to CSS Functions appeared first on CSS-Tricks

No-Comma Color Functions in CSS


There have been a couple of viral tweets about this lately, one from Adam Argyle and one from Mathias Bynes. This is a nice change that makes CSS a bit more clear. Before, every single color function actually needs two functions, one for transparency and one without, this eliminates that need...

Creating a Gauge in React


You should really look at everything Amelia does, but I get extra excited about her interactive blog posts. Her latest about creating a gauge with SVG in React is unreal. Just the stuff about understanding viewBox is amazing and that’s like 10% of it. Don’t miss her earlier posts like...

Phuoc Nguyen’s One Page Wonders


I keep running across these super useful one page sites, and they keep being by the same person! Like this one with over 100 vanilla JavaScript DOM manipulation recipes, this similar one full of one-liners, and this one with loads of layouts. For that last one, making 91 icons for all those design...

React Integration Testing: Greater Coverage, Fewer Tests


Integration tests are a natural fit for interactive websites, like ones you might build with React. They validate how a user interacts with your app without the overhead of end-to-end testing.  This article follows an exercise that starts with a simple website, validates behavior with unit...

CSS-Tricks Chronicle XXXVIII


Hey hey, these “chronicle” posts are little roundups of news that I haven’t gotten a chance to link up yet. They are often things that I’ve done off-site, like be a guest on a podcast or online conference. Or it’s news from other projects I work on. Or some other thing...

Some Innocent Fun With HTML Video and Progress


The idea came while watching a mandatory training video on bullying in the workplace. I can just hear High School Geoff LOL-ing about a wimp like me have to watch that thing. But here we are. The video UI was actually lovely, but it was the progress bar that really caught my attention – or rather...

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