This topic contains 1 reply, has 2 voices, and was last updated by Sean Sean 2 years, 2 months ago.

margin-bottom problem about mt-radio and mt-checkbox in both inline and list


  • Steve Yin
    Participant

    Posts: 24
    Member Reply #7028

    finally in metroic 4.6 template, the mt-radio/mt-checkbox’s margin and mt-radio/checkbox-list problem has been fixed.

    But there is still little problem:

    when use mt-radio-inline and mt-radio(also applies to checkbox) there is a extra margin-bottom, make that row obviously higher than other form-group, and same problem exists with mt-radio-list and mt-radio(also applies to checkbox), there is a extra margin-bottom with last child.

    and the fix is also simple, just change last portion of _input.scss to these:

    .mt-checkbox-list,
    .mt-radio-list {
        padding: 10px 0;
    
        .form-horizontal .form-group & {
            padding-top: 0;
        }
    
        .mt-checkbox,
        .mt-radio {
            display: block;
    
    	    &:last-child {
    		    margin-bottom: 0;
    	    }
        }   
    }
    
    .mt-checkbox-inline,
    .mt-radio-inline {
        padding: 10px 0;
    
        .form-horizontal .form-group & {
            padding-top: 8px;
        }
    
        .mt-checkbox,
        .mt-radio {
            display: inline-block;
            margin-right: 15px;
    	margin-bottom: 0;
        }
    }
    

    that would fix the extra margin-bottom problem.

    • This topic was modified 2 years, 2 months ago by  Steve Yin.
    Sean
    Sean
    Keymaster

    Posts: 4527
    Support Staff Reply #7054

    Hi :),

    Thanks for sharing this. We will check it further and consider using this fix in the next update. Appreciate your input on this.

    Thanks.

You must be logged in to reply to this topic.