-
Notifications
You must be signed in to change notification settings - Fork 0
/
organism.article.styl
122 lines (112 loc) · 3.39 KB
/
organism.article.styl
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
[data-atoms=app]
> [data-organism-article]
&:not(.active)
> [data-organism-header] > *
transition opacity (ANIMATION_DURATION * 2) ANIMATION_EASE
opacity: 0
&.active
background-color: darken(BACKGROUND, 5%)
> [data-organism-header] > *
opacity: 1
&.back
opacity: .5
transform scale(.9)
&[data-screen=normal]
> [data-organism-article]
&:not(.active)
display: none
&[data-screen=small]
> [data-organism-article]
vendor(animation-fill-mode, forwards)
vendor(animation-duration, ANIMATION_DURATION)
vendor(animation-timing-function, ANIMATION_EASE)
&.active
transition-property opacity, transform
transition-duration (.5 * ANIMATION_DURATION)
transition-timing-function ANIMATION_EASE
&.aside
&:not(.right)
left: ASIDE_WIDTH
&.right
right: ASIDE_WIDTH
&[data-state="in"]
z-index: 2
&:not(.cover)
vendor(animation-name, article-in)
&.cover
vendor(animation-name, article-in-cover)
&:only-of-type
vendor(animation-duration, 1ms)
&[data-state="out"]
z-index: 2
vendor(animation-direction, reverse)
vendor(animation-fill-mode, forwards)
&:not(.cover)
vendor(animation-name, article-in)
&.cover
vendor(animation-delay, ANIMATION_DURATION)
vendor(animation-name, article-in-cover)
&[data-state="back-in"]
z-index: 1
&:not(.cover)
vendor(animation-name, article-out)
&.cover
vendor(animation-name, article-out-cover)
&[data-state="back-out"]
z-index: 1
vendor(animation-delay, 1)
vendor(animation-direction, reverse)
vendor(animation-fill-mode, forwards)
&:not(.cover)
vendor(animation-name, article-out)
&.cover
vendor(animation-name, article-out-cover)
&[data-state="aside-show"]
vendor(animation-fill-mode, forwards)
vendor(animation-name, article-aside)
&[data-state="aside-hide"]
vendor(animation-direction, reverse)
vendor(animation-fill-mode, forwards)
vendor(animation-name, article-aside)
&[data-state="aside-show-right"]
vendor(animation-fill-mode, forwards)
vendor(animation-name, article-aside-right)
&[data-state="aside-hide-right"]
vendor(animation-direction, reverse)
vendor(animation-fill-mode, forwards)
vendor(animation-name, article-aside-right)
TRANSLATE = 100%
OPACITY = 1.0
SCALE = 0.9
@keyframes article-in
0%
transform: translateX(TRANSLATE)
100%
transform: translateX(0)
@keyframes article-out
0%
transform: translateX(0)
100%
transform: translateX(-(TRANSLATE/5))
opacity: OPACITY
@keyframes article-in-cover
0%
transform: translateY(TRANSLATE)
100%
transform: translateY(0)
@keyframes article-out-cover
0%
transform: translateY(0)
100%
transform: translateY(-(TRANSLATE/10))
opacity: OPACITY
@keyframes article-aside
0%
transform: translateX(0)
100%
transform: translateX(ASIDE_WIDTH)
@keyframes article-aside-right
0%
transform: translateX(0)
100%
transform: translateX(-(ASIDE_WIDTH))