• Resolved detroitwidget

    (@detroitwidget)


    Hi Folks,

    I noticed the following WS Form CSS applied to labels:

    label.wsf-label {
    display: block;
    font-family: inherit;
    font-size: 18px;
    font-weight: inherit;
    line-height: 1.4;
    margin-bottom: 5px;
    user-select: none;
    }

    What is the logic behind “user-select: none”?

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Mark Westguard

    (@westguard)

    You can learn more about that CSS property here:

    https://developer.mozilla.org/en-US/docs/Web/CSS/user-select

    For elements like checkboxes, when a user clicks the label, it should also check the checkbox. However, sometimes the label itself might accidentally get selected, which is undesirable. The user-select: none prevents this by disabling text selection, while still allowing the label to be clicked for accessibility purposes.

    If you’d prefer the label to be selectable, you can override this with your own custom CSS.

    Thread Starter detroitwidget

    (@detroitwidget)

    Understood. Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Label select’ is closed to new replies.