How the CSS minmax() Function Works

One incredibly useful new feature introduced with the CSS Grid Layout Specification is the minmax() function. This function opens the door to us being able to write much more powerful and succinct CSS by allowing us to set, as a value for a grid track, a function including both a minimum and maximum value. Using …

Split emoji text effect with CSS

Thanks to some absolute positioning, hue-rotation, and even some clipping you can create nice split emoji: I especially like the experiments near the lower part of the demo, where one emoji is used as a modifier for the other (e.g. the ๐ŸŽฉ is placed on top of ๐Ÿ˜, yielding a new emoji). They remind me …

Pure CSS Crossword (CSS Grid)

Nice demo of a pure CSS Crossword Puzzle, built using CSS Grid. Be sure to check out the validation rules too, they’re built using the General Sibling Selector (e.g. ~): #item1-1:valid ~ #item1-2:valid ~ #item1-3:valid ~ #item1-4:valid ~ #item1-5:valid ~ #item1-6:valid ~ .crossword-board–highlight .crossword-board__item-highlight–across-1 { opacity: 1; } UPDATE 2017.06.22: There’s a blogpost available, describing …

Typical display: flow-root; use case

Good display: flow-root; use case by Paul Bakaus: flow-root establishes a new block formatting context, but most have dismissed it as simply replacing clearfix hacks. But consider this extremely common case, where you have a few paragraphs of text, some bullet points and a floating image. In the image above you can see that the …

Styling React Components with โ€œGlamorous ๐Ÿ’„โ€

Glamorous ๐Ÿ’„ is a styled-components ๐Ÿ’… and jsxstyle inspired solution for styling โš› React Components. It allows you to do stuff like this: // Create a <Title> react component that renders an <h1> which is // centered, palevioletred and sized at 1.5em const Title = glamorous.h1({ fontSize: '1.5em', textAlign: 'center', color: 'palevioletred', }) // Create …