Select Page

Category: Article


This is just a random idea, but I can’t stop it from swirling around in my head. Whenever I need to style a form on a fresh project where the CSS and style guide stuff is just settling in, the temptation to reach for a mini form framework is strong. Form elements are finicky, have little cross-browser issues, and are sometimes downright hard to wrassle styling control from. This idea, which I’m just now managing to write about, but haven’t actually done any work toward, would be this mini form framework. Maybe something like “Boilerform”, as Dave jokingly suggested on an episode of ShopTalk. I imagine it something like this: It would have basic form styling to organize form elements, not unlike something like Foundation forms. It would account for cross browser issues, not unlike normalize.css. It would include strongarming styling control over form elements, not unlike WTF, forms? It would include native browser form validation stuff, including UX improvements via native JavaScript API’s, not unlike Validate.js. I think there is value in combining those things into one thing, but doing so… With a light touch, being as unopinionated about the final styling as possible With flexibility, perhaps showing off a gallery of different form types with different styling. I probably don’t have time to head up a project like this, but I wouldn’t mind helping connect humans who...

Read More

Turning Text into a Tweetstorm

With tongue firmly in cheek, I created this script to take a chunk of text and break it up into a tweetstorm, for “readability”. Sort of like the opposite of something like Mercury Reader. If the irony is lost on you, it’s a gentle ribbing of people who chose Twitter to publish long-form content, instead of, you know, readable paragraphs. See the Pen Turning Text into a Tweetstorm by Chris Coyier (@chriscoyier) on CodePen. It might be fun to look at how it works. First, we need to bust up the text into an array of sentences. We aren’t...

Read More

How Different CMS’s Handle Content Blocks

Imagine a very simple blog. Blog posts are just a title and a paragraph or three. In that case, having a CMS where you enter the title and those paragraphs and hit publish is perfect. Perhaps some metadata like the date and author come along for the ride. I’m gonna stick my neck out here and say that title-and-content fields only is a CMS anti-pattern. It’s powerful in its flexibility but causes long-term pain in lack of control through abstraction. Let’s not have a conversation about CMS’s as a whole though, let’s scope this down to just that content...

Read More

Lozad.js: Performant Lazy Loading of Images

There are a few different “traditional” ways of lazy loading of images. They all require JavaScript needing to figure out if an image is currently visible within the browser’s viewport or not. Traditional approaches might be: Listening to scroll and resize events on the window Using a timer like setInterval Both of these have performance problems. Why traditional approaches are not performant? Both of those approaches listed above are problematic because they work repeatedly and their function triggers **forced layout while calculating the position of the element with respect to the viewport, to check if the element is inside...

Read More

5 things CSS developers wish they knew before they started

You can learn anything, but you can’t learn everything 🙃 So accept that, and focus on what matters to you — Una Kravets 👩🏻‍💻 (@Una) September 1, 2017 Una Kravets is absolutely right. In modern CSS development, there are so many things to learn. For someone starting out today, it’s hard to know where to start. Here is a list of things I wish I had known if I were to start all over again. 1. Don’t underestimate CSS It looks easy. After all, it’s just a set of rules that selects an element and modifies it based on a set of properties and values. CSS is that, but also so much more! A successful CSS project requires the most impeccable architecture. Poorly written CSS is brittle and quickly becomes difficult to maintain. It’s critical you learn how to organize your code in order to create maintainable structures with a long lifespan. But even an excellent code base has to deal with the insane amount of devices, screen sizes, capabilities, and user preferences. Not to mention accessibility, internationalization, and browser support! CSS is like a bear cub: cute and inoffensive but as he grows, he’ll eat you alive. Learn to read code before writing and delivering code. It’s your responsibility to stay up to date with best practice. MDN, W3C, A List Apart, and CSS-Tricks are your source of...

Read More