We’re excited to have you join us! By registering, you’ll gain access to exclusive content, including leaked files and nulled software. Engage with our community, share your insights, and stay updated on the latest releases.

Get ready to explore and enjoy all the benefits of being a member, and feel free to connect with others through discussions and private messages.

Warning: Please do not create multiple accounts. We have a system in place that detects multiple account registrations, and any violations may result in a permanent ban.

Sign Up Now and Start Exploring!
  • License distribution for the
    Ibo 3.9 app+ panel with 17 themes to choose
    is now available for free, we are decrypting it now
    Only for VIP memberships

XenForo Better Checkboxes

El Bana

Active member
Registered
Joined
Jul 25, 2024
Messages
142
Overview

This simple CSS insert adds a nice subtle UI tweak for your checkboxes. First, we'll fade out unchecked boxes and labels to a softer color, helping to give them a "deactivated" appearance. Next, we highlight the checkbox color when hovering over an option.

When a box is checked, we'll change the label color back to normal giving it an "on" appearance. We'll apply fade transitions using the @xf-baseAnimationSpeed value, then optionally set the pointer cursor and checked icon weight (outline vs solid).

CSS snippet

Drop this into your extra.less template:
Code:
Please, Log in or Register to view codes content!
Editing the values

You only need the edit the following lines if needed, but the default values should work great on their own:

CSS:
Please, Log in or Register to view codes content!

The @controlColors set the color of checkbox icons (note that @controlColor--hover is also used for the checked state). The @controlLabelColors affect the label text when a box is checked or unchecked. Finally, you can make checked boxes solid by using 'bold', and change the cursor pointer.

A few notes

While this is somewhat expanded to make beginner-friendly edits, you could optimize this with CSS knowledge. Further, since this is being dropped into extra.less, the @control variables don't override those in core_input.less - so we need to duplicate some code from that template :whistle:. This could be avoided via an addon with Template Modifications. For the Less parent selector, we use the input[type="checkbox] in order to declare easy sibling combinators.
 
Back
Top