4 ms·
Could you do something like "<form action="#sent">" and use the ":target" CSS pseudo-class on an element with a message?
by fathyb 5y ago
Could you do something like "<form action="#sent">" and use the ":target" CSS pseudo-class on an element with a message?
- yakshaving_jgt 5y agoI don't think so. I think the form needs to still point to the URI which is expecting the POST request. Maybe I'm not imagining hard enough, but I don't think this approach will work. Furthermore, according to this article[0], the `:target` approach is viable when it's acceptable to change the browser history, whereas in my case that is exactly what I'm trying to avoid. [0]: https://css-tricks.com/css-target/ https://css-tricks.com/css-target/
- SketchySeaBeast 5y ago> Maybe I'm not imagining hard enough, but I don't think this approach will work. I've never heard this turn of phrase before, but I really like it.