Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-11124

Flamingo badly extending .checkbox class for input[type='checkbox'] elements

    Details

    • Difficulty:
      Unknown
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      Description

      In flamingo/less/forms.less file we are doing

      input[type="radio"]:extend(.radio all), 
      input[type="checkbox"]:extend(.checkbox all)
      

      Although this seemed to be right the first time we used it, if you consult Bootstrap's documentation http://getbootstrap.com/css/#forms-controls you'll see that .checkbox class is supposed to be the parent of input [ type='checkbox'] and not just an additional class.

      <div class="checkbox">
        <label>
          <input type="checkbox" value="">
          Option
        </label>
      </div>
      

      This extend is affecting lots of issues created related to checkboxes and radios, see Related issues.

      Solution:

      • Remove the extend and start using the .checkbox class accordingly
      • Since we are following .xform standard for most of our forms http://platform.xwiki.org/xwiki/bin/view/DevGuide/VerticalForms I propose we add the .checkbox class to the parent dd element
        <dl>
        <dt>...</dt>
        <dd class="checkbox">
          <label>
            <input type="checkbox" value="">
            Option
          </label>
        </dd>
        <dl>
        

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                evalica Ecaterina Moraru (Valica)
                Reporter:
                evalica Ecaterina Moraru (Valica)
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: