forked from duoshuo/duoshuo-embed.css
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommon.less
More file actions
302 lines (273 loc) · 6.4 KB
/
common.less
File metadata and controls
302 lines (273 loc) · 6.4 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
#ds-reset{
// 被复用多次,并可以被网站主简单修改的样式
.ds-highlight{
color: @highlight !important;
}
.ds-rounded{
.rounded(@border-radius);
}
.ds-rounded-top{
border-top-left-radius: @border-radius;
border-top-right-radius: @border-radius;
-webkit-border-top-left-radius: @border-radius;
-webkit-border-top-right-radius: @border-radius;
}
.ds-rounded-bottom{
border-bottom-left-radius: @border-radius;
border-bottom-right-radius: @border-radius;
-webkit-border-bottom-left-radius: @border-radius;
-webkit-border-bottom-right-radius: @border-radius;
}
.ds-gradient-bg{
background: url(../images/bg_sprites.png) 0 -60px repeat-x;
}
.ds-avatar {
box-shadow: 0 1px 1px rgba(255, 255, 255, .75);
position: relative;
.rounded(@border-radius);
background-color: #fff;
float: left;
//width: 50px; 通过里面的图片撑开来
//height: 50px; 通过里面的图片撑开来
img {
display: block;
width: 50px;
height: 50px;
//max-width:100%; // for-compatible // 如果设置会导致IE8下width为0,那么就需要外层标签强设width才能解决,因此注释掉
//max-height:100%; // for-compatible
box-shadow: 0 1px 3px rgba(0,0,0,.22);
.rounded(@border-radius);
}
.ds-service-icon{
display:block;
position: absolute;
bottom: -4px;
right: -4px;
}
}
img.ds-smiley{
margin:0;
padding:0;
display:inline;
border:none; // for compatible http://blog.dnspod.cn/2013/01/yangtze-river-delta/dnspod1-2/
}
.ds-icon {
vertical-align: middle;
display: inline-block;
overflow: hidden;
background: transparent @spritesheet no-repeat;
_background-image: url(../images/sprites.gif); // ie6 hack
}
a .ds-icon{
opacity: 0.6;
.transition(opacity);
}
a:hover .ds-icon {
opacity: 1;
}
/* SNS icons */
.ds-service-list {
a {
vertical-align: middle;
padding-right: 3px;
}
li:hover a { color: @dark; }
}
/*
.ds-connected-sites {
display: inline-block;
width: 16px !important;
height: 16px !important;
}*/
.ds-service-icon, .ds-service-icon-grey {
width: 16px !important;
height: 16px !important;
line-height: 100px;
display: inline-block;
background: url(../images/service-icons-color.png) no-repeat;
_background-image: url(../images/service-icons-color.gif);
overflow: hidden;
//float: left;
//opacity: .8;
}
.ds-service-icon-grey{
//background-position-x: -16px; // firefox doesn't support this property
background-image: url(../images/service-icons-grey.png);
_background-image: url(../images/service-icons-grey.gif); // IE6 hack
}
.ds-service-link {
height: 16px !important;
line-height: 16px;
padding-left: 20px;
display: block;
background: url(../images/service-icons-color.png) no-repeat;
_background-image: url(../images/service-icons-color.gif);
overflow: hidden;
}
.ds-weibo {
background-position: 0 0;
}
.ds-sohu {
background-position: 0 -16px;
}
.ds-renren {
background-position: 0 -32px;
}
.ds-netease {
background-position: 0 -48px;
}
.ds-qqt {
background-position: 0 -64px;
}
.ds-kaixin {
background-position: 0 -80px;
}
.ds-douban {
background-position: 0 -96px;
}
.ds-msn {
background-position: 0 -112px;
}
.ds-qzone {
background-position: 0 -128px;
}
.ds-duoshuo {
background-position: 0 -144px;
}
/*
.ds-360 {
background-position: 0 -160px;
}
.ds-alipay {
background-position: 0 -176px;
}
*/
.ds-qq {
background-position: 0 -192px;
}
.ds-baidu {
background-position: 0 -208px;
}
.ds-taobao {
background-position: 0 -224px;
}
.ds-google {
background-position: 0 -240px;
}
}
.ds-icons-32{
a {
display: block;
cursor:pointer;
width: 32px !important;
height: 32px !important;
background: url(../images/icons_large.png) no-repeat !important;
overflow: hidden;
text-indent:-9999px;
&.ds-weibo {background-position: -37px 0 !important;}
&.ds-qzone {background-position: 0 0 !important;}
&.ds-qqt {background-position: -74px 0 !important;}
&.ds-renren {background-position: -148px 0 !important;}
&.ds-kaixin {background-position: -111px 0 !important;}
&.ds-netease {background-position: -300px 0 !important;}
&.ds-sohu {background-position: -224px 0 !important;}
&.ds-qq {background-position: -488px 0 !important;}
&.ds-douban {background-position: -186px 0 !important;}
&.ds-baidu {background-position: -262px 0 !important;}
&.ds-taobao {background-position: -416px 0 !important;}
&.ds-msn {background-position: -377px 0 !important;}
&.ds-taobao {background-position: -339px 0 !important;}
}
}
#ds-reset #ds-ctx{ // 通用样式
padding: 0;
margin : 8px 0;
max-width:640px;
.ds-ctx-entry {
padding: 6px;
margin: 0;
border-bottom: 1px solid #e6e6e6;
.ds-ctx-head a {
color: lighten(@highlight, 15%);
&:hover {
color: @highlight;
}
}
.ds-avatar {
margin: 0;
width: 30px;
height: 30px;
img {
width: 30px;
height: 30px;
box-shadow: none;
}
}
.ds-ctx-body{
margin-left: 38px;
}
.ds-ctx-head {
position : relative;
_zoom: 1; // ie6 bug fix
line-height: 1em;
padding: 1px 0 0;
margin : 0 0 .25em;
}
.ds-ctx-nth{
color : @lighter;
font-size: 12px;
position: absolute;
top:2px;
right:0;
}
.ds-time {
font-size: 11px;
*font-size: 12px; // ie6/7会把所有中文修正成12px,因此会出现字体大小不一样的问题。
margin-left: 8px;
color: @lighter;
_zoom: 1; // ie6 hack 为了触发layout
}
.ds-ctx-content {
position : relative;
_zoom: 1; // ie6 hack
padding: 0;
margin: 0;
overflow:hidden;
line-height:1.5em;
}
&:hover .ds-comment-actions{
display:block;
}
}
.ds-comment-actions{ // 放到.ds-ctx-entry里面去会导致优先级过高reply-active的样式无法生效
bottom: 0;
right: 0;
line-height:18px;
position:absolute;
display:none;
*display:block; // ie6/7下不支持a以外的标签的hover事件
a{
margin: 0 0 0 6px;
}
}
}
#ds-reset.ds-touch #ds-ctx{ // 触屏设备始终显示
.ds-ctx-entry .ds-comment-actions{
display:block;
}
}
#ds-reset{
/**
* 上下文的样式
*/
.ds-comment-body #ds-ctx{ // 在评论列表中的样式
border-left: 3px @lightest solid;
background-color: rgba(0,0,0,.03);
}
&.ds-no-opacity .ds-comment-body #ds-ctx{
background-color:@gray-background;
}
.ds-dialog-body #ds-ctx .ds-ctx-entry:hover .ds-comment-actions{
display:none;
}
}