//
// Reset
// -----------------------------------------------------------------------------
// 
// ### Usage:
// 在整站中推荐使用`normalize`来初始化样式，`reset`仅建议在第三方页面局部使用。
// 
// ### Example:
// .ec-zx-edu {
//     .reset-box-model;
//     ol, ul {
//         .reset-list-style;
//     }
// }
// 
// ### Reference:
//  * http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/
//  * http://compass-style.org/reference/compass/reset/utilities/

@import "variables.less";
@import "compatibility.less";

.global-reset() {
    html, body, div, span, applet, object, iframe,
    h1, h2, h3, h4, h5, h6, p, blockquote, pre,
    a, abbr, acronym, address, big, cite, code,
    del, dfn, em, img, ins, kbd, q, s, samp,
    small, strike, strong, sub, sup, tt, var,
    dl, dt, dd, ol, ul, li,
    fieldset, form, label, legend,
    table, caption, tbody, tfoot, thead, tr, th, td {
        .reset-box-model();
        .reset-focus();
        .reset-font();
    }
    body {
        .reset-body();
    }
    ol, ul {
        .reset-list-style();
    }
    table {
        .reset-table();
    }
    caption, th, td {
        .reset-table-cell();
    }
    a img {
        border: none;
    }
}
.global-reset() when (@support-html5) {
    .reset-html5();
}

.nested-reset() {
    div, span, object, iframe, h1, h2, h3, h4, h5, h6, p,
    pre, a, abbr, acronym, address, code, del, dfn, em, img,
    dl, dt, dd, ol, ul, li, fieldset, form, label,
    legend, caption, tbody, tfoot, thead, tr {
        .reset-box-model();
        .reset-focus();
        .reset-font();
    }
    table {
        .reset-table();
    }
    caption, th, td {
        .reset-table-cell();
    }
    a img {
        border: none;
    }
}

.reset-box-model() {
    padding: 0;
    margin: 0;
    border: 0;
}

.reset-focus() {
    outline: 0;
}

.reset-font() {
    font-weight: inherit;
    font-style: inherit;
    font-family: inherit;
    font-size: 100%;
    vertical-align: baseline;
}

.reset-body() {
    line-height: 1;
}

.reset-table() {
    border-collapse: separate;
    border-spacing: 0;
    vertical-align: middle;
}

.reset-table-cell() {
    text-align: left;
    font-weight: normal;
    vertical-align: middle;
}

.reset-list-style() {
    list-style: none;
}

.reset-html5() {
    article, aside, details, figcaption,
    figure, footer, header, hgroup, menu, nav,
    section, summary, main {
        display: block;
        .reset-box-model();
        .reset-focus();
        .reset-font();
    }
    audio, canvas, video {
        .inline-block();
    }
    audio:not([controls]),[hidden] {
        display: none;
    }
}
