The API-Based CMS Approach

The following is a post by Levi Gable. Levi digs into the idea of separating the CMS from the presentation of content within that CMS. As Levi will explain, there is a freedom there that can feel mighty good to a web developer. A website can digest an API and present content in whatever the hot new way to do that is. But even more importantly, an API can serve multiple publishing platforms. Levi demonstrates this as well, by having this one API fuel not just a templated website, but a React Native mobile app, and even an Apple Watch app.

(more…)

Style List Markers in CSS

It's a perfectly reasonable to want to style the marker of list items. You know: blue bullets with black text in an unordered list. Or red counters with knockout white numbers in an ordered list.

There is a working draft spec that defines a ::marker pseudo-element that would give us this control.

/* Not supported anywhere; subject to change */
li::marker {
  color: blue;
}

It's possible to do this styling now, though, thanks to CSS counters. The trick is to remove the list-style, then apply the markers through pseudo-element counters.

ol {
  list-style: none;
  counter-reset: my-awesome-counter;
}
li {
  counter-increment: my-awesome-counter;
}
li::before {
  content: counter(my-awesome-counter);

  /* Style away! */

}

See the Pen Styled List Counters by Chris Coyier (@chriscoyier) on CodePen.

Between the Wires

A new interview series from Preethi Kasireddy and Vivian Cromwell, focusing on "how developer products are made". I was honored to be lucky number three, in which I overshare about CodePen.

Color Fonts

Adobe explaining:

OpenType-SVG is a font format in which an OpenType font has all or just some of its glyphs represented as SVG (scalable vector graphics) artwork. This allows the display of multiple colors and gradients in a single glyph. Because of these features, we also refer to OpenType-SVG fonts as “color fonts”.

Support so far: Firefox 26+, Edge 38+

(more…)

The Different Ways of Getting SVG Out of Adobe Illustrator

Let's say you created a lovely vector illustration in Adobe Illustrator. Or you’ve used Illustrator to finesse some existing graphics. Or for literally any reason at all, you have a file open in Adobe Illustrator that you ultimately want to use on the web as SVG.

There are several different ways of getting SVG out of Illustrator, each one a bit different. Let’s take a look.

TL;DR: Exporting, like File > Export > Export As... SVG then optimizing is your best bet for the web.

(more…)

Native Browser Copy To Clipboard

It wasn't that long ago where you couldn't programmatically copy text to the clipboard from the web without using Flash. But it's getting pretty well supported these days. IE 10+, Chrome 43+, Firefox 41+, and Opera 29+, says Matt Gaunt in writing about it on Google's developer site.

Here's the example from that article:

See the Pen Copy Text with a Button (Google Example) by Chris Coyier (@chriscoyier) on CodePen.

That article says it's not supported in Safari, but it is as of Safari 10, which only dropped in September.

You don't need a library to do this stuff, as evidenced by the above demo. But, there is one: clipboard.js. It's only 3kb gzipped. The purpose is to give you a bit of a cleaner API to work with, like success and error events, and configuration through data-* attributes. Here's a demo of that:

See the Pen Simplest Possible Clipboard.js by Chris Coyier (@chriscoyier) on CodePen.

An Introduction to mo.js

mo.js is a JavaScript library devoted to motion for the web. It offers a declarative syntax motion and the creation of elements for animation. Even though mo.js is still in beta, there is already a host of amazing features to play with. Its author, Oleg Solomoka (otherwise known as @legomushroom) creates incredibly impressive demos and tutorials for the library's offerings that you should check out, but in this article we’ll run through a really quick overview of features and tutorials to get you started.

(more…)

#149: A Quick Intro to Pattern Lab Node with Brian Muenzenmeyer

In this screencast I pair up with Brian Muenzenmeyer who, among other things, works on Pattern Lab. Specifically, the Node version of Pattern Lab, along with Geoff Pursell.

I should point out: this screencast barely scratched the surface of what Pattern Lab offers. It's not a comprehensive overview. Brian said a recent 8 hour workshop couldn't even cover it all. The topics covered in this screencast are:

  1. What is Pattern Lab?
  2. Why would I use it?
  3. Getting it
Watch Video →

We have a pretty good* newsletter.