-
Notifications
You must be signed in to change notification settings - Fork 0
/
style.css
55 lines (48 loc) · 1.23 KB
/
style.css
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
@import "compass/css3";
@import "compass/css3/flexbox";
@import "compass/layout/stretching";
@import "compass/utilities";
@import "compass/css3/background-size"
// Magic parallax mixins
$parallax-perspective : 1 !default;
$parallax-element : "body" !default;
$parallax-ios : true !default;
@mixin parallax-init(
$perspective : $parallax-perspective,
$element : $parallax-element,
$parallax-ios : $parallax-ios
) {
@if $element == "body" {
html, body {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
overflow: hidden;
}
}
#{$element} {
overflow: auto;
@include perspective($perspective * 1px);
@include transform-style(preserve-3d);
// Allows for smooth scrolling but disables parallax effects.
@if $parallax-ios == false {
-webkit-overflow-scrolling: touch;
}
// Preserve 3D
&, * {
@include transform-style(preserve-3d);
}
}
}
@mixin parallax(
$distance : 0,
$perspective : $parallax-perspective
) {
@include transform(
translateZ($distance * $perspective * 1px)
scale(abs($distance - 1))
);
z-index: $distance * 1000;
}
// End of magic parallax mixins