// Name:            Slider
// Description:     Component to create horizontal sliders
//
// Component:       `ui-slider`
//
// Sub-objects:     `ui-slider-container`
//                  `ui-slider-items`
//
// States:          `ui-active`
//
// ========================================================================


/* ========================================================================
   Component: Slider
 ========================================================================== */

/*
 * 1. Prevent tab highlighting on iOS.
 */

.ui-slider {
    /* 1 */
    -webkit-tap-highlight-color: transparent;
    .hook-slider;
}


/* Container
 ========================================================================== */

/*
 * 1. Clip child elements
 */

.ui-slider-container {
    /* 1 */
    overflow: hidden;
}

/* Items
 ========================================================================== */

/*
 * 1. Optimize animation
 * 2. Create a containing block. In Safari it's neither created by `transform` nor `will-change`.
 */

.ui-slider-items {
    /* 1 */
    will-change: transform;
    /* 2 */
    position: relative;
}

/*
 * 1. Reset list style without interfering with grid
 * 2. Prevent displaying the callout information on iOS.
 */

.ui-slider-items:not(.ui-grid) {
    display: flex;
    /* 1 */
    margin: 0;
    padding: 0;
    list-style: none;
    /* 2 */
    -webkit-touch-callout: none;
}

.ui-slider-items.ui-grid { flex-wrap: nowrap; }


/* Item
 ========================================================================== */

/*
 * 1. Let items take content dimensions (0 0 auto)
 * 2. Create position context
 * 3. Disable horizontal panning gestures in IE11 and Edge
 */

.ui-slider-items > * {
    /* 1 */
    flex: none;
    /* 2 */
    position: relative;
    /* 3 */
    touch-action: pan-y;
}


// Hooks
// ========================================================================

.hook-slider-misc;

.hook-slider() {}
.hook-slider-misc() {}
