codepen.io
Pure CSS tabs with Flexbox
4
Pure CSS tabs, with selected state and no position absolute hack.... Read full article
Pure CSS tabs, with selected state and no position absolute hack.... Read full article
Rogin Farrer
9y agoWhile I think some of these “checkbox hacks” can be really cool, does anyone actually use them? I feel like they’re bad semantics, since in this use they aren’t in a form.
amdgls
9y agoUse of the :target selector would be a preferable CSS-only approach, but these things are so simple to do with JavaScript that it simply cannot be recommended as anything more than a fallback for people with JavaScript disabled.
mike
9y agoI often use them for internal tools and web pages where I don’t use any JS for anything else :)
amdgls
9y agoSee, I like vanilla JavaScript, so despite having a very intimate knowledge of CSS, I’ll still use JavaScript for internal things.
mike
9y agoFair play – each to their own! 😀 I take it as an opportunity to try things I wouldn’t use in production. Agreed target selector would be better, might look at improving it.