code-block.less
1293 lines
| 29.2 KiB
| text/x-less
|
LessCssLexer
r1 | // Default styles | |||
.diff-collapse { | ||||
margin: @padding 0; | ||||
text-align: right; | ||||
} | ||||
.diff-container { | ||||
margin-bottom: @space; | ||||
.diffblock { | ||||
margin-bottom: @space; | ||||
} | ||||
&.hidden { | ||||
display: none; | ||||
overflow: hidden; | ||||
} | ||||
} | ||||
div.diffblock .sidebyside { | ||||
background: #ffffff; | ||||
} | ||||
div.diffblock { | ||||
overflow-x: auto; | ||||
overflow-y: hidden; | ||||
clear: both; | ||||
padding: 0px; | ||||
background: @grey6; | ||||
border: @border-thickness solid @grey5; | ||||
-webkit-border-radius: @border-radius @border-radius 0px 0px; | ||||
border-radius: @border-radius @border-radius 0px 0px; | ||||
.comments-number { | ||||
float: right; | ||||
} | ||||
// BEGIN CODE-HEADER STYLES | ||||
.code-header { | ||||
background: @grey6; | ||||
padding: 10px 0 10px 0; | ||||
height: auto; | ||||
width: 100%; | ||||
.hash { | ||||
float: left; | ||||
padding: 2px 0 0 2px; | ||||
} | ||||
.date { | ||||
float: left; | ||||
text-transform: uppercase; | ||||
padding: 4px 0px 0px 2px; | ||||
} | ||||
div { | ||||
margin-left: 4px; | ||||
} | ||||
div.compare_header { | ||||
min-height: 40px; | ||||
margin: 0; | ||||
padding: 0 @padding; | ||||
.drop-menu { | ||||
float:left; | ||||
display: block; | ||||
margin:0 0 @padding 0; | ||||
} | ||||
.compare-label { | ||||
float: left; | ||||
clear: both; | ||||
display: inline-block; | ||||
min-width: 5em; | ||||
margin: 0; | ||||
padding: @button-padding @button-padding @button-padding 0; | ||||
r3186 | font-weight: @text-semibold-weight; | |||
r1 | font-family: @text-semibold; | |||
} | ||||
.compare-buttons { | ||||
float: left; | ||||
margin: 0; | ||||
padding: 0 0 @padding; | ||||
.btn { | ||||
margin: 0 @padding 0 0; | ||||
} | ||||
} | ||||
} | ||||
} | ||||
.parents { | ||||
float: left; | ||||
width: 100px; | ||||
font-weight: 400; | ||||
vertical-align: middle; | ||||
padding: 0px 2px 0px 2px; | ||||
background-color: @grey6; | ||||
#parent_link { | ||||
margin: 00px 2px; | ||||
&.double { | ||||
margin: 0px 2px; | ||||
} | ||||
&.disabled{ | ||||
margin-right: @padding; | ||||
} | ||||
} | ||||
} | ||||
.children { | ||||
float: right; | ||||
width: 100px; | ||||
font-weight: 400; | ||||
vertical-align: middle; | ||||
text-align: right; | ||||
padding: 0px 2px 0px 2px; | ||||
background-color: @grey6; | ||||
#child_link { | ||||
margin: 0px 2px; | ||||
&.double { | ||||
margin: 0px 2px; | ||||
} | ||||
&.disabled{ | ||||
margin-right: @padding; | ||||
} | ||||
} | ||||
} | ||||
.changeset_header { | ||||
height: 16px; | ||||
& > div{ | ||||
margin-right: @padding; | ||||
} | ||||
} | ||||
.changeset_file { | ||||
text-align: left; | ||||
float: left; | ||||
padding: 0; | ||||
a{ | ||||
display: inline-block; | ||||
margin-right: 0.5em; | ||||
} | ||||
#selected_mode{ | ||||
margin-left: 0; | ||||
} | ||||
} | ||||
.diff-menu-wrapper { | ||||
float: left; | ||||
} | ||||
.diff-menu { | ||||
position: absolute; | ||||
background: none repeat scroll 0 0 #FFFFFF; | ||||
border-color: #003367 @grey3 @grey3; | ||||
border-right: 1px solid @grey3; | ||||
border-style: solid solid solid; | ||||
border-width: @border-thickness; | ||||
box-shadow: 2px 8px 4px rgba(0, 0, 0, 0.2); | ||||
margin-top: 5px; | ||||
margin-left: 1px; | ||||
} | ||||
.diff-actions, .editor-actions { | ||||
float: left; | ||||
input{ | ||||
margin: 0 0.5em 0 0; | ||||
} | ||||
} | ||||
// END CODE-HEADER STYLES | ||||
// BEGIN CODE-BODY STYLES | ||||
.code-body { | ||||
padding: 0; | ||||
background-color: #ffffff; | ||||
position: relative; | ||||
max-width: none; | ||||
box-sizing: border-box; | ||||
// TODO: johbo: Parent has overflow: auto, this forces the child here | ||||
// to have the intended size and to scroll. Should be simplified. | ||||
width: 100%; | ||||
overflow-x: auto; | ||||
} | ||||
pre.raw { | ||||
background: white; | ||||
color: @grey1; | ||||
} | ||||
// END CODE-BODY STYLES | ||||
} | ||||
table.code-difftable { | ||||
border-collapse: collapse; | ||||
width: 99%; | ||||
border-radius: 0px !important; | ||||
td { | ||||
padding: 0 !important; | ||||
background: none !important; | ||||
border: 0 !important; | ||||
} | ||||
.context { | ||||
background: none repeat scroll 0 0 #DDE7EF; | ||||
} | ||||
.add { | ||||
background: none repeat scroll 0 0 #DDFFDD; | ||||
ins { | ||||
background: none repeat scroll 0 0 #AAFFAA; | ||||
text-decoration: none; | ||||
} | ||||
} | ||||
.del { | ||||
background: none repeat scroll 0 0 #FFDDDD; | ||||
del { | ||||
background: none repeat scroll 0 0 #FFAAAA; | ||||
text-decoration: none; | ||||
} | ||||
} | ||||
/** LINE NUMBERS **/ | ||||
.lineno { | ||||
r781 | padding-left: 2px !important; | |||
r1 | padding-right: 2px; | |||
text-align: right; | ||||
width: 32px; | ||||
-moz-user-select: none; | ||||
-webkit-user-select: none; | ||||
border-right: @border-thickness solid @grey5 !important; | ||||
border-left: 0px solid #CCC !important; | ||||
border-top: 0px solid #CCC !important; | ||||
border-bottom: none !important; | ||||
a { | ||||
&:extend(pre); | ||||
text-align: right; | ||||
padding-right: 2px; | ||||
cursor: pointer; | ||||
display: block; | ||||
width: 32px; | ||||
} | ||||
} | ||||
.context { | ||||
cursor: auto; | ||||
&:extend(pre); | ||||
} | ||||
.lineno-inline { | ||||
background: none repeat scroll 0 0 #FFF !important; | ||||
padding-left: 2px; | ||||
padding-right: 2px; | ||||
text-align: right; | ||||
width: 30px; | ||||
-moz-user-select: none; | ||||
-webkit-user-select: none; | ||||
} | ||||
/** CODE **/ | ||||
.code { | ||||
display: block; | ||||
width: 100%; | ||||
td { | ||||
margin: 0; | ||||
padding: 0; | ||||
} | ||||
pre { | ||||
margin: 0; | ||||
padding: 0; | ||||
margin-left: .5em; | ||||
} | ||||
} | ||||
} | ||||
// Comments | ||||
r4050 | .comment-selected-hl { | |||
r1192 | border-left: 6px solid @comment-highlight-color !important; | |||
r4050 | padding-left: 3px !important; | |||
margin-left: -7px !important; | ||||
} | ||||
div.comment:target, | ||||
div.comment-outdated:target { | ||||
.comment-selected-hl; | ||||
r1 | } | |||
//TODO: anderson: can't get an absolute number out of anything, so had to put the | ||||
//current values that might change. But to make it clear I put as a calculation | ||||
@comment-max-width: 1065px; | ||||
@pr-extra-margin: 34px; | ||||
@pr-border-spacing: 4px; | ||||
@pr-comment-width: @comment-max-width - @pr-extra-margin - @pr-border-spacing; | ||||
// Pull Request | ||||
.cs_files .code-difftable { | ||||
border: @border-thickness solid @grey5; //borders only on PRs | ||||
.comment-inline-form, | ||||
div.comment { | ||||
width: @pr-comment-width; | ||||
} | ||||
} | ||||
// Changeset | ||||
.code-difftable { | ||||
.comment-inline-form, | ||||
div.comment { | ||||
width: @comment-max-width; | ||||
} | ||||
} | ||||
//Style page | ||||
@style-extra-margin: @sidebar-width + (@sidebarpadding * 3) + @padding; | ||||
#style-page .code-difftable{ | ||||
.comment-inline-form, | ||||
div.comment { | ||||
width: @comment-max-width - @style-extra-margin; | ||||
} | ||||
} | ||||
#context-bar > h2 { | ||||
font-size: 20px; | ||||
} | ||||
#context-bar > h2> a { | ||||
font-size: 20px; | ||||
} | ||||
// end of defaults | ||||
.file_diff_buttons { | ||||
padding: 0 0 @padding; | ||||
.drop-menu { | ||||
float: left; | ||||
margin: 0 @padding 0 0; | ||||
} | ||||
.btn { | ||||
margin: 0 @padding 0 0; | ||||
} | ||||
} | ||||
.code-body.textarea.editor { | ||||
max-width: none; | ||||
padding: 15px; | ||||
} | ||||
td.injected_diff{ | ||||
max-width: 1178px; | ||||
overflow-x: auto; | ||||
overflow-y: hidden; | ||||
div.diff-container, | ||||
div.diffblock{ | ||||
max-width: 100%; | ||||
} | ||||
div.code-body { | ||||
max-width: 1124px; | ||||
overflow-x: auto; | ||||
r819 | overflow-y: hidden; | |||
r1 | padding: 0; | |||
} | ||||
div.diffblock { | ||||
border: none; | ||||
} | ||||
&.inline-form { | ||||
width: 99% | ||||
} | ||||
} | ||||
table.code-difftable { | ||||
width: 100%; | ||||
} | ||||
/** PYGMENTS COLORING **/ | ||||
div.codeblock { | ||||
// TODO: johbo: Added interim to get rid of the margin around | ||||
// Select2 widgets. This needs further cleanup. | ||||
overflow: auto; | ||||
padding: 0px; | ||||
Liviu
|
r3685 | border: @border-thickness solid @grey6; | ||
r1 | .border-radius(@border-radius); | |||
#remove_gist { | ||||
float: right; | ||||
} | ||||
r2126 | .gist_url { | |||
padding: 0px 0px 10px 0px; | ||||
} | ||||
r1 | .author { | |||
clear: both; | ||||
vertical-align: middle; | ||||
r3186 | font-weight: @text-bold-weight; | |||
r1 | font-family: @text-bold; | |||
} | ||||
.btn-mini { | ||||
float: left; | ||||
margin: 0 5px 0 0; | ||||
} | ||||
.code-header { | ||||
padding: @padding; | ||||
border-bottom: @border-thickness solid @grey5; | ||||
r8 | .rc-user { | |||
min-width: 0; | ||||
margin-right: .5em; | ||||
} | ||||
r1 | .stats { | |||
clear: both; | ||||
margin: 0 0 @padding 0; | ||||
padding: 0; | ||||
.left { | ||||
float: left; | ||||
clear: left; | ||||
max-width: 75%; | ||||
margin: 0 0 @padding 0; | ||||
&.item { | ||||
margin-right: @padding; | ||||
&.last { border-right: none; } | ||||
} | ||||
} | ||||
.buttons { float: right; } | ||||
.author { | ||||
height: 25px; margin-left: 15px; font-weight: bold; | ||||
} | ||||
} | ||||
.commit { | ||||
margin: 5px 0 0 26px; | ||||
font-weight: normal; | ||||
white-space: pre-wrap; | ||||
} | ||||
} | ||||
.message { | ||||
position: relative; | ||||
margin: @padding; | ||||
.codeblock-label { | ||||
margin: 0 0 1em 0; | ||||
} | ||||
} | ||||
.code-body { | ||||
Liviu
|
r3720 | padding: 0.8em 1em; | ||
r1 | background-color: #ffffff; | |||
min-width: 100%; | ||||
box-sizing: border-box; | ||||
// TODO: johbo: Parent has overflow: auto, this forces the child here | ||||
// to have the intended size and to scroll. Should be simplified. | ||||
width: 100%; | ||||
overflow-x: auto; | ||||
r1580 | ||||
img.rendered-binary { | ||||
height: auto; | ||||
width: 100%; | ||||
} | ||||
Liviu
|
r3720 | |||
.markdown-block { | ||||
padding: 1em 0; | ||||
} | ||||
r1 | } | |||
Liviu
|
r3668 | |||
.codeblock-header { | ||||
Liviu
|
r3722 | background: @grey7; | ||
height: 36px; | ||||
} | ||||
.path { | ||||
border-bottom: 1px solid @grey6; | ||||
padding: .65em 1em; | ||||
height: 18px; | ||||
Liviu
|
r3668 | } | ||
r1 | } | |||
.code-highlighttable, | ||||
r344 | div.codeblock { | |||
r345 | &.readme { | |||
background-color: white; | ||||
} | ||||
.markdown-block table { | ||||
r344 | border-collapse: collapse; | |||
th, | ||||
td { | ||||
r986 | padding: .5em; | |||
border: @border-thickness solid @border-default-color; | ||||
r344 | } | |||
} | ||||
r1 | ||||
r345 | table { | |||
r986 | border: 0px; | |||
r344 | margin: 0; | |||
letter-spacing: normal; | ||||
r986 | ||||
r344 | td { | |||
r986 | border: 0px; | |||
r344 | vertical-align: top; | |||
} | ||||
r1 | } | |||
} | ||||
div.codeblock .code-header .search-path { padding: 0 0 0 10px; } | ||||
div.search-code-body { | ||||
background-color: #ffffff; padding: 5px 0 5px 10px; | ||||
pre { | ||||
.match { background-color: #faffa6;} | ||||
.break { display: block; width: 100%; background-color: #DDE7EF; color: #747474; } | ||||
} | ||||
r48 | .code-highlighttable { | |||
border-collapse: collapse; | ||||
tr:hover { | ||||
background: #fafafa; | ||||
} | ||||
td.code { | ||||
padding-left: 10px; | ||||
} | ||||
td.line { | ||||
border-right: 1px solid #ccc !important; | ||||
padding-right: 10px; | ||||
text-align: right; | ||||
r3165 | font-family: @text-monospace; | |||
r48 | span { | |||
white-space: pre-wrap; | ||||
color: #666666; | ||||
} | ||||
} | ||||
} | ||||
r1 | } | |||
div.annotatediv { margin-left: 2px; margin-right: 4px; } | ||||
.code-highlight { | ||||
margin: 0; padding: 0; border-left: @border-thickness solid @grey5; | ||||
pre, .linenodiv pre { padding: 0 5px; margin: 0; } | ||||
pre div:target {background-color: @comment-highlight-color !important;} | ||||
} | ||||
.linenos a { text-decoration: none; } | ||||
.CodeMirror-selected { background: @rchighlightblue; } | ||||
.CodeMirror-focused .CodeMirror-selected { background: @rchighlightblue; } | ||||
.CodeMirror ::selection { background: @rchighlightblue; } | ||||
.CodeMirror ::-moz-selection { background: @rchighlightblue; } | ||||
.code { display: block; border:0px !important; } | ||||
r986 | .code-highlight, /* TODO: dan: merge codehilite into code-highlight */ | |||
r3243 | /* This can be generated with `pygmentize -S default -f html` */ | |||
r1 | .codehilite { | |||
r3319 | .c-ElasticMatch { background-color: #faffa6; padding: 0.2em;} | |||
r1 | .hll { background-color: #ffffcc } | |||
.c { color: #408080; font-style: italic } /* Comment */ | ||||
r3107 | .err, .codehilite .err { border: none } /* Error */ | |||
r1 | .k { color: #008000; font-weight: bold } /* Keyword */ | |||
.o { color: #666666 } /* Operator */ | ||||
r3243 | .ch { color: #408080; font-style: italic } /* Comment.Hashbang */ | |||
r1 | .cm { color: #408080; font-style: italic } /* Comment.Multiline */ | |||
.cp { color: #BC7A00 } /* Comment.Preproc */ | ||||
r3243 | .cpf { color: #408080; font-style: italic } /* Comment.PreprocFile */ | |||
r1 | .c1 { color: #408080; font-style: italic } /* Comment.Single */ | |||
.cs { color: #408080; font-style: italic } /* Comment.Special */ | ||||
.gd { color: #A00000 } /* Generic.Deleted */ | ||||
.ge { font-style: italic } /* Generic.Emph */ | ||||
.gr { color: #FF0000 } /* Generic.Error */ | ||||
.gh { color: #000080; font-weight: bold } /* Generic.Heading */ | ||||
.gi { color: #00A000 } /* Generic.Inserted */ | ||||
r3243 | .go { color: #888888 } /* Generic.Output */ | |||
r1 | .gp { color: #000080; font-weight: bold } /* Generic.Prompt */ | |||
.gs { font-weight: bold } /* Generic.Strong */ | ||||
.gu { color: #800080; font-weight: bold } /* Generic.Subheading */ | ||||
r3243 | .gt { color: #0044DD } /* Generic.Traceback */ | |||
r1 | .kc { color: #008000; font-weight: bold } /* Keyword.Constant */ | |||
.kd { color: #008000; font-weight: bold } /* Keyword.Declaration */ | ||||
.kn { color: #008000; font-weight: bold } /* Keyword.Namespace */ | ||||
.kp { color: #008000 } /* Keyword.Pseudo */ | ||||
.kr { color: #008000; font-weight: bold } /* Keyword.Reserved */ | ||||
.kt { color: #B00040 } /* Keyword.Type */ | ||||
.m { color: #666666 } /* Literal.Number */ | ||||
.s { color: #BA2121 } /* Literal.String */ | ||||
.na { color: #7D9029 } /* Name.Attribute */ | ||||
.nb { color: #008000 } /* Name.Builtin */ | ||||
.nc { color: #0000FF; font-weight: bold } /* Name.Class */ | ||||
.no { color: #880000 } /* Name.Constant */ | ||||
.nd { color: #AA22FF } /* Name.Decorator */ | ||||
.ni { color: #999999; font-weight: bold } /* Name.Entity */ | ||||
.ne { color: #D2413A; font-weight: bold } /* Name.Exception */ | ||||
.nf { color: #0000FF } /* Name.Function */ | ||||
.nl { color: #A0A000 } /* Name.Label */ | ||||
.nn { color: #0000FF; font-weight: bold } /* Name.Namespace */ | ||||
.nt { color: #008000; font-weight: bold } /* Name.Tag */ | ||||
.nv { color: #19177C } /* Name.Variable */ | ||||
.ow { color: #AA22FF; font-weight: bold } /* Operator.Word */ | ||||
.w { color: #bbbbbb } /* Text.Whitespace */ | ||||
r3243 | .mb { color: #666666 } /* Literal.Number.Bin */ | |||
r1 | .mf { color: #666666 } /* Literal.Number.Float */ | |||
.mh { color: #666666 } /* Literal.Number.Hex */ | ||||
.mi { color: #666666 } /* Literal.Number.Integer */ | ||||
.mo { color: #666666 } /* Literal.Number.Oct */ | ||||
r3243 | .sa { color: #BA2121 } /* Literal.String.Affix */ | |||
r1 | .sb { color: #BA2121 } /* Literal.String.Backtick */ | |||
.sc { color: #BA2121 } /* Literal.String.Char */ | ||||
r3243 | .dl { color: #BA2121 } /* Literal.String.Delimiter */ | |||
r1 | .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */ | |||
.s2 { color: #BA2121 } /* Literal.String.Double */ | ||||
.se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */ | ||||
.sh { color: #BA2121 } /* Literal.String.Heredoc */ | ||||
.si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */ | ||||
.sx { color: #008000 } /* Literal.String.Other */ | ||||
.sr { color: #BB6688 } /* Literal.String.Regex */ | ||||
.s1 { color: #BA2121 } /* Literal.String.Single */ | ||||
.ss { color: #19177C } /* Literal.String.Symbol */ | ||||
.bp { color: #008000 } /* Name.Builtin.Pseudo */ | ||||
r3243 | .fm { color: #0000FF } /* Name.Function.Magic */ | |||
r1 | .vc { color: #19177C } /* Name.Variable.Class */ | |||
.vg { color: #19177C } /* Name.Variable.Global */ | ||||
.vi { color: #19177C } /* Name.Variable.Instance */ | ||||
r3243 | .vm { color: #19177C } /* Name.Variable.Magic */ | |||
r1 | .il { color: #666666 } /* Literal.Number.Integer.Long */ | |||
r3319 | ||||
r1 | } | |||
/* customized pre blocks for markdown/rst */ | ||||
pre.literal-block, .codehilite pre{ | ||||
padding: @padding; | ||||
border: 1px solid @grey6; | ||||
.border-radius(@border-radius); | ||||
background-color: @grey7; | ||||
} | ||||
r986 | ||||
/* START NEW CODE BLOCK CSS */ | ||||
r1025 | @cb-line-height: 18px; | |||
@cb-line-code-padding: 10px; | ||||
r1030 | @cb-text-padding: 5px; | |||
r1025 | ||||
r1136 | @pill-padding: 2px 7px; | |||
r3100 | @pill-padding-small: 2px 2px 1px 2px; | |||
r1030 | ||||
r1136 | input.filediff-collapse-state { | |||
r1030 | display: none; | |||
r1136 | &:checked + .filediff { /* file diff is collapsed */ | |||
r1030 | .cb { | |||
display: none | ||||
} | ||||
r1136 | .filediff-collapse-indicator { | |||
r3882 | float: left; | |||
cursor: pointer; | ||||
margin: 1px -5px; | ||||
r1030 | } | |||
r3882 | .filediff-collapse-indicator:before { | |||
content: '\f105'; | ||||
} | ||||
r1136 | .filediff-menu { | |||
r1030 | display: none; | |||
} | ||||
r3126 | ||||
r1030 | } | |||
r1136 | &+ .filediff { /* file diff is expanded */ | |||
r3882 | ||||
r1136 | .filediff-collapse-indicator { | |||
r3882 | float: left; | |||
cursor: pointer; | ||||
margin: 1px -5px; | ||||
} | ||||
.filediff-collapse-indicator:before { | ||||
content: '\f107'; | ||||
} | ||||
r2120 | ||||
r1136 | .filediff-menu { | |||
r1030 | display: block; | |||
} | ||||
r3882 | ||||
r1268 | margin: 10px 0; | |||
r1138 | &:nth-child(2) { | |||
margin: 0; | ||||
} | ||||
} | ||||
} | ||||
r3126 | ||||
.filediffs .anchor { | ||||
display: block; | ||||
height: 40px; | ||||
margin-top: -40px; | ||||
visibility: hidden; | ||||
} | ||||
.filediffs .anchor:nth-of-type(1) { | ||||
display: block; | ||||
height: 80px; | ||||
margin-top: -80px; | ||||
visibility: hidden; | ||||
} | ||||
r1138 | .cs_files { | |||
clear: both; | ||||
} | ||||
r3126 | #diff-file-sticky{ | |||
will-change: min-height; | ||||
r3882 | height: 80px; | |||
r3126 | } | |||
.sidebar__inner{ | ||||
transform: translate(0, 0); /* For browsers don't support translate3d. */ | ||||
transform: translate3d(0, 0, 0); | ||||
will-change: position, transform; | ||||
r3882 | height: 65px; | |||
r3128 | background-color: #fff; | |||
padding: 5px 0px; | ||||
} | ||||
.sidebar__bar { | ||||
padding: 5px 0px 0px 0px | ||||
r3126 | } | |||
.fpath-placeholder { | ||||
clear: both; | ||||
visibility: hidden | ||||
} | ||||
.is-affixed { | ||||
r3945 | ||||
.sidebar__inner { | ||||
z-index: 30; | ||||
} | ||||
r3126 | .sidebar_inner_shadow { | |||
position: fixed; | ||||
r3128 | top: 75px; | |||
right: -100%; | ||||
left: -100%; | ||||
r3945 | z-index: 30; | |||
r3126 | display: block; | |||
height: 5px; | ||||
content: ""; | ||||
background: linear-gradient(rgba(0, 0, 0, 0.075), rgba(0, 0, 0, 0.001)) repeat-x 0 0; | ||||
border-top: 1px solid rgba(0, 0, 0, 0.15); | ||||
} | ||||
r3945 | ||||
r3126 | .fpath-placeholder { | |||
visibility: visible !important; | ||||
} | ||||
} | ||||
r1138 | .diffset-menu { | |||
r3882 | ||||
r1138 | } | |||
r3882 | ||||
#todo-box { | ||||
clear:both; | ||||
display: none; | ||||
text-align: right | ||||
} | ||||
r1138 | .diffset { | |||
r3882 | margin: 0px auto; | |||
r1138 | .diffset-heading { | |||
border: 1px solid @grey5; | ||||
margin-bottom: -1px; | ||||
// margin-top: 20px; | ||||
h2 { | ||||
margin: 0; | ||||
line-height: 38px; | ||||
padding-left: 10px; | ||||
} | ||||
.btn { | ||||
margin: 0; | ||||
} | ||||
background: @grey6; | ||||
display: block; | ||||
padding: 5px; | ||||
} | ||||
.diffset-heading-warning { | ||||
background: @alert3-inner; | ||||
border: 1px solid @alert3; | ||||
} | ||||
r1159 | &.diffset-comments-disabled { | |||
.cb-comment-box-opener, .comment-inline-form, .cb-comment-add-button { | ||||
display: none !important; | ||||
} | ||||
} | ||||
r1138 | } | |||
r1159 | ||||
r3100 | .filelist { | |||
.pill { | ||||
display: block; | ||||
float: left; | ||||
padding: @pill-padding-small; | ||||
} | ||||
} | ||||
r1138 | .pill { | |||
display: block; | ||||
float: left; | ||||
padding: @pill-padding; | ||||
} | ||||
r3100 | ||||
r1138 | .pill-group { | |||
.pill { | ||||
opacity: .8; | ||||
r3116 | margin-right: 3px; | |||
r3164 | font-size: 12px; | |||
font-weight: normal; | ||||
r3882 | min-width: 30px; | |||
text-align: center; | ||||
r3116 | ||||
r1138 | &:first-child { | |||
border-radius: @border-radius 0 0 @border-radius; | ||||
} | ||||
&:last-child { | ||||
border-radius: 0 @border-radius @border-radius 0; | ||||
} | ||||
&:only-child { | ||||
border-radius: @border-radius; | ||||
r3103 | margin-right: 0; | |||
r1138 | } | |||
r1030 | } | |||
} | ||||
r1143 | ||||
r1192 | /* Main comments*/ | |||
#comments { | ||||
.comment-selected { | ||||
border-left: 6px solid @comment-highlight-color; | ||||
padding-left: 3px; | ||||
margin-left: -9px; | ||||
} | ||||
} | ||||
r1136 | .filediff { | |||
r1030 | border: 1px solid @grey5; | |||
/* START OVERRIDES */ | ||||
.code-highlight { | ||||
border: none; // TODO: remove this border from the global | ||||
// .code-highlight, it doesn't belong there | ||||
} | ||||
label { | ||||
margin: 0; // TODO: remove this margin definition from global label | ||||
// it doesn't belong there - if margin on labels | ||||
// are needed for a form they should be defined | ||||
// in the form's class | ||||
} | ||||
/* END OVERRIDES */ | ||||
* { | ||||
box-sizing: border-box; | ||||
} | ||||
r1136 | .filediff-anchor { | |||
r1030 | visibility: hidden; | |||
} | ||||
&:hover { | ||||
r1136 | .filediff-anchor { | |||
r1030 | visibility: visible; | |||
} | ||||
} | ||||
r1136 | .filediff-heading { | |||
r1030 | cursor: pointer; | |||
display: block; | ||||
r3882 | padding: 10px 10px; | |||
r1030 | } | |||
r1136 | .filediff-heading:after { | |||
r1030 | content: ""; | |||
display: table; | ||||
clear: both; | ||||
} | ||||
r1136 | .filediff-heading:hover { | |||
r1030 | background: #e1e9f4 !important; | |||
} | ||||
r1136 | .filediff-menu { | |||
r1268 | text-align: right; | |||
padding: 5px 5px 5px 0px; | ||||
r3882 | background: @grey7; | |||
r1031 | ||||
r1268 | &> a, | |||
&> span { | ||||
padding: 1px; | ||||
r1030 | } | |||
} | ||||
r1143 | ||||
r3100 | .filediff-collapse-button, .filediff-expand-button { | |||
cursor: pointer; | ||||
} | ||||
.filediff-collapse-button { | ||||
display: inline; | ||||
} | ||||
.filediff-expand-button { | ||||
display: none; | ||||
} | ||||
.filediff-collapsed .filediff-collapse-button { | ||||
display: none; | ||||
} | ||||
.filediff-collapsed .filediff-expand-button { | ||||
display: inline; | ||||
} | ||||
/**** COMMENTS ****/ | ||||
.filediff-menu { | ||||
.show-comment-button { | ||||
display: none; | ||||
} | ||||
} | ||||
&.hide-comments { | ||||
.inline-comments { | ||||
display: none; | ||||
} | ||||
.filediff-menu { | ||||
.show-comment-button { | ||||
display: inline; | ||||
} | ||||
.hide-comment-button { | ||||
display: none; | ||||
} | ||||
} | ||||
} | ||||
.hide-line-comments { | ||||
.inline-comments { | ||||
display: none; | ||||
} | ||||
} | ||||
/**** END COMMENTS ****/ | ||||
} | ||||
r3882 | .op-added { | |||
color: @alert1; | ||||
} | ||||
.op-deleted { | ||||
color: @alert2; | ||||
} | ||||
r3100 | ||||
.filediff, .filelist { | ||||
r3882 | ||||
r1136 | .pill { | |||
r1030 | &[op="name"] { | |||
background: none; | ||||
opacity: 1; | ||||
color: white; | ||||
} | ||||
&[op="limited"] { | ||||
background: @grey2; | ||||
color: white; | ||||
} | ||||
&[op="binary"] { | ||||
background: @color7; | ||||
color: white; | ||||
} | ||||
&[op="modified"] { | ||||
background: @alert1; | ||||
color: white; | ||||
} | ||||
&[op="renamed"] { | ||||
background: @color4; | ||||
color: white; | ||||
} | ||||
r1582 | &[op="copied"] { | |||
background: @color4; | ||||
color: white; | ||||
} | ||||
r1030 | &[op="mode"] { | |||
background: @grey3; | ||||
color: white; | ||||
} | ||||
&[op="symlink"] { | ||||
background: @color8; | ||||
color: white; | ||||
} | ||||
&[op="added"] { /* added lines */ | ||||
background: @alert1; | ||||
color: white; | ||||
} | ||||
&[op="deleted"] { /* deleted lines */ | ||||
background: @alert2; | ||||
color: white; | ||||
} | ||||
&[op="created"] { /* created file */ | ||||
background: @alert1; | ||||
color: white; | ||||
} | ||||
&[op="removed"] { /* deleted file */ | ||||
background: @color5; | ||||
color: white; | ||||
} | ||||
} | ||||
r3100 | } | |||
r1143 | ||||
r1268 | .filediff-outdated { | |||
padding: 8px 0; | ||||
.filediff-heading { | ||||
opacity: .5; | ||||
} | ||||
} | ||||
r1143 | ||||
r986 | table.cb { | |||
width: 100%; | ||||
border-collapse: collapse; | ||||
r1030 | .cb-text { | |||
padding: @cb-text-padding; | ||||
} | ||||
.cb-hunk { | ||||
padding: @cb-text-padding; | ||||
} | ||||
.cb-expand { | ||||
display: none; | ||||
} | ||||
.cb-collapse { | ||||
display: inline; | ||||
} | ||||
&.cb-collapsed { | ||||
.cb-line { | ||||
display: none; | ||||
} | ||||
.cb-expand { | ||||
display: inline; | ||||
} | ||||
.cb-collapse { | ||||
display: none; | ||||
} | ||||
r3137 | .cb-hunk { | |||
display: none; | ||||
} | ||||
r986 | } | |||
/* intentionally general selector since .cb-line-selected must override it | ||||
and they both use !important since the td itself may have a random color | ||||
generated by annotation blocks. TLDR: if you change it, make sure | ||||
annotated block selection and line selection in file view still work */ | ||||
.cb-line-fresh .cb-content { | ||||
background: white !important; | ||||
} | ||||
r1030 | .cb-warning { | |||
background: #fff4dd; | ||||
} | ||||
r986 | ||||
r1030 | &.cb-diff-sideside { | |||
td { | ||||
&.cb-content { | ||||
width: 50%; | ||||
} | ||||
} | ||||
} | ||||
r986 | ||||
r1030 | tr { | |||
&.cb-annotate { | ||||
r986 | border-top: 1px solid #eee; | |||
} | ||||
r3083 | &.cb-comment-info { | |||
border-top: 1px solid #eee; | ||||
color: rgba(0, 0, 0, 0.3); | ||||
background: #edf2f9; | ||||
td { | ||||
} | ||||
} | ||||
r1030 | &.cb-hunk { | |||
r3165 | font-family: @text-monospace; | |||
r1030 | color: rgba(0, 0, 0, 0.3); | |||
td { | ||||
&:first-child { | ||||
background: #edf2f9; | ||||
} | ||||
&:last-child { | ||||
background: #f4f7fb; | ||||
} | ||||
r986 | } | |||
} | ||||
} | ||||
r1159 | ||||
r986 | td { | |||
vertical-align: top; | ||||
r1025 | padding: 0; | |||
r986 | ||||
&.cb-content { | ||||
font-size: 12.35px; | ||||
r1030 | &.cb-line-selected .cb-code { | |||
background: @comment-highlight-color !important; | ||||
} | ||||
r1025 | span.cb-code { | |||
line-height: @cb-line-height; | ||||
padding-left: @cb-line-code-padding; | ||||
r1030 | padding-right: @cb-line-code-padding; | |||
r1025 | display: block; | |||
white-space: pre-wrap; | ||||
r3165 | font-family: @text-monospace; | |||
r1406 | word-break: break-all; | |||
r1157 | .nonl { | |||
color: @color5; | ||||
} | ||||
r3135 | .cb-action { | |||
&:before { | ||||
content: " "; | ||||
} | ||||
&.cb-deletion:before { | ||||
content: "- "; | ||||
} | ||||
&.cb-addition:before { | ||||
content: "+ "; | ||||
} | ||||
} | ||||
r986 | } | |||
r1143 | ||||
&> button.cb-comment-box-opener { | ||||
r1160 | ||||
r1268 | padding: 2px 2px 1px 3px; | |||
margin-left: -6px; | ||||
r1160 | margin-top: -1px; | |||
r1143 | border-radius: @border-radius; | |||
position: absolute; | ||||
display: none; | ||||
} | ||||
.cb-comment { | ||||
margin-top: 10px; | ||||
white-space: normal; | ||||
} | ||||
} | ||||
&:hover { | ||||
button.cb-comment-box-opener { | ||||
display: block; | ||||
} | ||||
&+ td button.cb-comment-box-opener { | ||||
display: block | ||||
} | ||||
r986 | } | |||
r1157 | &.cb-data { | |||
text-align: right; | ||||
width: 30px; | ||||
r3165 | font-family: @text-monospace; | |||
r1157 | ||||
.icon-comment { | ||||
cursor: pointer; | ||||
} | ||||
r3130 | &.cb-line-selected { | |||
background: @comment-highlight-color !important; | ||||
} | ||||
r1157 | &.cb-line-selected > div { | |||
display: block; | ||||
background: @comment-highlight-color !important; | ||||
line-height: @cb-line-height; | ||||
color: rgba(0, 0, 0, 0.3); | ||||
} | ||||
} | ||||
r986 | &.cb-lineno { | |||
padding: 0; | ||||
width: 50px; | ||||
color: rgba(0, 0, 0, 0.3); | ||||
text-align: right; | ||||
border-right: 1px solid #eee; | ||||
r3165 | font-family: @text-monospace; | |||
r3125 | -webkit-user-select: none; | |||
-moz-user-select: none; | ||||
r2733 | user-select: none; | |||
r986 | ||||
a::before { | ||||
content: attr(data-line-no); | ||||
} | ||||
r3130 | &.cb-line-selected { | |||
r986 | background: @comment-highlight-color !important; | |||
} | ||||
a { | ||||
display: block; | ||||
r1025 | padding-right: @cb-line-code-padding; | |||
r1030 | padding-left: @cb-line-code-padding; | |||
r1025 | line-height: @cb-line-height; | |||
r986 | color: rgba(0, 0, 0, 0.3); | |||
} | ||||
} | ||||
r1030 | &.cb-empty { | |||
background: @grey7; | ||||
} | ||||
ins { | ||||
color: black; | ||||
background: #a6f3a6; | ||||
text-decoration: none; | ||||
} | ||||
del { | ||||
color: black; | ||||
background: #f8cbcb; | ||||
text-decoration: none; | ||||
} | ||||
&.cb-addition { | ||||
background: #ecffec; | ||||
&.blob-lineno { | ||||
background: #ddffdd; | ||||
} | ||||
} | ||||
&.cb-deletion { | ||||
background: #ffecec; | ||||
&.blob-lineno { | ||||
background: #ffdddd; | ||||
r986 | } | |||
} | ||||
r1427 | &.cb-annotate-message-spacer { | |||
width:8px; | ||||
r1413 | padding: 1px 0px 0px 3px; | |||
r1427 | } | |||
r986 | &.cb-annotate-info { | |||
width: 320px; | ||||
min-width: 320px; | ||||
max-width: 320px; | ||||
padding: 5px 2px; | ||||
font-size: 13px; | ||||
r1427 | .cb-annotate-message { | |||
padding: 2px 0px 0px 0px; | ||||
r986 | white-space: pre-line; | |||
r1427 | overflow: hidden; | |||
r986 | } | |||
.rc-user { | ||||
float: none; | ||||
padding: 0 6px 0 17px; | ||||
r1427 | min-width: unset; | |||
min-height: unset; | ||||
r986 | } | |||
} | ||||
&.cb-annotate-revision { | ||||
cursor: pointer; | ||||
text-align: right; | ||||
r1427 | padding: 1px 3px 0px 3px; | |||
r986 | } | |||
} | ||||
} | ||||