mardi 12 septembre 2017

Is it possible to use HTML5's details tag in lieu of the check box hack?

I love the checkbox hack. This isn't a knock on the checkbox hack at all, but I've run into situations where I simply cannot use the checkbox hack because of limitations put in place by the CMS.

In theory, I would think that the <details> and <summary> tags could be used to somewhat mimic the checkbox hack. Tabbed areas, for example, created with the checkbox hack, I'd think could be recreated using styled details. Likewise burger menus, push toggles, etc.

I've never seen this done anywhere, though, which makes me wonder if trying to do it is an exercise in folly. Or, is it just that the checkbox hack is usually the preferred alternative to jquery in these instances?

So, the question remains the same: is it possible to use the <details> tag to recreate what you can do with the checkbox hack? And if not, why not?




Aucun commentaire:

Enregistrer un commentaire