HTML and CSS techniques to reduce your JavaScript

Anthony Ricaud, writing for the Web Performance Calendar, on the extra load that JavaScript can put on your site, and how you can replace some things with basic HTML and CSS: Relying on solutions provided natively by browsers enables you to benefit at low cost from the expertise of the community creating web standards. These …

“Yes or No?” — One Checkbox vs Two Radio Buttons

Great research by Sara Soueidan: If you have a question with a binary Yes/No answer, is it better to use one checkbox or two radio buttons? As per usual: It Depends™. The consensus however seems to be that requiring an explicit “No” is the determining factor to avoid the simple checkbox. Over at CSS-Tricks Chris …

Thinking on ways to solve Centering in CSS

Adam Argyle looking at several techniques to center in CSS, and how they hold up in several conditions (narrow screen, rtl, etc) In today’s challenge, we’re stress testing 5 different CSS centering techniques. See what techniques should earn a place in your tool belt by watching how they react to common layout stress. The contestants: …

How to Favicon in 2021

Andrey Sitnik: It is time to rethink how we cook a set of favicons for modern browsers and stop the icon generator madness. Currently, frontend developers have to deal with 20+ static PNG files just to display a tiny website logo in a browser tab or on a touchscreen. Having only this in your markup …

How Discord Implemented App-Wide Keyboard Navigation

When working on creating a complete keyboard navigation experience for Discord, using styling with :focus and outline, the folks at Discord ran into issues where the outline would not match the shape of actual element being rendered. Thinks like border-radius, overflow: hidden; on the container, padding got in the way. So they set out to …

Querying your Redux store with GraphQL

Using Apollo Client’s InMemoryCache and Local Resolvers, it’s possible to have it query your Redux store: import store from "./Store"; const typeDefs = gql` type Query { users: [User] } type User { groups: [Group] } type Group {} `; const client = new ApolloClient({ cache: new InMemoryCache(), typeDefs, resolvers: { Query: { users: () …

Turbo: The speed of a single-page web application without having to write any JavaScript

From the folks at Basecamp comes Turbo: Turbo accelerates links and form submissions without requiring you to change your server-side generated HTML. It lets you carve up a page into independent frames, which can be lazy-loaded and operate as independent components. And finally, helps you make partial page updates using just HTML and a set …

Data Fetching with React Server Components

Just announced by the React Team are Server Components: React Server Components are still in research and development. We are sharing this work in the spirit of transparency and to get initial feedback from the React community. With Server Side Rendering the rendering of your app to HTML happens up front, gets sent to the …