tagged: html, webdev

Details can be used to build accessible dialogs and dropdown menus. In this example I am using the custom elements that Github built; you can find them on Github at details-dialog-element and…

CSS Recipes
tagged: css, webdev, howto

Accordions Use the <details> element: Dropdown menus Here's how to make them simply and…

Javascript Objects
tagged: js, webdev

Conditional properties Default values If you wanna have values with variants in an object you usually do this, which is annoying: Instead, do this: Now you can access the default value with color…

React Hooks
tagged: react, js

useStaticQuery & useSiteMetadata I really like this idea of wrapping up common queries in a Gatsby site into custom hooks that can be used to access things like your site's metadata.

React Patterns
tagged: react, js, webdev

Detecting outside clicks Stolen from this Medium article by Pitipat Srichairat .

Regex Recipes

Regex to get URLs from the src attribute of an HTML <img> tag in a string Test whether a URL is internal or not