Search
Weaving One Element Over and Under Another Element
14.10.2019
In this post, we’re going to use CSS superpowers to create a visual effect where two elements overlap and weave together. The epiphany for this design came during a short burst of spiritual inquisitiveness where I ended up at The Bible Project’s website. They make really cool animations, and...
Clipping, Clipping, and More Clipping!
8.10.2019
There are so many things you can do with clipping paths. I've been exploring them for quite some time and have come up with different techniques and use cases for them — and I want to share my findings with you! I hope this will spark new ideas for fun things you can do with the CSS clip-path...
The Many Ways to Link Up Shapes and Images with HTML and CSS
1.10.2019
Different website designs often call for a shape other than a square or rectangle to respond to a click event. Perhaps your site has some kind of tilted or curved banner where the click area would be awkwardly large as a straight rectangle. Or you have a large uniquely shaped logo where you only...
Various Methods for Expanding a Box While Preserving the Border Radius
6.9.2019
I've recently noticed an interesting change on CodePen: on hovering the pens on the homepage, there's a rectangle with rounded corners expanding in the back.
Expanding box effect on the CodePen homepage.
Being the curious creature that I am, I had to check how this works! Turns out, the rectangle...
A Glassy (and Classy) Text Effect
29.8.2019
The landing page for Apple Arcade has a cool effect where some "white" text has a sort of translucent effect. You can see some of the color of the background behind it through the text. It's not like knockout text where you see the exact background. In this case, live video is playing underneath....
Collective #531
11.7.2019
CSS Lists, Markers, And Counters * Atomize * SEO Mythbusting * Texel * Animating with Clip-Path
Collective #531 was written by Pedro Botelho and published on Codrops
Animating with Clip-Path
9.7.2019
clip-path is one of those CSS properties we generally know is there but might not reach for often for whatever reason. It’s a little intimidating in the sense that it feels like math class because it requires working with geometric shapes, each with different values that draw certain shapes...
Restricting a (pseudo) element to its parent’s border-box
2.7.2019
Have you ever wanted to ensure that nothing of a (pseudo) element gets displayed outside its parent's border-box? In case you're having trouble picturing what that looks like, let's say we wanted to get the following result with minimal markup and avoiding brittle CSS.
The desired result.
This...
Using “box shadows” and clip-path together
11.4.2019
Let's do a little step-by-step of a situation where you can't quite do what seems to make sense, but you can still get it done with CSS trickery. In this case, it'll be applying a shadow to a shape.
You make a box
.tag {
background: #FB8C00;
color: #222;
font: bold 32px system-ui;
padding:...
8 Little Videos About the Firefox Shape Path Editor
7.3.2019
It sometimes takes a quick 35 seconds for a concept to really sink in. Mikael Ainalem delivers that here, in the case that you haven't quite grokked the concepts behind path-based CSS properties like clip-path and shape-outside.
Here are two of my favorites. The first demonstrates animating text...
CSS Triangles, Multiple Ways
5.3.2019
I like Adam Laki's Quick Tip: CSS Triangles because it covers that ubiquitous fact about front-end techniques: there are always many ways to do the same thing. In this case, drawing a triangle can be done:
with border and a collapsed element
with clip-path: polygon()
with transform: rotate()...
Slice and Dice a Disc with CSS
13.1.2019
I recently came across an interesting sliced disc design. The disc had a diagonal gradient and was split into horizontal slices, offset a bit from left to right. Naturally, I started to think what would the most efficient way of doing it with CSS be.
Sliced gradient disc.
The first thought...
An Initial Implementation of clip-path: path();
24.12.2018
One thing that has long surprised (and saddened) me is that the clip-path property, as awesome as it is, only takes a few values. The circle() and ellipse() functions are nice, but hiding overflows and rounding with border-radius generally helps there already. Perhaps the most useful value...
People Talkin’ Shapes
22.12.2018
Codrops has a very nice article on CSS Shapes from Tania Rascia. You might know shape-outside is for redefining the area by which text is floated around that element, allowing for some interesting design opportunities. But there are a couple of genuine CSS tricks in here:
Float shape-outside...
Drawing Images with CSS Gradients
25.6.2018
What I mean by "CSS images" is images that are created using only HTML elements and CSS. They look as if they were SVGs drawn in Adobe Illustrator but they were made right in the browser. Some techniques I’ve seen used are tinkering with border radii, box shadows, and sometimes clip-path. You...