forked from magento/devdocs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_code.scss
109 lines (94 loc) · 1.79 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
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
code, pre {
background-color: $light-gray-color;
font-family: Monaco, Menlo, Consolas, "Courier New", monospace;
font-size: 14px;
}
code {
padding: 2px 4px;
margin: 0;
border-radius: 3px;
word-wrap: break-word;
}
pre {
display: block;
padding: 6px 10px;
margin: 0 0 10px;
line-height: 19px;
word-break: break-all;
word-wrap: break-word;
white-space: pre;
overflow: auto;
}
pre code {
padding: 0;
color: inherit;
white-space: pre;
word-wrap: normal;
background-color: transparent;
border: none;
}
a code {
color: inherit;
font-size: .9em;
}
.pre-scrollable {
max-height: 340px;
overflow-y: scroll;
}
.pre-wrap {
position: relative;
&:hover {
.btn-copy, .btn-no-copy {
visibility: visible;
opacity: 1;
}
}
.btn-copy, .btn-no-copy {
visibility: hidden;
opacity: 0;
transition: .3s;
font-family: $body-font-family;
font-size: 12px;
user-select: none;
position: absolute;
top: 0;
right: 0;
border-top-left-radius: 0;
border-bottom-right-radius: 0;
}
.btn-copy {
color: #fff;
background: $brand-color;
&:hover {
color: #fff;
background: darken($brand-color, 10%);
}
&:active {
color: #fff;
background: darken($brand-color, 20%);
}
}
.btn-no-copy {
cursor: default;
outline: none;
background: darken($light-gray-color, 5%);
&:active, &:hover {
background: darken($light-gray-color, 5%);
}
}
}
/* TDD code format in headers */
h1 code, h2 code, h3 code, h4 code, h5 code {
padding: 2px 4px;
color: $body-font-color;
background-color: transparent;
border: 0px solid transparent;
white-space: nowrap;
font-size: 1em;
}
// syntax highlighting
.highlight {
position: relative;
border-radius: 3px;
margin: 0 0 20px;
}