


One of the main reasons I looked forward to starting the journey of writing the reference was knowing how much I will learn in the process. For me, that was enough of a reason to instantly say yes when Manoela approached me with the idea. During that time, I had little time for side projects, but I did keep writing-albeit sporadically-on my blog and other blogs such as A List Apart, among others. It took around 7–8 months to finish all of the entries. It was only a few days later that I started digging into CSS specifications and writing the reference entries. It was an idea in my head, and part of a vision that Manoela and Pedro have for Codrops.

This idea came to my mind since I used to google for some of the properties I saw in the Codrops demos when I first started learning CSS and checking Codrops out regularly.Īround the same time that year, Manoela approached me with the same idea. I thought that it would be fantastic if we had a CSS reference at hand for when someone needs to learn more about a specific CSS property used in one of the many creative demos found there.

Some time at the end of the year, I was thinking to myself: “Codrops would be an ultimate CSS reference if it had a CSS reference” (no pun intended). Thus, unlike my usual highly-technical blog posts, this is a (possibly-boring, but short!) post sharing a little more about the CSS Reference and how it came to be, and answering a couple of questions I got via Twitter since the release. Please note that as of January 2016, I am no longer the maintainer of the Codrops CSS Reference. I wrote a post over at Codrops introducing the reference and its features, I want to share a little bit more about my experience writing it. Yesterday, we finally released a long-awaited project over at Codrops: Codrops' new CSS Reference, authored by yours truly.
#Typanus codedrop svg full
A bit of CSS will make sure that our SVG is placed in full width, at the top of the large background image. Using a data-attribute, we define the final path that we want the initial one to animate to. Once we have both paths, we can use them in our HTML. When doing this, it’s as well a great way to roughly visualize how the animation will look and feel like (in reverse, of course). Once we have our optimized SVG with a “clean” path, we can use the editor to create the initial shape out of the more complex one: Although this shape is not really visible, we need all the points of the final path to be present in the initial one. SVGOMG cleans up SVGs and removes transforms I use it for paths or groups that had transforms applied to them by Sketch. The optimization step is not always needed as the path editor offers rounding, which is great. Then, I copy the path and paste it into the SvgPathEditor. I usually start making the shapes in Sketch and then I optimize them using SVGOMG. Unfortunately, graphic design softwares might not be the best choice for making proper, optimized paths. So the best way to make sure our path animation doesn’t turn out funky, is to start crafting the most complex shape which in our case is the final path with the curve. When we create paths that will be animated, we have to keep in mind that all points present in the final path, also need to be there in the initial shape. So, let’s have a look at this first example, where we simply animate the path of an SVG that has the same fill color as the background of the page: As we scroll, we’ll animate an SVG path from a rectangle to a wave shape.įor this to work, we need two paths: one initial path that is a rectangle and a final path that is the wavy shape. Let’s get started! Path Animation on SeparatorsĪnimating a path on scroll can be particularly interesting for separators and borders to full screen images. We can morph one path into another and we’ll do that once a shape enters the viewport.
#Typanus codedrop svg how to
Scrolling can be so much fun! Let’s have a look at how to make SVG shapes and clip-paths animate on scroll to add a bit of drama and waviness to a design.
