1
+ #components-page {
2
+ .component-search {
3
+ margin-bottom : 24px ;
4
+
5
+ input {
6
+ width : 100% ;
7
+ padding : 10px ;
8
+
9
+ background-color : #fefefe ;
10
+ border-radius : 2px ;
11
+ border : 1px solid ;
12
+ border-color : #7c7c7c #c3c3c3 #ddd ;
13
+ }
14
+ }
15
+ }
16
+
17
+ @media only screen and (max-width : $lap-end ) {
18
+ #components-page {
19
+ .filter-button-group {
20
+ margin-bottom : 16px ;
21
+
22
+ .btn {
23
+ display : inline-block ;
24
+ margin-right : 8px ;
25
+ margin-bottom : 8px ;
26
+
27
+ & .current {
28
+ background-color : #3A5561 ;
29
+ background-image : linear-gradient (to bottom , #3A5561 ,#3F6B7D );
30
+ }
31
+ }
32
+ }
33
+ }
34
+ }
35
+
36
+ @media only screen and (min-width : $desk-start ) {
37
+ #components-page {
38
+ .filter-button-group {
39
+ .featured {
40
+ margin : 12px 0 ;
41
+ }
42
+
43
+ .added_in_current_version {
44
+ margin-top : 12px ;
45
+ }
46
+
47
+ .added_two_versions_ago {
48
+ margin-bottom : 12px ;
49
+ }
50
+
51
+ .btn {
52
+ display : block ;
53
+ background : 0 ;
54
+ color : black ;
55
+ box-shadow : none ;
56
+ text-shadow : none ;
57
+ padding : 2px ;
58
+
59
+ & .current {
60
+ font-weight : bold ;
61
+ }
62
+ }
63
+ }
64
+ }
65
+ }
66
+
67
+ // styles for the cards
68
+ .hass-option-cards {
69
+ display : -ms-flexbox ;
70
+ display : -webkit-box ;
71
+ display : -webkit-flexbox ;
72
+ display : -webkit-flex ;
73
+ display : flex ;
74
+
75
+ flex-direction : row ;
76
+ flex-wrap : wrap ;
77
+ justify-content : flex-start ;
78
+ align-items : flex-start ;
79
+ margin : -4px ; // grid trick, has to match option-card's margin
80
+
81
+ p .note {
82
+ width : 100% ;
83
+ }
84
+
85
+ .option-card {
86
+ flex : 0 0 auto ;
87
+ width : 210px ;
88
+ height : 142px ;
89
+ display : inline-block ;
90
+ background-color : #fefefe ;
91
+ margin : 4px ;
92
+ border-radius : 2px ;
93
+ box-shadow : 0 2px 2px 0 rgba (0 , 0 , 0 , 0.14 ), 0 1px 5px 0 rgba (0 , 0 , 0 , 0.12 ), 0 3px 1px -2px rgba (0 , 0 , 0 , 0.2 );
94
+ padding : 8px ;
95
+ text-align : center ;
96
+ text-decoration : none ;
97
+
98
+ .img-container {
99
+ height : 50px ;
100
+ margin : 8px 0 ;
101
+ font : 0 / 0 a;
102
+
103
+ & :before { /* create a full-height inline block pseudo=element */
104
+ content : ' ' ;
105
+ display : inline-block ;
106
+ vertical-align : middle ; /* vertical alignment of the inline element */
107
+ height : 100% ;
108
+ }
109
+
110
+ img {
111
+ max-width : 100% ;
112
+ max-height : 50px ;
113
+ box-shadow : none ;
114
+ border : none ;
115
+ vertical-align : middle ;
116
+ }
117
+ }
118
+
119
+ .title {
120
+ text-decoration : none ;
121
+ font-size : 18px ;
122
+ color : #000 ;
123
+ line-height : 1.3em ;
124
+ height : 2.6em ;
125
+ }
126
+
127
+ .category {
128
+ font-size : 14px ;
129
+ color : #AAA ;
130
+ }
131
+ }
132
+
133
+ // fade-in animation
134
+ & .show-items .option-card {
135
+ opacity :0 ;
136
+ -webkit-animation :new- item- animation .2s linear forwards ;
137
+ -o-animation :new- item- animation .2s linear forwards ;
138
+ animation :new- item- animation .2s linear forwards ;
139
+ }
140
+
141
+ // fade-out animation
142
+ & .remove-items .option-card {
143
+ -webkit-animation :removed- item- animation .2s cubic-bezier (.55 ,-0.04 ,.91 ,.94 ) forwards ;
144
+ -o-animation :removed- item- animation .2s cubic-bezier (.55 ,-0.04 ,.91 ,.94 ) forwards ;
145
+ animation :removed- item- animation .2s cubic-bezier (.55 ,-0.04 ,.91 ,.94 ) forwards
146
+ }
147
+ }
148
+
149
+ // animations for fade-in and fade-out effects of option-cards
150
+ @keyframes new-item-animation {
151
+ from {
152
+ opacity :0 ;
153
+ -webkit-transform :scale (0 );
154
+ -ms-transform :scale (0 );
155
+ -o-transform :scale (0 );
156
+ transform :scale (0 )
157
+ }
158
+ to {
159
+ opacity :1 ;
160
+ -webkit-transform :scale (1 );
161
+ -ms-transform :scale (1 );
162
+ -o-transform :scale (1 );
163
+ transform :scale (1 )
164
+ }
165
+ }
166
+ @-webkit-keyframes new-item-animation {
167
+ from {
168
+ opacity :0 ;
169
+ -webkit-transform :scale (0 );
170
+ transform :scale (0 )
171
+ }
172
+ to {
173
+ opacity :1 ;
174
+ -webkit-transform :scale (1 );
175
+ transform :scale (1 )
176
+ }
177
+ }
178
+ @-o-keyframes new-item-animation {
179
+ from {
180
+ opacity :0 ;
181
+ -o-transform :scale (0 );
182
+ transform :scale (0 )
183
+ }
184
+ to {
185
+ opacity :1 ;
186
+ -o-transform :scale (1 );
187
+ transform :scale (1 )
188
+ }
189
+ }
190
+
191
+ // space blocker animation
192
+ @keyframes openspace {
193
+ to {
194
+ height :auto
195
+ }
196
+ }
197
+
198
+ @-webkit-keyframes openspace {
199
+ to {
200
+ height :auto
201
+ }
202
+ }
203
+ @-o-keyframes openspace {
204
+ to {
205
+ height :auto
206
+ }
207
+ }
208
+
209
+ // removal animation
210
+ @keyframes removed-item-animation {
211
+ from {
212
+ opacity :1 ;
213
+ -webkit-transform :scale (1 );
214
+ -ms-transform :scale (1 );
215
+ -o-transform :scale (1 );
216
+ transform :scale (1 )
217
+ }
218
+ to {
219
+ -webkit-transform :scale (0 );
220
+ -ms-transform :scale (0 );
221
+ -o-transform :scale (0 );
222
+ transform :scale (0 );
223
+ opacity :0
224
+ }
225
+ }
226
+ @-webkit-keyframes removed-item-animation {
227
+ from {
228
+ opacity :1 ;
229
+ -webkit-transform :scale (1 );
230
+ transform :scale (1 )
231
+ }
232
+ to {
233
+ -webkit-transform :scale (0 );
234
+ transform :scale (0 );
235
+ opacity :0
236
+ }
237
+ }
238
+ @-o-keyframes removed-item-animation {
239
+ from {
240
+ opacity :1 ;
241
+ -o-transform :scale (1 );
242
+ transform :scale (1 )
243
+ }
244
+ to {
245
+ -o-transform :scale (0 );
246
+ transform :scale (0 );
247
+ opacity :0
248
+ }
249
+ }
0 commit comments