blob: e8e54f92013f890d134994fc895362185e6404bd (
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
|
// Name: Sticky
// Description: Component to make elements sticky in the viewport
//
// Component: `uk-sticky`
//
// Modifier: `uk-sticky-fixed`
//
// States: `uk-active`
//
// ========================================================================
// Variables
// ========================================================================
$sticky-z-index: $global-z-index - 20 !default;
$sticky-animation-duration: 0.2s !default;
$sticky-reverse-animation-duration: 0.2s !default;
/* ========================================================================
Component: Sticky
========================================================================== */
/*
* 1. Resolve frame rate issues on devices with lower frame rates by forcing hardware acceleration
*/
.uk-sticky-fixed {
z-index: $sticky-z-index;
box-sizing: border-box;
margin: 0 !important;
/* 1 */
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
}
/*
* Faster animations
*/
.uk-sticky[class*='uk-animation-'] { animation-duration: $sticky-animation-duration; }
.uk-sticky.uk-animation-reverse { animation-duration: $sticky-reverse-animation-duration; }
// Hooks
// ========================================================================
@if(mixin-exists(hook-sticky-misc)) {@include hook-sticky-misc();}
// @mixin hook-sticky-misc(){}
|