-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrt.less
88 lines (70 loc) · 1.64 KB
/
rt.less
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
@block: ~".b-rt";
.clearfix() {
&:before,
&:after {
content: "";
display: table;
}
&:after {
clear: both;
}
}
@{block} {
.clearfix();
font: normal 0px sans-serif;
border: solid 1px #ddd;
&__heading {
font-weight: bold;
font-size: 14px;
text-decoration: none;
line-height: 25px;
display: block;
padding: 3px 7px;
margin: 0 0 1px;
color: #000;
outline: none;
background-color: #ddd;
cursor: pointer;
&:last-of-type {
margin: 0;
}
&:active,
&:visited {
color: #000;
}
&:hover {
background-color: #efefef;
-webkit-transition: background-color 1s;
-moz-transition: background-color 1s;
transition: background-color 1s;
}
&:target {
color: #aaa;
background-color: #fff;
+ @{block}__wrapper {
position: static;
display: block;
}
}
}
&__wrapper {
font-size: 12px;
position: absolute;
display: none;
padding: 3px 7px 10px;
}
@media (min-width: 768px) {
&__heading {
display: inline-block;
margin: 0 1px 0 0;
}
&__heading:target + &__wrapper {
display: block;
float: right;
// This is a Chrome-only hack to workaround a bug (?)
// in the way Chrome reapplies floating rules
display: -webkit-box;
display: -webkit-flex;
}
}
}