summaryrefslogtreecommitdiff
path: root/SI/.obsidian/plugins/obsidian-code-block-enhancer/styles.css
blob: 9100c851dee966c11afd5bd6079645bf3fe2174e (plain)
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
.code-block-copy-button {
  display: none;
  margin: 0 0 0 auto;
  padding: 4px;
  position: absolute;
  top: 0;
  right: 0;
}
.code-block-copy-button svg.copy path {
  fill: var(--interactive-accent);
}
.code-block-copy-button:hover, .code-block-copy-button:active {
  cursor: pointer;
}
.code-block-copy-button:hover svg path, .code-block-copy-button:active svg path {
  filter: brightness(1.4);
  transition: all ease 0.3s;
}
.code-block-copy-button svg.copy-success path {
  fill: var(--interactive-success);
}
.code-block-copy-button:focus {
  outline: 0;
}

.code-block-lang-name {
  position: absolute;
  top: 0px;
  left: 0px;
  color: var(--text-normal);
  font-size: 0.8rem;
  margin-left: 4px;
  user-select: none;
}

.code-block-wrap {
  position: relative;
}

pre[class*=language-] {
  font-size: var(--editor-font-size);
  line-height: 1.5em;
}
pre[class*=language-] > code[class*=language-] {
  padding-top: 0 !important;
  font-size: var(--editor-font-size) !important;
  line-height: 1.5em !important;
}
pre[class*=language-].code-block-pre__has-linenum {
  padding-left: 4.5em;
}

.code-block-pre__has-copy-button:hover .code-block-copy-button {
  display: block;
}

.code-block-linenum-wrap {
  position: absolute;
  top: 1em;
  left: 0px;
  min-width: 4em;
  font-size: var(--editor-font-size);
  line-height: 1.5em;
  counter-reset: line-num;
  text-align: center;
  border-right: #999 1px solid;
  user-select: none;
  pointer-events: none;
  background-color: inherit;
}
.code-block-linenum-wrap .code-block-linenum {
  display: block;
  counter-increment: line-num;
  pointer-events: none;
}
.code-block-linenum-wrap .code-block-linenum::before {
  content: counter(line-num);
}