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)