Animate Calligraphy with SVG

From time to time at Stackoverflow, the question pops up whether there is an equivalent to the stroke-dashoffset technique for animating the SVG stroke that works for the fill attribute. But upon closer inspection, what the questions are really trying to ask is something like this:
I have something that is sort of a line, but because it has varying brush widths, in SVG it is defined as the fill of a path.
How can this “brush" be animated?

In …
The post Animate Calligraphy with SVG appeared first on CSS-Tricks.

Link: https://css-tricks.com/animate-calligraphy-with-svg/

Advanced Document Conversions with Filestack

You might know Filestack from being an incredible service to add file uploading, storage, and management to your own web apps.
There is another thing Filestack can do for you: convert documents into different formats.

For one thing, it can manipulate documents. Take images. Perhaps you would like to offer some image manipulation for your users uploaded images, like cropping and rotation. That’s a common feature for apps that offer avatar uploading. With Filestack, you got it.
It’s great …
The post Advanced Document Conversions with Filestack appeared first on CSS-Tricks.

Link: https://css-tricks.com/advanced-document-conversions-with-filestack/

Balancing Time

I first wrote this post four years ago. I put it on a blog that no longer exists. Funnily enough, I still refer to it myself, so I figured it might be best served in a place where other people can see it. I’ve made only a few minor tweaks to the original content. A lot about how I work has changed, but most of these pieces have not.

I work on many personal projects concurrently. I love doing this, …
The post Balancing Time appeared first on CSS-Tricks.

Link: https://css-tricks.com/balancing-time/

Using Custom Fonts With SVG in an Image Tag

When we produce a PNG image, we use an tag or a CSS background, and that’s about it. It is dead simple and guaranteed to work.

PNG is way simpler to use in HTML than SVG
Unfortunately, the same cannot be said for SVG, despite its many advantages. Although you’re spoiled for choices when using SVG in HTML, it really boils down to inline, <object> and <img>, all with serious gotchas and trade-offs.
Problems with inline SVG…
The post Using Custom Fonts With SVG in an Image Tag appeared first on CSS-Tricks.

Link: https://css-tricks.com/using-custom-fonts-with-svg-in-an-image-tag/

What is SVG good for?

Y’all probably wouldn’t be surprised if I told you it’s pretty awesome for icons, and icon systems. SVG icon systems can, and perhaps should be quite easy. I’m a fan of just inlining those suckers, particularly when they are pretty simple.
But what else?

Logos is a classic example! A lot of people dip their toes in this way.
You don’t have to inline the SVG if you don’t want. It could be an or background-image as well.…
The post What is SVG good for? appeared first on CSS-Tricks.

Link: https://css-tricks.com/what-is-svg-good-for/

Centering: The Newest Coolest Way vs. The Oldest Coolest Way

This isn’t a comprehensive guide to centering things. We have that!
This is just a little observation about old and new. One of the trickier things related to centering in CSS is when you need to center both vertically and horizontally and you don’t know the width or height of what you are centering. Vertical centering being the extra tricky of the two.

Believe it or not, there was a way to do that even in IE 8. The trick …
The post Centering: The Newest Coolest Way vs. The Oldest Coolest Way appeared first on CSS-Tricks.

Link: https://css-tricks.com/centering-the-newest-coolest-way-vs-the-oldest-coolest-way/

Don’t just copy the @font-face out of Google Fonts URLs

I don’t think this is an epidemic or anything, but I’ve seen it done a few times and even advocated for. This is what I mean…

You go to Google Fonts and pick a font like Open Sans, and it gives you either a or an @import with a URL there in which to ready this font for usage on your site.
You can take a peek in there and see what it returns…
It’s just some @font-face declarations, …
The post Don’t just copy the @font-face out of Google Fonts URLs appeared first on CSS-Tricks.

Link: https://css-tricks.com/dont-just-copy-the-font-face-out-of-google-fonts-urls/

The Four Big Ways Jetpack Helps with Image Performance

We’ve been working with Jetpack around here as a sponsor. It’s a great match because as someone with a bunch of self-hosted WordPress sites, Jetpack is one of those no-brainer plugins for me. Jetpack can do a ton of good things for any site in a variety of very different ways. Here’s one way to think about it: it brings the power of WordPress’ own massive servers to you.
For now, let’s just focus on one angle of what …
The post The Four Big Ways Jetpack Helps with Image Performance appeared first on CSS-Tricks.

Link: https://css-tricks.com/the-four-big-ways-jetpack-helps-with-image-performance/

Building a RSS Viewer With Vue: Part 2

Welcome to Part 2 of this mini-series on building a RSS viewer with Vue. In the last post, I walked through how I built my demo using Vue.js and Vuetify on the front end and Webtask on the back end. When I built that initial version, I knew it was exactly thatmdash;an “initial" version. I took some time to work on a few updates, and while I won’t dare call this a "perfect" version, I do think I’ve made …
The post Building a RSS Viewer With Vue: Part 2 appeared first on CSS-Tricks.

Link: https://css-tricks.com/building-a-rss-viewer-with-vue-part-2/

Here’s the thing about “unused CSS” tools

There are a lot of tools that aim to help you remove “unused CSS" from your project. Never a week goes by that I don’t see a tool for this being shared or promoted. It must strike some kind of perfect chord for some developers. I care about performance, and I know that reducing file sizes is good for performance. Indeed, it is. I bet we have CSS that is unused in our stylesheets, if we removed that, that’s a …
The post Here’s the thing about “unused CSS” tools appeared first on CSS-Tricks.

Link: https://css-tricks.com/heres-the-thing-about-unused-css-tools/