forked from scala/docs.scala-lang
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcode.scss
executable file
·67 lines (56 loc) · 1.4 KB
/
code.scss
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
// CODE
//------------------------------------------------
//------------------------------------------------
.code-element {
margin-bottom: 20px;
pre {
margin-top: 0;
}
code {
padding: 20px;
}
.bar-code {
background: #B4BBBD;
text-align: center;
padding: 2px 0;
font-size: $font-size-small;
font-weight: $font-bold;
min-height: 26px;
@include border-radius($border-radius-base $border-radius-base 0 0);
}
}
.code-snippet-area {
width: 100%;
margin-top: 1em;
margin-bottom: 1em;
position: relative; // so we can position the buttons
&:hover {
// display the copy buttons on hover of the whole area
.code-snippet-buttons {
opacity: 0.95;
&:active {
transition: none;
opacity: 0.7;
}
}
}
.code-snippet-buttons {
opacity: 0; // default invisible until hover
transition: $base-transition;
position: absolute; // so we can position the buttons
right: 3px;
top: 5px;
button {
border: none;
background: #fff;
font-size: $font-size-medium;
color: $gray-darker;
cursor: pointer;
}
}
.code-snippet-display {
margin-top: 0px;
margin-bottom: 0px;
width: 100%;
}
}