> All in One 586

Ads

Tuesday, March 31, 2026

What’s !important #8: Light/Dark Favicons, @mixin, object-view-box, and More

Short n’ sweet but ever so neat, this issue covers light/dark favicons, @mixin, anchor-interpolated morphing, object-view-box, new web features, and more.

SVG favicons that respect the color scheme

I’m a sucker for colorful logos with about 50% lightness that look awesome on light and dark backgrounds, but not all logos can be like that. Paweł Grzybek showed us how to implement SVG favicons that respect the color scheme, enabling us to display favicons conditionally, but the behavior isn’t consistent across web browsers. It’s an interesting read and there appears to be a campaign to get it working correctly.

And once that happens, here’s a skeuomorphic egg-themed CSS toggle that I found last week. Perfect timing, honestly.

Skeuomorphic Egg Toggle Switch [HTML + CSS + JS] Organic mechanics. Complex box-shadow layering and border-radius manipulation. Tactile feedback through depth. Source code: freefrontend.com/code/skeuomo…

[image or embed]

— FreeFrontend (@freefrontend.bsky.social) Mar 26, 2026 at 11:42

Help the CSS WG shape @mixin

It seems that @mixin is taking a step forward. Lea Verou showed us a code snippet and asked what we think of it.

🚨 Want mixins in CSS? Help the CSS WG by telling us what feels natural to you! Look at the code in the screenshot. What resulting widths would *you* find least surprising for each of div, div > h2, div + p? Polls: ┣ Github: github.com/LeaVerou/blo… ┗ Mastodon: front-end.social/@leaverou/11…

[image or embed]

— Lea Verou, PhD (@lea.verou.me) Mar 26, 2026 at 23:29

Anchor-interpolated morphing tutorial

Chris Coyier showed us how to build an image gallery using popovers and something called AIM (Anchor-Interpolated Morphing). I’m only hearing about this now but Adam Argyle talked about AIM back in January. It’s not a new CSS feature but rather the idea of animating something from its starting position to an anchored position. Don’t miss this one.

Also, do you happen to remember Temani’s demo that I shared a few weeks ago? Well, Frontend Masters have published the tutorial for that too!

Remember object-view-box? Me neither

CSS object-view-box allows an element to be zoomed, cropped, or framed in a way that resembles how SVG’s viewBox works, but since Chrome implemented it back in August 2022, there’s been no mention of it. To be honest, I don’t remember it at all, which is a shame because it sounds useful. In a Bluesky thread, Victor Ponamariov explains how object-view-box works. Hopefully, Safari and Firefox implement it soon.

Wouldn't it be great to have native image cropping in CSS? It actually exists: object-view-box.

[image or embed]

— Victor (@vpon.me) Mar 24, 2026 at 16:15

corner-shape for everyday UI elements

Much has been said about CSS corner-shape, by us and the wider web dev community, despite only being supported by Chrome for now. It’s such a fun feature, offering so many ways to turn boxes into interesting shapes, but Brecht De Ruyte’s corner-shape article focuses more on how we might use corner-shape for everyday UI elements/components.

An interface design titled Buttons and Tags showcasing various UI component shapes using the corner-shape property. The display includes a row of solid buttons in different colors labeled Bevel, Superellipse, Squircle, Notch, and Scoop, followed by a set of outlined buttons and a series of decorative status tags like Shipped and Pending. Below these are directional tags with arrow shapes and a row of notification badges featuring icons for a bell, message, and alert with numerical counters.
Source: Smashing Magazine.

The Layout Maestro

Ahmad Shadeed’s course — The Layout Maestro — teaches you how to plan and build CSS layouts using modern techniques. Plus, you can learn how to master building the bones of websites using an extended trial of the web development browser, Polypane, which comes free with the course.

A bento grid layout featuring multiple rounded rectangular panels in a very light lavender hue. The central panel displays a logo consisting of a purple stylized window icon and the text The Layout Maestro in black and purple sans-serif font, accented by small purple sparkles. The surrounding empty panels vary in size and aspect ratio, creating a clean and modern asymmetrical composition against a white background.
Source: The Layout Maestro.

New web platform features

Firefox and Safari shipped new features (none baseline, sadly):

Also, Bramus said that Chrome 148 will have at-rule feature queries, while Chrome 148 and Firefox 150 will allow background-image to support light-dark(). In any case, there’s a new website called BaseWatch that tracks baseline status for all of these CSS features.

Ciao!


What’s !important #8: Light/Dark Favicons, @mixin, object-view-box, and More originally published on CSS-Tricks, which is part of the DigitalOcean family. You should get the newsletter.



from CSS-Tricks https://ift.tt/Fb3Z8EW
via IFTTT

Monday, March 30, 2026

Partly Cloudy today!



With a high of F and a low of 41F. Currently, it's 57F and Clear outside.

Current wind speeds: 6 from the South

Pollen: 0

Sunrise: March 30, 2026 at 06:38PM

Sunset: March 31, 2026 at 07:13AM

UV index: 0

Humidity: 26%

via https://ift.tt/M6NU5Iv

March 31, 2026 at 10:02AM

Form Automation Tips for Happier User and Clients

I deployed a contact form that last month that, in my opinion, was well executed. It had all the right semantics, seamless validation, and great keyboard support. You know, all of the features you’d want in your portfolio.

But… a mere two weeks after deployment, my client called. We lost a referral because it was sitting in your inbox over the weekend.

The form worked perfectly. The workflow didn’t.

The Problem Nobody Talks About

That gap between “the form works” and “the business works” is something we don’t really tend to discuss much as front-enders. We focus a great deal on user experience, validation methods, and accessibility, yet we overlook what the data does once it leaves our control. That is exactly where things start to fall apart in the real world.

Here’s what I learned from that experience that would have made for a much better form component.

Why “Send Email on Submit” Fails

The pattern we all use looks something like this:

fetch('/api/contact', {
  method: 'POST',
  body: JSON.stringify(formData)
})

// Email gets sent and we call it done

I have seen duplicate submissions cause confusion, specifically when working with CRM systems, like Salesforce. For example, I have encountered inconsistent formatting that hinders automated imports. I have also experienced weekend queries that were overlooked until Monday morning. I have debugged queries where copying and pasting lost decimal places for quotes. There have also been “required” fields for which “required” was simply a misleading label.

I had an epiphany: the reality was that having a working form was just the starting line, not the end. The fact is that the email is not a notification; rather, it’s a handoff. If it’s treated merely as a notification, it puts us into a bottleneck with our own code. In fact, Litmus, as shown in their 2025 State of Email Marketing Report (sign-up required), found inbox-based workflows result in lagging follow-ups, particularly with sales teams that rely on lead generation.

Detailing a broken workflow for a submitted form. User submits form, email reaches inbox, manual spreadsheet entries, formatting errors, and delays.

Designing Forms for Automation

The bottom line is that front-end decisions directly influence back-end automation. In recent research from HubSpot, data at the front-end stage (i.e., the user interaction) makes or breaks what is coming next.

These are the practical design decisions that changed how I build forms:

Required vs. Optional Fields

Ask yourself: What does the business rely on the data for? Are phone calls the primary method for following up with a new lead? Then let’s make that field required. Is the lead’s professional title a crucial context for following up? If not, make it optional. This takes some interpersonal collaboration before we even begin marking up code.

For example, I made an incorrect assumption that a phone number field was an optional piece of information, but the CRM required it. The result? My submissions were invalidated and the CRM flat-out rejected them.

Now I know to drive my coding decisions from a business process perspective, not just my assumptions about what the user experience ought to be.

Normalize Data Early

Does the data need to be formatted in a specific way once it’s submitted? It’s a good idea to ensure that some data, like phone numbers, are formatted consistently so that the person on the receiving has an easier time scanning the information. Same goes when it comes to trimming whitespace and title casing.

Why? Downstream tools are dumb. They are utterly unable to make the correlation that “John Wick” and “john wick” are related submissions. I once watched a client manually clean up 200 CRM entries because inconsistent casing had created duplicate records. That’s the kind of pain that five minutes of front-end code prevents.

Prevent Duplicate Entries From the Front End

Something as simple as disabling the Submit button on click can save the headache of sifting through duplicative submissions. Show clear “submission states” like a loading indicator that an action is being processed. Store a flag that a submission is in progress.

Why? Duplicate CRM entries cost real money to clean up. Impatient users on slow networks will absolutely click that button multiple times if you let them.

Success and Error States That Matter

What should the user know once the form is submitted? I think it’s super common to do some sort of default “Thanks!” on a successful submission, but how much context does that really provide? Where did the submission go? When will the team follow up? Are there resources to check out in the meantime? That’s all valuable context that not only sets expectations for the lead, but gives the team a leg up when following up.

Error messages should help the business, too. Like, if we’re dealing with a duplicate submission, it’s way more helpful to say something like, “This email is already in our system” than some generic “Something went wrong” message.

Comparing two types of submitted raw data. Formatting problems displayed on the left and properly formatted data on the right.

A Better Workflow

So, how exactly would I approach form automation next time? Here are the crucial things I missed last time that I’ll be sure to hit in the future.

Better Validation Before Submission

Instead of simply checking if fields exist:

const isValid = email && name && message;

Check if they’re actually usable:

function validateForAutomation(data) {
  return {
    email: /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(data.email),
    name: data.name.trim().length >= 2,
    phone: !data.phone || /^\d{10,}$/.test(data.phone.replace(/\D/g, ''))
  };
}

Why this matters: CRMs will reject malformed emails. Your error handling should catch this before the user clicks submit, not after they’ve waited two seconds for a server response.

At the same time, it’s worth noting that the phone validation here covers common cases, but is not bulletproof for things like international formats. For production use, consider a library like libphonenumber for comprehensive validation.

Consistent Formatting

Format things before it sends rather than assuming it will be handled on the back end:

function normalizeFormData(data) {
  return {
    name: data.name.trim()
      .split(' ')
      .map(word => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())
      .join(' '),
    email: data.email.trim().toLowerCase(),
    phone: data.phone.replace(/\D/g, ''), // Strip to digits
    message: data.message.trim()
  };
}

Why I do this: Again, I’ve seen a client manually fix over 200 CRM entries because “JOHN SMITH” and “john smith” created duplicate records. Fixing this takes five minutes to write and saves hours downstream.

There’s a caveat to this specific approach. This name-splitting logic will trip up on single names, hyphenated surnames, and edge cases like “McDonald” or names with multiple spaces. If you need rock-solid name handling, consider asking for separate first name and last name fields instead.

Prevent Double Submissions

We can do that by disabling the Submit button on click:

let submitting = false;
  async function handleSubmit(e) {
    e.preventDefault();
    if (submitting) return;
    submitting = true;

const button = e.target.querySelector('button[type="submit"]');
button.disabled = true;
button.textContent = 'Sending...';

try {
  await sendFormData();
    // Success handling
  } catch (error) {
    submitting = false; // Allow retry on error
    button.disabled = false;
    button.textContent = 'Send Message';
  }
}

Why this pattern works: Impatient users double-click. Slow networks make them click again. Without this guard, you’re creating duplicate leads that cost real money to clean up.

Structuring Data for Automation

Instead of this:

const formData = new FormData(form);

Be sure to structure the data:

const structuredData = {
  contact: {
    firstName: formData.get('name').split(' ')[0],
    lastName: formData.get('name').split(' ').slice(1).join(' '),
    email: formData.get('email'),
    phone: formData.get('phone')
  },
  inquiry: {
    message: formData.get('message'),
    source: 'website_contact_form',
    timestamp: new Date().toISOString(),
    urgency: formData.get('urgent') ? 'high' : 'normal'
  }
};

Why structured data matters: Tools like Zapier, Make, and even custom webhooks expect it. When you send a flat object, someone has to write logic to parse it. When you send it pre-structured, automation “just works.” This mirrors Zapier’s own recommendations for building more reliable, maintainable workflows rather than fragile single-step “simple zaps.”

Watch How Zapier Works (YouTube) to see what happens after your form submits.

Comparing flat JSON data on the left with properly structured JSON data.

Care About What Happens After Submit

An ideal flow would be:

  1. User submits form 
  2. Data arrives at your endpoint (or form service) 
  3. Automatically creates CRM contact 
  4. A Slack/Discord notification is sent to the sales team 
  5. A follow-up sequence is triggered 
  6. Data is logged in a spreadsheet for reporting

Your choices for the front end make this possible:

  • Consistency in formatting = Successful imports in CRM 
  • Structured data = Can be automatically populated using automation tools 
  • De-duplication = No messy cleanup tasks required 
  • Validation = Less “invalid entry” errors

Actual experience from my own work: After re-structuring a lead quote form, my client’s automated quote success rate increased from 60% to 98%. The change? Instead of sending { "amount": "$1,500.00"}, I now send { "amount": 1500}. Their Zapier integration couldn’t parse the currency symbol.

Showing the change in rate of success after implementation automation, from 60% to 98% with an example of a parsed error and an accepted value below based on formatting money in dollars versus a raw number.

My Set of Best Practices for Form Submissions

These lessons have taught me the following about form design:

  1. Ask about the workflow early. “What happens after someone fills this out?” needs to be the very first question to ask. This surfaces exactly what really needs to go where, what data needs to come in with a specific format, and integrations to use. 
  2. Test with Real Data. I am also using my own input to fill out forms with extraneous spaces and strange character strings, such as mobile phone numbers and bad uppercase and lowercase letter strings. You might be surprised by the number of edge cases that can come about if you try inputting “JOHN SMITH ” instead of “John Smith.” 
  3. Add timestamp and source. It makes sense to design it into the system, even though it doesn’t necessarily seem to be necessary. Six months into the future, it’s going to be helpful to know when it was received. 
  4. Make it redundant. Trigger an email and a webhook. When sending via email, it often goes silent, and you won’t realize it until someone asks, “Did you get that message we sent you?”
  5. Over-communicate success. Setting the lead’s expectations is crucial to a more delightful experience. “Your message has been sent. Sarah from sales will answer within 24 hours.” is much better than a plain old “Success!”

The Real Finish Line

This is what I now advise other developers: “Your job doesn’t stop when a form posts without errors. Your job doesn’t stop until you have confidence that your business can act upon this form submission.”

That means:

  • No “copy paste” allowed 
  • No “I’ll check my email later” 
  • No duplicate entries to clean up 
  • No formatting fixes needed

The code itself is not all that difficult. The switch in attitude comes from understanding that a form is actually part of a larger system and not a standalone object. Once you think about forms this way, you think differently about them in terms of planning, validation, and data.

The next time you’re putting together a form, ask yourself: What happens when this data goes out of my hands? Answering that question makes you a better front-end developer.

The following CodePen demo is a side-by-side comparison of a standard form versus an automation-ready form. Both look identical to users, but the console output shows the dramatic difference in data quality.

References & Further Reading


Form Automation Tips for Happier User and Clients originally published on CSS-Tricks, which is part of the DigitalOcean family. You should get the newsletter.



from CSS-Tricks https://ift.tt/4xj0K8u
via IFTTT

Sunday, March 29, 2026

Partly Cloudy today!



With a high of F and a low of 45F. Currently, it's 57F and Clear outside.

Current wind speeds: 6 from the Southeast

Pollen: 0

Sunrise: March 29, 2026 at 06:40PM

Sunset: March 30, 2026 at 07:12AM

UV index: 0

Humidity: 23%

via https://ift.tt/KFvMPRk

March 30, 2026 at 10:02AM

Saturday, March 28, 2026

Mostly Clear today!



With a high of F and a low of 48F. Currently, it's 61F and Clear outside.

Current wind speeds: 11 from the Southeast

Pollen: 0

Sunrise: March 28, 2026 at 06:41PM

Sunset: March 29, 2026 at 07:11AM

UV index: 0

Humidity: 27%

via https://ift.tt/X536AnC

March 29, 2026 at 10:02AM

Friday, March 27, 2026

Partly Cloudy/Wind today!



With a high of F and a low of 31F. Currently, it's 42F and Partly Cloudy outside.

Current wind speeds: 15 from the Southeast

Pollen: 0

Sunrise: March 27, 2026 at 06:43PM

Sunset: March 28, 2026 at 07:10AM

UV index: 0

Humidity: 40%

via https://ift.tt/1SfyTX0

March 28, 2026 at 10:02AM

Thursday, March 26, 2026

Mostly Cloudy/Wind today!



With a high of F and a low of 29F. Currently, it's 43F and Clear/Wind outside.

Current wind speeds: 22 from the Northeast

Pollen: 0

Sunrise: March 26, 2026 at 06:45PM

Sunset: March 27, 2026 at 07:09AM

UV index: 0

Humidity: 50%

via https://ift.tt/9e5VUbd

March 27, 2026 at 10:02AM

What’s !important #8: Light/Dark Favicons, @mixin, object-view-box, and More

Short n’ sweet but ever so neat, this issue covers light/dark favicons, @mixin , anchor-interpolated morphing, object-view-box , new web fea...