offline-theme-dark.sass
2.24 KB
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
100
@import compass/css3
@import mixins
@import keyframes
@import offline-theme-base
$green: #80d580
$red: #e24949
+keyframes-offline-dropin
+keyframes-offline-dropout
+keyframes-offline-rotation
.offline-ui
+border-radius(0 0 4px 4px)
font-family: "Helvetica Neue", sans-serif
font-weight: 300
padding: 1em
width: 38em
max-width: 100%
background: #000
color: #ccc
overflow: hidden
@media (max-width: 38em)
+border-radius(0)
.offline-ui-content
padding-left: 2em
&:before
line-height: 1.25em
&:after
+border-radius(50%)
content: " "
display: block
position: absolute
top: 0
bottom: 0
left: 1em
margin: auto
height: 1em
width: 1em
.offline-ui-retry
position: absolute
right: 3em
top: 0
bottom: 0
background: rgba(255, 255, 255, .2)
text-decoration: none
color: inherit
line-height: 3.5em
height: 3.5em
margin: auto
padding: 0 1em
&.offline-ui-up
+offline-animation(offline-dropout forwards .5s 2s)
.offline-ui-content:after
background: $green
&.offline-ui-down
+offline-animation(offline-dropin .5s)
.offline-ui-content:after
background: $red
&.offline-ui-connecting, &.offline-ui-waiting
padding-right: 3em
.offline-ui-content:after
background: $red
&:after
+offline-animation(offline-rotation .7s linear infinite)
+border-radius(50%)
content: " "
display: block
position: absolute
right: 1em
top: 0
bottom: 0
margin: auto
height: 1em
width: 1em
border: 2px solid transparent
border-top-color: rgba(255, 255, 255, .5)
border-left-color: rgba(255, 255, 255, .5)
opacity: 0.7
&.offline-ui-waiting
padding-right: 11em
&.offline-ui-reconnect-failed-2s
padding-right: 0