/* * SonarQube * Copyright (C) 2009-2017 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 3 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ @import (reference) "../mixins"; @import (reference) "../variables"; @import (reference) "../init/type"; @import (reference) "ui"; @source-line-height: 18px; @lineWithIssuesBackground: #ffeaea; @duplicationColor: #797979; .source-viewer { width: 100%; min-height: 200px; border: 1px solid @barBorderColor; box-sizing: border-box; background-color: #fff; overflow-x: auto; overflow-y: hidden; } .source-table { width: 100%; border: none; border-collapse: collapse; } .source-line:hover { .source-line-number, .source-line-issues, .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-issues, .source-line-coverage, .source-line-duplications, .source-line-duplications-extra, .source-line-scm { border-color: #c4dfec !important; background-color: #c4dfec; } .source-line-code { background-color: #d9edf7; } } .source-line-filtered { .source-line-code { background-color: #fbf3d5 !important; } &.source-line-filtered-dark { .source-line-code { background-color: #f9ebb7 !important; } } } .source-line-last .source-line-code { padding-bottom: 80px; } .source-viewer pre { height: @source-line-height; padding: 0; } .source-viewer pre, .source-meta { line-height: @source-line-height; font-family: @monoFontFamily; font-size: 12px; } .source-line-code { position: relative; padding: 0 10px; pre { float: left; } .issue-list { margin-left: -10px; margin-right: -10px; } } .source-line-code-inner { .clearfix; } .source-line-code-issue { display: inline-block; background-image: url(data:image/png;base64,iVBORw0KG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TM4OTNFREQxQzk5M0MyNjhBIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+bcqJtQAAAEhJREFUeNpi+G+swwDGDAwgbAWlwZiJAQFCgfgwEIfDRaC67ID4NRDnQ2kQnwFZwgFqnANMAQOUYY9sF0wBiCGH5CBkrAgQYACuWi4sSGW8yAAAAABJRU5ErkJggg==); background-repeat: repeat-x; background-size: 4px; background-position: bottom; } .source-meta { vertical-align: top; width: 1px; background-clip: padding-box; user-select: none; } .source-meta:focus { outline: none; } .source-meta[role='button'] { cursor: pointer; } .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; &:before { content: attr(data-line-number); } } .source-line-issues { position: relative; padding: 0 2px; background-color: @barBackgroundColor; } .source-line-issues-counter { position: absolute; top: -1px; right: -1px; line-height: 8px; font-size: 8px; } .source-line-coverage { background-color: @barBackgroundColor; } .source-line-duplications, .source-line-duplications-extra { background-color: @barBackgroundColor; } .source-line-duplications-extra { display: none; } .source-duplications-expanded { .source-line-duplications { display: none; } .source-line-duplications-extra { display: table-cell; } } .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: @source-line-height; } .source-line-covered { background-color: @green !important; } .source-line-uncovered { background-color: @red !important; } .source-line-partially-covered { background-color: @orange !important; background-image: repeating-linear-gradient( 45deg, rgba(255, 255, 255, 0.5) 4px, transparent 4px, transparent 8px, rgba(255, 255, 255, 0.5) 8px, rgba(255, 255, 255, 0.5) 12px, transparent 12px, transparent 16px, rgba(255, 255, 255, 0.5) 16px, rgba(255, 255, 255, 0.5) 20px ) !important; } .source-line-duplicated { background-color: @duplicationColor !important; } // Header .source-viewer-header { .clearfix; position: relative; padding: 2px 10px 4px; border-bottom: 1px solid @barBorderColor; background-color: @barBackgroundColor; } .source-viewer-header-bar + .source-viewer-header-bar { border-top: 1px solid @barBorderColor; } .source-viewer-header-component { float: left; padding-top: 4px; } .source-viewer-header-component-project { color: #777; font-size: @smallFontSize; } .source-viewer-header-component-name { font-weight: 600; } .source-viewer-header-favorite { position: relative; top: -2px; margin-left: 4px; .link-no-underline; } .source-viewer-header-measures { float: right; } .source-viewer-header-measures-scope { position: relative; float: left; } .source-viewer-header-measure { display: inline-block; vertical-align: middle; padding: 3px 0; font-size: @baseFontSize; .rating { font-size: 18px; } } .source-viewer-header-measure + .source-viewer-header-measure { margin-left: 25px; } .source-viewer-header-measure-label { display: block; margin-top: 4px; line-height: @smallFontSize; color: #777; font-size: @smallFontSize; } .source-viewer-header-measure-value { display: block; line-height: 18px; color: @baseFontColor; font-size: 18px; font-weight: 300; } .source-viewer-header-external-link { .link-no-underline; i { position: relative; top: -4px; } } .source-viewer-header-actions { float: right; display: block; margin-left: 25px; padding: 13px 5px; } .source-viewer-header-more-actions { position: absolute; z-index: @dropdown-menu-z-index; right: 0; top: 100%; padding: 10px; border: 1px solid @barBorderColor; border-right: none; background-color: @white; line-height: 1.8; } .source-viewer-measures-overlay { width: 1100px; left: 50%; right: auto; margin-left: -550px; padding: 20px 10px; background-color: @barBackgroundColor; .modal-foot { width: 1100px; left: 50%; right: auto; margin-left: -550px; } } .source-viewer-measures-component { float: none; margin: 0 10px 30px; } .source-viewer-measures-modal { background-color: @barBackgroundColor; } .source-viewer-measures { .clearfix; margin: 0 -10px; background-color: @barBackgroundColor; .bubble-popup-section { width: 100%; } } .source-viewer-measures + .source-viewer-measures { margin-top: 40px; } .source-viewer-measures-secondary .source-viewer-measures-card { background-color: fade(#fff, 60%); } .source-viewer-measures-section { float: left; width: 25%; margin: -20px 0; } .source-viewer-measures-section-big { width: 50%; } .source-viewer-measures-section-full { width: 100%; } .source-viewer-measures-section + .source-viewer-measures-section-full { margin-top: 20px; } .source-viewer-measures-card { margin: 20px 10px; padding: 10px; border: 1px solid @barBorderColor; background-color: #fff; } .source-viewer-measures-card-overflow { overflow: auto; } .source-viewer-measures-card-fixed-height { max-height: 36vh; overflow-y: scroll; } //.source-viewer-measures-section + .source-viewer-measures-section { // border-left: 1px solid @barBorderColor; //} .source-viewer-tests-list { width: 100%; font-size: @baseFontSize; } .source-viewer-test-status, .source-viewer-test-duration, .source-viewer-test-covered-lines { width: 1px; } .source-viewer-test-status, .source-viewer-test-duration, .source-viewer-test-covered-lines, .source-viewer-test-covered-name { vertical-align: middle; padding: 3px; } .source-viewer-test-name { padding-left: 10px; word-break: break-all; } .source-viewer-test-covered-lines { text-align: right; } .source-viewer-issue-location { max-width: 200px; margin-right: 10px; .text-ellipsis; } .source-viewer-flow-location + .source-viewer-flow-location { z-index: @issue-flow-location-z-index - 1; } .source-line-issue-locations { float: right; margin-right: -10px; &:empty { display: none; } } .source-viewer-more-code { padding: 40px 0; border-bottom: 1px solid @barBorderColor; background-color: @barBackgroundColor; text-align: center; .spinner { top: -1px; } .source-table + & { border-bottom: none; border-top: 1px solid @barBorderColor; } }