aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/less/components/source.less
blob: 7ef086a2aaab33a50f44dcbabc379e5386314624 (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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
@import (reference) "../mixins";
@import (reference) "../variables";

@lineHeight: 18px;
@duplicationColor: #f3ca8e;

.source {
  width: 100%;
  border: 1px solid @barBorderColor;
  overflow-x: auto;
  overflow-y: hidden;
}

.source-table {
  width: 100%;
  border: none;
  border-collapse: collapse;
}

.source-line:hover {
  .source-line-number,
  .source-line-coverage,
  .source-line-duplications,
  .source-line-duplications-extra,
  .source-line-scm {
    border-color: darken(@barBackgroundColor, 4%);
    background-color: darken(@barBackgroundColor, 4%);
  }

  .source-line-code {
    background-color: darken(#fff, 4%);
  }
}

.source-line-highlighted,
.source-line-highlighted:hover {
  .source-line-number,
  .source-line-coverage,
  .source-line-duplications,
  .source-line-duplications-extra,
  .source-line-scm {
    border-color: #fdf190 !important;
    background-color: #fdf190;
  }

  .source-line-code {
    background-color: #fff8c2;
  }
}

.source-line-expand {
  .source-line-code {
    background: url(../images/gray-stripes.png) repeat;
  }
}

.source pre {
  height: @lineHeight;
  padding: 0;
}

.source pre,
.source-meta {
  line-height: @lineHeight;
  font-family: @monoFontFamily;
  font-size: 12px;
}

.source-line-code {
  padding: 0 10px;
}

.source-meta {
  vertical-align: top;
  width: 1px;
  .user-select(none);
}

.source-meta + .source-meta {
  border-left: 1px solid @barBackgroundColor;
}

.source-line-number {
  min-width: 18px;
  padding: 0 10px;
  background-color: @barBackgroundColor;
  color: @secondFontColor;
  text-align: right;

  &[data-line-number] {
    cursor: pointer;
  }

  &:before {
    content: attr(data-line-number);
  }
}

.source-line-coverage {
  background-color: @barBackgroundColor;
}

.source-line-duplications,
.source-line-duplications-extra {
  background-color: @barBackgroundColor;
}

.source-line-scm {
  padding: 0 5px;
  background-color: @barBackgroundColor;
}

.source-line-scm-inner {
  max-width: 40px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;

  &:before {
    content: attr(data-author);
  }
}

.source-line-bar {
  width: 5px;
  height: @lineHeight;
}

.source-line-covered {
  background-color: @green !important;
  cursor: pointer;
}

.source-line-uncovered {
  background-color: @red !important;
}

.source-line-partially-covered {
  background-color: @orange !important;
  cursor: pointer;
}

.source-line-duplicated {
  background-color: @duplicationColor !important;
  cursor: pointer;
}