Unobtrusive feedback

  1. The JavaScript generates a span element and puts the feedback contents inside it.
  2. Then it positions that element right over the element that the feedback originates from.
  3. Then there’s a CSS transform. The feedback gets a translateY applied so it drifts upward. At the same time it gets its opacity reduced from 1 to 0 so it’s fading away.
  4. Finally there’s a transitionend event that fires when the animation is over. Once that event fires, the generated span is destroyed.

--

--

--

A web developer and author living and working in Brighton, England. Everything I post on Medium is a copy — the originals are on my own website, adactio.com

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

The State of Firebase (mid 2019)

Python: Graph Search Algorithms

Tail2Syslog Solaris Configuration

Making the move to cloud: migrating analytics

Salesforce bizarre practices: SOQL Query Builder

Figma + Flutter Complex Fills, Drop Shadows, SVGs and Borders — parabeac_core v2.5

Angular Router Series: Secondary Outlets Primer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Jeremy Keith

Jeremy Keith

A web developer and author living and working in Brighton, England. Everything I post on Medium is a copy — the originals are on my own website, adactio.com

More from Medium

Systemising SEEK’s Brand Palette

Two colour wheel spectrums on a white and dark background.

Why does Apple take bad design decisions?

Redundancy is your friend

Rethinking Component Libraries