aboutsummaryrefslogtreecommitdiffstats
path: root/scss/uikit/components/slider.scss
blob: 2799868e28f8744e37b0c5c0cd2cee7d170dbfc4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
// Name:            Slider
// Description:     Component to create horizontal sliders
//
// Component:       `uk-slider`
//
// Sub-objects:     `uk-slider-container`
//                  `uk-slider-items`
//
// States:          `uk-active`
//
// ========================================================================


/* ========================================================================
   Component: Slider
 ========================================================================== */

/*
 * 1. Prevent tab highlighting on iOS.
 */

.uk-slider {
    /* 1 */
    -webkit-tap-highlight-color: transparent;
    @if(mixin-exists(hook-slider)) {@include hook-slider();}
}


/* Container
 ========================================================================== */

/*
 * 1. Clip child elements
 */

.uk-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`.
 */

.uk-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.
 */

.uk-slider-items:not(.uk-grid) {
    display: flex;
    /* 1 */
    margin: 0;
    padding: 0;
    list-style: none;
    /* 2 */
    -webkit-touch-callout: none;
}

.uk-slider-items.uk-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
 */

.uk-slider-items > * {
    /* 1 */
    flex: none;
    /* 2 */
    position: relative;
    /* 3 */
    touch-action: pan-y;
}


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

@if(mixin-exists(hook-slider-misc)) {@include hook-slider-misc();}

// @mixin hook-slider(){}
// @mixin hook-slider-misc(){}