Search
Pseudo-elements in the Web Animations API
14.5.2020
To use the Web Animations API (e.g. el.animate()) you need a reference to a DOM element to target. So, how do you use it on pseudo-elements, which don’t really offer a direct reference? Dan Wilson covers a (newish?) part of the API itself:
const logo...
Dealing With Stale Props and States in React’s Functional Components
12.5.2020
There’s one aspect of JavaScript that always has me pulling my hair: closures. I work with React a lot, and the overlap there is that they can sometimes be the cause of stale props and state. We’ll get into exactly what that means, but the trouble is that the data we use to build our UI can...
How I Put the Scroll Percentage in the Browser Title Bar
12.5.2020
Some nice trickery from Knut Melvær.
Ultimately the trick boils down to figuring out how far you’ve scrolled on the page and changing the title to show it, like:
document.title = `${percent}% ${post.title}`
Knut’s trick assumes React and installing an additional library. I’m sure...
10 Interesting JavaScript and CSS Libraries for May 2020
11.5.2020
A collection of our favorite web dev resources for the month of May, featuring useful JS tools, React components, and more!
Let’s Take a Deep Dive Into the CSS Contain Property
8.5.2020
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...
Making dark theme switcher with PostCSS.
7.5.2020
Building a dark theme switcher that take care of users OS preferences.
The post Making dark theme switcher with PostCSS. appeared first on CSS-Tricks
Static Hoisting
6.5.2020
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 Create Custom WordPress Editor Blocks in 2020
6.5.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...
How to Fix ESLint Errors Upon Save in VS Code
6.5.2020
Two of the most prominent utilities in web development today are ESLint and Microsoft’s Visual Studio Code. I enjoy using both, and I love the integration between both tools, but warnings from ESLint inside Visual Studio Code aren’t fulfilling — I’d rather lint errors...
The Anatomy of a Tablist Component in Vanilla JavaScript Versus React
5.5.2020
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....
Angular + Jamstack! (Free Webinar)
5.5.2020
(This is a sponsored post.)
It’s easy to think that working with Jamstack means working with some specific set of technologies. That’s how it’s traditionally been packaged for us. Think LAMP stack, where Linux, Apache, MySQL and PHP are explicit tools and languages. or MEAN...
Phuoc Nguyen’s One Page Wonders
2.5.2020
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
1.5.2020
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...
IMA.js – Načítání a vykreslování dat
29.4.2020
V předchozím díle jsme si zajistili data pro naši aplikaci a jejich zpracování pomocí modelů. Nyní můžeme začít s jejich zobrazováním
Alpine.js: The JavaScript Framework That’s Used Like jQuery, Written Like Vue, and Inspired by TailwindCSS
29.4.2020
We have big JavaScript frameworks that tons of people already use and like, including React, Vue, Angular, and Svelte. Do we need another JavaScript library? Let’s take a look at Alpine.js and you can decide for yourself. Alpine.js is for developers who aren’t looking to build a single page...
The Cost of Javascript Frameworks
26.4.2020
I expect this post from Tim Kadlec to be quoted in every performance conference talk for the next few years. There is a lot of data here, so please check it out for yourself, but the short story is that JavaScript-framework-powered sites are definitely heavier and more resource-intensive than...
@property
25.4.2020
The @property is totally new to me, but I see it’s headed to Chrome, so I suppose it’s good to know about!
There is a draft spec and an “intent to ship” document. The code from that document shows:
@property --my-property {
syntax: "<color";
initial-value: green;
...
How to Make a CSS-Only Carousel
24.4.2020
We mentioned a way to make a CSS-only carousel in a recent issue of the newsletter and I thought that a more detailed write up would be interesting and capture some of my thoughts on making one.
So, here’s what we’re making today:
There’s no JavaScript here, whatsoever! No jQuery plugins....
Different Approaches to Responsive CSS Motion Path
24.4.2020
As a follow-up to Jhey’s recent post on responsive motion paths, Michelle Barker notes that another approach could be to just transform: scale() the whole dang element.
The trade-off there is that you’re scaling both the path and the element on the path at the same time; Jhey’s...
[článek] JavaScript vládne programování, nová verze Nginx, IBM pomáhá koupě Red Hatu
24.4.2020
[5 minut čtení] Nové telefony od Motoroly. ProtonMail je kompletně open source. Nové levné procesory od AMD. Zprávy z IT, každý pátek na Lupě. Vždy v pátek připravuje reportér Jan Sedlák výběr zajímavých zpráv ze světa IT. Co se událo v tomto týdnu?