summaryrefslogtreecommitdiffstats
path: root/common/CSS/highlight.css
blob: 14b71ed79f59f5540bbcac1919a2270efafada4b (plain) (blame)
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
/* for block of numbers */
pre code td.hljs-ln-numbers {
    color: #9c9c9c;
    border-right: 0.5px solid #9c9c9c;
    vertical-align: top;
    padding-left: 0.5rem;
    padding-right: 0.8rem;
    border: none;
    text-align: right;
}

/* for block of code */
pre code td.hljs-ln-code {
    /* padding-left: 1rem; */
    border: none;
}

pre {
    position: relative;
}

pre .btn {
    display: none;
    position: absolute;
    top: 0;
    right: 0;
    background: #333;
    color: #f5f5f5;
    border: none;
    outline: none !important;
}

pre .btn:hover {
    color: #fff
}

pre:hover .btn {
    display: block;
}

pre .btn-tip {
    display: none;
    position: absolute;
    top: 0px;
    right: 0;
    z-index: 9;
    padding: 6px 12px;
    background: #333;
    color: #f5f5f5;
    border: none;
    border-radius: 4px;
}

.btn {
    display: inline-block;
    padding: 6px 12px;
    margin-bottom: 0;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.42857143;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    -ms-touch-action: manipulation;
    touch-action: manipulation;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    background-image: none;
    border: 1px solid transparent;
    border-radius: 4px;
}

/* 代码复制时全选但不能被看到
 * 该功能是不道德的,用户想要怎么复制是人家的权利
 * 即使是自己用起来也经常只需要复制一段
 * 所以还是让用户自由复制吧
 */
/* code ::selection {
    background-color: rgba(0, 0, 0, 0);
} */