aboutsummaryrefslogtreecommitdiffstats
path: root/web_src/css/repo/file-view.css
blob: 907f136afea2b5349c533b839d3628dc235c2e47 (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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
.file-view tr.active .lines-num,
.file-view tr.active .lines-escape,
.file-view tr.active .lines-code {
  background: var(--color-highlight-bg);
}

/* set correct border radius on the last active lines, to avoid border overflow */
.file-view tr.active:last-of-type .lines-code {
  border-bottom-right-radius: var(--border-radius);
}

.file-view tr.active .lines-num {
  position: relative;
}

/* add a darker "handler" at the beginning of the active line */
.file-view tr.active .lines-num::before {
  content: "";
  position: absolute;
  left: 0;
  width: 2px;
  height: 100%;
  background: var(--color-highlight-fg);
}

.file-view .file-not-rendered-prompt {
  padding: 1rem;
  text-align: center;
  font-size: 1rem !important; /* use consistent styles for various containers (code, markup, etc) */
  line-height: var(--line-height-default) !important; /* same as above */
}

/* ".code-view" is always used with ".file-view", to show the code of a file */
.file-view.code-view {
  background: var(--color-code-bg);
  border-radius: var(--border-radius);
}

.file-view.code-view table {
  width: 100%;
}

.file-view.code-view .lines-num span::after {
  cursor: pointer;
}

.file-view.code-view .lines-num:hover {
  color: var(--color-text-dark);
}

.file-view.code-view .ui.button.code-line-button {
  border: 1px solid var(--color-secondary);
  padding: 1px 4px;
  margin: 0;
  min-height: 0;
  position: absolute;
  left: 6px;
}

.file-view.code-view .ui.button.code-line-button:hover {
  background: var(--color-secondary);
}

.view-raw {
  display: flex;
  justify-content: center;
}

.view-raw > * {
  max-width: 100%;
}

.view-raw audio,
.view-raw video,
.view-raw img {
  margin: 1rem;
  border-radius: 0;
  object-fit: contain;
}

.view-raw img[src$=".svg" i] {
  max-height: 600px !important;
  max-width: 600px !important;
}

.file-view-render-container {
  width: 100%;
}

.file-view-render-container :last-child {
  border-radius: 0 0 var(--border-radius) var(--border-radius); /* to match the "ui segment" bottom radius */
}