CSS Paper Snowflakes

Nice demo by Michelle Barker, in which she recreates snowflakes based on those folded paper cutouts we all made as a child. ⚠️ Warning: quite a heavy demo. Uses both a clip-path and mask-image to generate the cutout shapes. And oh, everything’s defined using Custom Properties. Love the attention to detail on this one too: …

Cooltipz.css — Pure CSS Customisable Tooltips

See the Pen Cooltipz.css – Cool tooltips made from pure CSS by Bramus (@bramus) on CodePen. I especially like the fact that these are customisable using CSS Custom Properties. Here’s a few of them: :root { –cooltipz-bg-color: #fff; –cooltipz-text-color: #333; –cooltipz-border-radius: 5rem; } Installation per NPM: npm install cooltipz-css Cooltipz.css →

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: () …