Tab Completion

I'm Tab Atkins Jr, and I wear many hats. I work for Google on the Chrome browser as a Web Standards Hacker. I'm also a member of the CSS Working Group, and am either a member or contributor to several other working groups in the W3C. You can contact me here.
Listing of All Posts

Open Web Brainstorming

Last updated:

Listen for selectors

It would be useful to be able to register a listener on a document or element and have it fire when children match some specified selector, and when they stop matching. This is basically mutation events done right.

Dragging via CSS

I had a thought this morning that Positioned Layout could help solve the problem of dragging, by just adding 'pointer' as a root value, which could then be used like:

elem:active {
  position: relative;
  position-root: pointer;
  top: 0;
  left: 0;

While you are holding down the mouse button, the element positions itself relative to the mouse, thus dragging itself around.

However, this doesn't work properly, as the moment you release the mouse and :active stops matching, the element will stop positioning itself relative to the mouse and will snap back to its original position.

So, um, never mind...?

(a limited set of Markdown is supported)