Search
The Story Behind TryShape, a Showcase for the CSS clip-path property
8.9.2021
I love shapes, especially colorful ones! Shapes on websites are in the same category of helpfulness as background colors, images, banners, section separators, artwork, and many more: they can help us understand context and inform our actions through affordances.
A …
The post The Story Behind...
Perfect Tooltips With CSS Clipping and Masking
17.6.2021
Clipping and masking have been around for a while now in CSS and even have pretty decent browser support. I recently worked on a project that needed to use a clipping technique for tooltips showing above links in text.
Those …
The post Perfect Tooltips With CSS Clipping and Masking appeared...
Trigonometry in CSS and JavaScript: Beyond Triangles
4.6.2021
In part three of our series we’ll look at how to create more interesting shapes with trigonometry, and how to draw them with the Canvas API.
The post Trigonometry in CSS and JavaScript: Beyond Triangles appeared first on Codrops
Trigonometry in CSS and JavaScript: Getting Creative with Trigonometric Functions
2.6.2021
In the second part of this series on trigonometry, we’ll explore JavaScript trigonometric functions and learn how we can apply them to our CSS code.
The post Trigonometry in CSS and JavaScript: Getting Creative with Trigonometric Functions appeared first on Codrops
Let’s Create an Image Pop-Out Effect With SVG Clip Path
2.4.2021
Few weeks ago, I stumbled upon this cool pop-out effect by Mikael Ainalem. It showcases the clip-path: path() in CSS, which just got proper support in most modern browsers. I wanted to dig into it myself to get …
The post Let’s Create an Image Pop-Out Effect With SVG Clip Path appeared first...
Shape Slideshow with Clip-path
10.3.2021
An experimental slideshow using clip-path to create shape transitions between slides.
The post Shape Slideshow with Clip-path appeared first on Codrops
Weekly Platform News: The :not() pseudo-class, Video Media Queries, clip-path: path() Support
5.2.2021
Hey, we’re back with weekly updates about the browser landscape from Šime Vidas.
In this week’s update, the CSS :not pseudo class can accept complex selectors, how to disable smooth scrolling when using “Find on page…” in Chrome, Safari’s …
The post Weekly...
clipPath vs. mask
27.12.2020
These things are so similar, I find it hard to keep them straight. This is a nice little explanation from viewBox (what a cool name and URL, I hope they keep it up).
The big thing is that clipPath (the element in SVG, as well as clip-path in CSS) is vector and when it is applied, whatever you...
How to Make an Area Chart With CSS
2.12.2020
You might know a few ways to create charts with pure CSS. Some of them are covered here on CSS-Tricks, and many others can be found on CodePen, but I haven’t seen many examples of “area charts” (imagine a line chart with the bottom area filled in), particularly any in HTML and CSS alone. In this...
Create Diagonal Layouts Like it’s 2020
9.4.2020
Nils Binder covers the ways:
1. Use an SVG in the form of a triangle. This technique is nicely described by Erik Kennedy on CSS-Tricks.
2. Hide part of your section using clip-path. Read Diagonal Containers in CSS by Sebastiano Guerriero or Sloped edges with consistent angle...
Background Scale Hover Effect with CSS Clip-path
11.3.2020
A simple recreation of the background scale hover effect seen on the DDD Hotel website using CSS clip-path.
Background Scale Hover Effect with CSS Clip-path was written by Mary Lou and published on Codrops
Unfortunately, clip-path: path() is Still a No-Go
2.3.2020
I was extremely excited when I first heard that clip-path: path() was coming to Firefox. Just imagine being able to easily code a breathing box like the one below with just one HTML element and very little CSS without needing SVG or a huge list of points inside the polygon function!
Chris...
Chameleonic Header
26.2.2020
Nice demo from Sebastiano Guerriero. When a fixed-position header moves from overlapping differently-colored backgrounds, the colors flop out to be appropriate for that background. Sebastiano's technique is very clever, involving multiple copies of the header within each section (where the copies...
Crafting a Cutout Collage Layout with CSS Grid and Clip-path
5.2.2020
Learn how to code up an interesting design with a cutout image look using CSS Grid and clip-path.
Crafting a Cutout Collage Layout with CSS Grid and Clip-path was written by Briana Camp and published on Codrops
Re-creating the ‘His Dark Materials’ Logo in CSS
11.1.2020
The text logo has a slash cut through the text. You set two copies on top of one another, cropping both of them with the clip-path property.
What's interesting to me is how many cool design effects require multiple copies of an element to do something cool. To get the extra copy, at least with...
css.gg
18.12.2019
I'm not sure what to call these icons from Astrit Malsija. The title is "500+ CSS Icons, Customizable, Retina Ready & API" and the URL is "css.gg" but they aren't really named anything.
Anyway, their shtick is:
The 🌎's first icon library designed by code.
The idea is that they don't...
Firefox 71: First Out of the Gate With Subgrid
5.12.2019
A great release from Firefox this week! See the whole roundup post from Chris Mills. I'm personally stoked to see clip-path: path(); go live, which we've been tracking as it's so clearly useful. We also get column-span: all; which is nice in case you're one of the few taking advantages of...
The Amazingly Useful Tools from Yoksel
15.11.2019
I find myself web searching for some tool by Yoksel at least every month. I figured I'd list out some of my favorites here in case you aren't aware of them.
Need to duo-tone an image? SVG filters can do that. Lentie Ward wrote about it for us, and Yoksel has a tool to create the filters...
Pac-Man… in CSS!
11.11.2019
You all know famous Pac-Man video game, right? The game is fun and building an animated Pac-Man character in HTML and CSS is just as fun! I’ll show you how to create one while leveraging the powers of the clip-path property.
See the Pen
Animated Pac-Man by Maks Akymenko (@maximakymenko)
...
Float Element in the Middle of a Paragraph
4.11.2019
Say you want to have an image (or any other element) visually float left into a paragraph of text. But like... in the middle of the paragraph, not right at the top. It's doable, but it's certainly in the realm of CSS trickery!
One thing you can do is slap the image right in the middle of...