View Single Post
Old 06-26-2025, 03:17 PM   #17
Slevin#7
Connoisseur
Slevin#7 began at the beginning.
 
Posts: 69
Karma: 10
Join Date: May 2025
Device: iPad
Quote:
Originally Posted by JSWolf View Post
Code:
.toggle-answer {
  /* prevent accidentally selecting */
  display: none;
}
For the other, to decide what code to use, we'd need to what the class is doing in the HTML.
What do you mean to accomplish by that? With 'display: none;' you are hiding the label which serves two purposes: first it tells the user where to click and second it is REQUIRED to being clicked on to show the answer. If the checkbox would be visible (which is currently hidden), one could click on the checkbox itself, but you have at least to provide a description.

Also, I'm pretty sure 'cursor: pointer;' which you deleted as well is proper CSS.

And since you stripped the code which should prevent selecting text by accident comepletely, the comment is obsolete - however, I would at least keep 'user-select: none;', this is without any vendor prefix proper code, but maybe not sufficient for all kind of render engines.
Slevin#7 is offline   Reply With Quote