3 ms·
I love the hacker thought process of "Is there an HTML element that can hide and show content right out of the box (without js), and now can we borrow it to imp
by decasia 4y ago
I love the hacker thought process of "Is there an HTML element that can hide and show content right out of the box (without js), and now can we borrow it to implement a completely different data structure that wasn't obviously part of its design?"
- timeon 4y agoIn old days (around the time when Yahoo switched from table design to css layout) people were hacking this with :hover. But mouse had to stay in the 'opened' content.
- hakre 4y agoI love that :hover trick, a well placed tag in back and the mouse does not leave the "opened" (active) content that easily. There is also :focus.
- layer8 4y agoExcept that native menus don’t really work like that. They have a nontrivial interplay between hovering and mousedown/mouseup that you can’t replicate with just CSS. Not to speak of the missing keyboard functionality.
- hakre 4y agoNative menus? When I need native menus, I use a GUI toolkit, you might have put too much of your concerns into my words. When I do "native" Menus in HTML I use lists und you can skip to navigation on top if you like but content comes first. And yes, the site works natively in a textmode browser.
- pjmlp 4y agoVersus the native GUIs approach of here is a control for doing what you want, and here is a clean architecture to design you own controls.
- mananaysiempre 4y agoThe native GUI approach seems to struggle with extending the behaviour of stock controls, Win32 most of all. Granted, this is a very fuzzy problem that’s much more difficult than it seems (how do you shouls a CJK-style IME interact with a formatted-alphanumerics input?), and HTML+CSS doesn’t really do better, but it’s also a problem people have, and I don’t think native toolkits have a convincing approach. So I’m not ready to declare UI toolkits solved.