// Name:            List
// Description:     Defines styles for ordered and unordered lists
//
// Component:       `wk-list`
//
// Modifiers:       `wk-list-line`
//                  `wk-list-striped`
//                  `wk-list-space`
//
// ========================================================================


// Variables
// ========================================================================

@list-nested-padding-left:                      20px;

@list-line-margin-top:                          5px;
@list-line-border:                              #ddd;
@list-line-border-width:                        1px;

@list-striped-padding-vertical:                 5px;
@list-striped-padding-horizontal:               5px;
@list-striped-background:                       #f5f5f5;

@list-space-margin-top:                         10px;


/* ========================================================================
   Component: List
 ========================================================================== */

.wk-list {
    padding: 0;
    list-style: none;
}

/*
 * Micro clearfix to make list more robust
 */

.wk-list > li:before,
.wk-list > li:after {
    content: "";
    display: table;
}

.wk-list > li:after { clear: both; }

/*
 * Remove margin from the last-child
 */

.wk-list > li > :last-child { margin-bottom: 0; }

/*
 * Nested lists
 */

.wk-list ul {
    margin: 0;
    padding-left: @list-nested-padding-left;
    list-style: none;
}


/* Modifier: `wk-list-line`
 ========================================================================== */

.wk-list-line > li:nth-child(n+2) {
    margin-top: @list-line-margin-top;
    padding-top: @list-line-margin-top;
    border-top: @list-line-border-width solid @list-line-border;
    .hook-list-line;
}


/* Modifier: `wk-list-striped`
 ========================================================================== */

.wk-list-striped > li {
    padding: @list-striped-padding-vertical @list-striped-padding-horizontal;
    .hook-list-striped;
}

.wk-list-striped > li:nth-of-type(odd) { background: @list-striped-background; }


/* Modifier: `wk-list-space`
 ========================================================================== */

.wk-list-space > li:nth-child(n+2) { margin-top: @list-space-margin-top; }


// Hooks
// ========================================================================

.hook-list-misc;

.hook-list-line() {}
.hook-list-striped() {}
.hook-list-misc() {}