diff options
Diffstat (limited to 'server/sonar-web/src/main/less/components')
3 files changed, 152 insertions, 96 deletions
diff --git a/server/sonar-web/src/main/less/components/code-source.less b/server/sonar-web/src/main/less/components/code-source.less deleted file mode 100644 index a657c5bc2b0..00000000000 --- a/server/sonar-web/src/main/less/components/code-source.less +++ /dev/null @@ -1,92 +0,0 @@ -@import (reference) "../mixins"; -@import (reference) "../variables"; - -.code-source { - - .code { - width: 100%; - border: 1px solid @barBorderColor; - } - - .code th { - height: 30px; - .box-sizing(border-box); - background-color: @barBackgroundColor; - - &.lid { - border-right: 1px solid @barBorderColor; - } - - &.stat { - padding-top: 4px; - padding-bottom: 4px; - border-left: none; - border-right: none; - border-bottom: 1px solid @barBorderColor; - } - } - - .code .stat { - vertical-align: top; - min-width: 12px; - padding: 1px 5px; - background-color: @barBackgroundColor; - color: #888; - font-size: @smallFontSize; - line-height: 16px; - text-align: right; - cursor: default; - white-space: nowrap; - } - - .code .lid { - min-width: 18px; - padding-left: 10px; - padding-right: 10px; - cursor: pointer; - } - - .code .scm { - line-height: 16px; - padding-top: 0; - padding-bottom: 0; - text-align: left; - - .scm-date { - display: inline-block; - vertical-align: middle; - padding: 2px 4px; - line-height: 1; - background-color: @barBorderColor; - } - - .scm-author { - display: inline-block; - vertical-align: middle; - max-width: 40px; - padding: 2px 0; - line-height: 1; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - } - - } - - .code .row:hover { - td.stat { background-color: @barBorderColor; } - td.line { background-color: @barBackgroundColor; } - } - - .code .row-highlighted, - .code .row-highlighted:hover { - td.stat { background-color: #fdf190; } - td.line, .code-issues, .code-issue { background-color: #fff8c2; } - } - - .code td.line { - width: 100%; - padding: 1px 5px; - } - -} diff --git a/server/sonar-web/src/main/less/components/issues.less b/server/sonar-web/src/main/less/components/issues.less index a709e9ab9a8..dd439dbccca 100644 --- a/server/sonar-web/src/main/less/components/issues.less +++ b/server/sonar-web/src/main/less/components/issues.less @@ -9,17 +9,19 @@ .issue-list { - margin: 5px -5px; - border-top: 1px solid @barBorderColor; - border-bottom: 1px solid @barBorderColor; + margin: 10px 0; + background-color: #ffeaea; } .issue { position: relative; + max-width: 900px; padding-top: @topPadding; padding-bottom: @bottomPadding; - background-color: @barBackgroundColor; + border: 1px solid transparent; + border-left-width: 3px; + background-color: #ffeaea; } .issue.selected { diff --git a/server/sonar-web/src/main/less/components/source.less b/server/sonar-web/src/main/less/components/source.less new file mode 100644 index 00000000000..7ef086a2aaa --- /dev/null +++ b/server/sonar-web/src/main/less/components/source.less @@ -0,0 +1,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; +} |