4 ms·
"The reply button, for example, focuses and expands the textbox below. You can’t do that without some scripting" -- Can be done with just CSS :target "Similarl
by phillipseamore 8y ago
"The reply button, for example, focuses and expands the textbox below. You can’t do that without some scripting"
-- Can be done with just CSS :target
"Similarly, the button does an action behind the scenes, which is iffy since you could replicate it with a full page load"
-- Should just be a normal link with a full page reload if JS disabled. Perhaps this could also be a new use of the <a ping> attribute (without a href).
- tazard 8y agoExpanding the textbox can, but how would you set focus to another element with css? Genuinely curious, I have just learned about :target and am having this exact scenario in a project of mine.
- eithed 8y agoCan't test as I'm phone posting, but I think you can do that with anchors.
- phillipseamore 8y agohttps://codepen.io/anon/pen/MRqeaQ https://codepen.io/anon/pen/MRqeaQ The <label> was a workaround for some browser but is not needed (atleast in Chrome).
- tazard 8y agoOh easy! Awesome!