All posts in "Code Tricks"
0 Shares

Form Validation Part 2: The Constraint Validation API (JavaScript)

By seorocket / a day ago

In my last article, I showed you how to use native browser form validation through a combination of semantic input types (for example, <input type=”email”>) and validation attributes (such as required and pattern). While incredibly easy and super lightweight, this approach does have a few shortcomings. You can style fields that have errors on them […]

0 Shares

Form Validation Part 1: Constraint Validation in HTML

By seorocket / a couple of days ago

Most JavaScript form validation libraries are large, and often require other libraries like jQuery. For example, MailChimp’s embeddable form includes a 140kb validation file (minified). It includes the entire jQuery library, a third-party form validation plugin, and some custom MailChimp code. In fact, that setup is what inspired this new series about modern form validation. […]

0 Shares

Stickybits: an alternative to `position: sticky` polyfills

By seorocket / a few days ago

Stickybits is a small JavaScript utility plugin. It’s goal is not to get in the way. It does one thing well: help with sticky elements. It is not dependent on other JavaScript Plugins, can be imported via npm, and approaches sticky elements in a very utility-oriented way. Solving the sticky element problem can lead to […]

0 Shares

A Pretty Good SVG Icon System

By seorocket / a few days ago

I’ve long advocated SVG icon systems. Still do. To name a few benefits: vector-based icons look great in a high pixel density world, SVG offers lots of design control, and they are predictable and performant. I’ve also often advocated for a SVG icon system that is based on <symbol>s (an “SVG sprite”) and the <use> […]

1 2 3 198
Page 1 of 198