...

/

Problem: Three-State Checkbox with Indeterminate Animation

Problem: Three-State Checkbox with Indeterminate Animation

Try to create a three-state checkbox that visually handles unchecked, checked, and indeterminate states with tick and dash animations using only CSS.

Problem description

Given an HTML page containing the following:

  • A <label> with class tri-checkbox that wraps:

    • A native <input type="checkbox" class="tri-state">

    • A <span class="checkmark"></span>

    • The text “Agree to terms”

Write CSS to:

  • Hide the native checkbox input.

  • Style ...