10 comments

  • Colm TuiteColm Tuite, over 6 years ago

    I've never understood people replacing Javascript by hacking form inputs. This is a pointless hack - this is not what form inputs were designed for. Also, if you add or remove a card, you need to tweak the CSS.

    What's wrong with Javascript anyway? Javascript is a beautiful, performant language. This is just poor engineering.

    9 points
    • , over 6 years ago

      Hello Colm, You're definitely correct. Nothing wrong with Javascript. The thing is there's a lot of people who struggle with JS and are quite comfortable with CSS. This hack is for them. Nonetheless, thanks for your comment.

      3 points
      • chris limbrick, over 6 years ago

        Another point to add, using CSS like this is a great way to add interactivity for sites that have javascript disabled, i.e. .onion sites using the Tor Browser.

        2 points
      • Colm TuiteColm Tuite, over 6 years ago

        Well yeah I get that it's to appease beginners, it's just that your solution is so needlessly complex and as Alex noted - much more complex than the relatively simple few lines of JS required.

        Ultimately, it's just bad code and I don't like encouraging beginners down this path. I think it would be great if the article came with a very basic JS solution at the bottom, which might encourage beginners to give it a try.

        3 points
  • Alex PateAlex Pate, over 6 years ago

    This is cool and all, but it almost seems harder than just doing it in JavaScript.

    2 points
  • Tony Jones, over 6 years ago

    Great tutorial and worth the read! ...but this is a no go for production environments. no touch events or accessibility. :(

    1 point
  • Matthew StrömMatthew Ström, over 6 years ago

    Hey! I think this is excellent. While there are plenty of folks who would choose to implement this in JS, doing it in CSS at least shows a deep understanding of the language.

    And, you're really doing good things by writing up your process. Keep it up.

    1 point
    • Colm TuiteColm Tuite, over 6 years ago

      Someone with a deep understanding of HTML and CSS would never choose to implement this in HTML and CSS.

      3 points
  • Dan DiGangiDan DiGangi, over 6 years ago

    Creative. I'll give you that.

    1 point