Any experienced frontend developer should be familiar with the number one complaint about frontend development in recent years: it’s too difficult to get started. You’ve heard of this thing called React and so you install it and give it a try; only to find that it doesn’t “just work” and requires Babel, Webpack, npm and Node just to get started.
To help people conquer that cliff, Facebook developer and Redux author Dan Abramov created Create React App, which handles most of the difficult configuration work without you ever having to even see it and lets you get right down to…
Here’s a quick command line script I made for converting images to CSS
data-uri strings. You can use this to embed images directly in CSS so they don't have to be separately downloaded, saving the browser from having to spend time making requests for them. It's especially useful for small layout images.
Note that you need to change
base64 -b0 to
base64 -w0 if you are on Linux.
You can use it like this:
$ cssb64.bash dotted.png
You can then put this in a
background CSS value:
background: url("data:image/gif;base64,...") scroll repeat gray;
Originally published on my blog on April 13, 2019.
Programmer and graphic designer based in the Netherlands. 日本語もちょっと話せます。以前1年ほど東京に住んでいました。